0.10.0 #16

Merged
altavir merged 17 commits from dev into master 2021-06-19 14:12:34 +03:00
2 changed files with 14 additions and 6 deletions
Showing only changes of commit 329bfa5881 - Show all commits

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists 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 zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@ -21,16 +21,20 @@ internal fun Project.setupPublication(vcs: String) = allprojects {
configure<PublishingExtension> { configure<PublishingExtension> {
plugins.withId("org.jetbrains.kotlin.js") { plugins.withId("org.jetbrains.kotlin.js") {
val kotlin = extensions.findByType<KotlinJsProjectExtension>()!! val kotlin: KotlinJsProjectExtension = extensions.findByType<KotlinJsProjectExtension>()!!
val sourcesJar: Jar by tasks.creating(Jar::class) { val sourcesJar: Jar by tasks.creating(Jar::class) {
archiveClassifier.set("sources") archiveClassifier.set("sources")
from(kotlin.sourceSets["main"].kotlin) kotlin.sourceSets.forEach{
from(it.kotlin)
}
} }
publications { publications {
create("js", MavenPublication::class) { create("js", MavenPublication::class) {
from(components["kotlin"]) kotlin.js().components.forEach {
from(it)
}
artifact(sourcesJar) artifact(sourcesJar)
} }
} }
@ -41,12 +45,16 @@ internal fun Project.setupPublication(vcs: String) = allprojects {
val sourcesJar: Jar by tasks.creating(Jar::class) { val sourcesJar: Jar by tasks.creating(Jar::class) {
archiveClassifier.set("sources") archiveClassifier.set("sources")
from(kotlin.sourceSets["main"].kotlin) kotlin.sourceSets.forEach{
from(it.kotlin)
}
} }
publications { publications {
create("jvm", MavenPublication::class) { create("jvm", MavenPublication::class) {
from(components["kotlin"]) kotlin.target.components.forEach {
from(it)
}
artifact(sourcesJar) artifact(sourcesJar)
} }
} }