Skip to content

Commit

Permalink
Fix sources publication for Gradle plugin as mentioned in gradle/grad…
Browse files Browse the repository at this point in the history
  • Loading branch information
ileasile committed Jul 19, 2021
1 parent 845345a commit 58e66dc
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions jupyter-lib/kotlin-jupyter-api-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ val saveVersion by tasks.registering {
}
}

java {
withSourcesJar()
withJavadocJar()
}

tasks {
processResources {
dependsOn(saveVersion)
Expand All @@ -59,11 +64,6 @@ tasks {
events("passed", "skipped", "failed")
}
}

register<Jar>("sourceJar") {
archiveClassifier.set("sources")
from(sourceSets.named("main").get().allSource)
}
}

val pluginName = "apiGradlePlugin"
Expand Down Expand Up @@ -97,12 +97,6 @@ pluginBundle {
}

publishing {
publications {
withType<MavenPublication> {
artifact(tasks["sourceJar"])
}
}

repositories {
(rootProject.findProperty("localPublicationsRepo") as? java.nio.file.Path)?.let {
maven {
Expand Down

0 comments on commit 58e66dc

Please sign in to comment.