Skip to content

Commit

Permalink
Fix issue with missing javadoc and sources jars
Browse files Browse the repository at this point in the history
  • Loading branch information
rickclephas committed Jun 11, 2023
1 parent 2b28d20 commit ff20f04
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
14 changes: 6 additions & 8 deletions kmp-nativecoroutines-compiler-embeddable/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ kotlin {
jvmToolchain(11)
}

java {
withJavadocJar()
withSourcesJar()
}

tasks.compileKotlin.configure {
dependsOn(syncSources)
kotlinOptions {
Expand All @@ -31,17 +36,10 @@ tasks.clean.configure {
delete("src")
}

val sourcesJar by tasks.registering(Jar::class) {
dependsOn(syncSources)
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}

publishing {
publications {
create<MavenPublication>("maven") {
from(components["kotlin"])
artifact(sourcesJar)
from(components["java"])
}
}
}
13 changes: 6 additions & 7 deletions kmp-nativecoroutines-compiler/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,21 @@ kotlin {
jvmToolchain(11)
}

java {
withJavadocJar()
withSourcesJar()
}

tasks.compileKotlin.configure {
kotlinOptions {
freeCompilerArgs = listOf("-Xjvm-default=all")
}
}

val sourcesJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}

publishing {
publications {
create<MavenPublication>("maven") {
from(components["kotlin"])
artifact(sourcesJar)
from(components["java"])
}
}
}

0 comments on commit ff20f04

Please sign in to comment.