diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f371643..0f80bbf 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/kotlin/ru/mipt/npm/gradle/internal/publishing.kt b/src/main/kotlin/ru/mipt/npm/gradle/internal/publishing.kt index b8a3079..59d7de4 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/internal/publishing.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/internal/publishing.kt @@ -21,16 +21,20 @@ internal fun Project.setupPublication(vcs: String) = allprojects { configure { plugins.withId("org.jetbrains.kotlin.js") { - val kotlin = extensions.findByType()!! + val kotlin: KotlinJsProjectExtension = extensions.findByType()!! val sourcesJar: Jar by tasks.creating(Jar::class) { archiveClassifier.set("sources") - from(kotlin.sourceSets["main"].kotlin) + kotlin.sourceSets.forEach{ + from(it.kotlin) + } } publications { create("js", MavenPublication::class) { - from(components["kotlin"]) + kotlin.js().components.forEach { + from(it) + } artifact(sourcesJar) } } @@ -41,12 +45,16 @@ internal fun Project.setupPublication(vcs: String) = allprojects { val sourcesJar: Jar by tasks.creating(Jar::class) { archiveClassifier.set("sources") - from(kotlin.sourceSets["main"].kotlin) + kotlin.sourceSets.forEach{ + from(it.kotlin) + } } publications { create("jvm", MavenPublication::class) { - from(components["kotlin"]) + kotlin.target.components.forEach { + from(it) + } artifact(sourcesJar) } }