Skip to content

Commit db94f90

Browse files
committed
Fix sources publication for Gradle plugin as mentioned in gradle/gradle#17760 (comment)
Fixes #310
1 parent 9bfc8dd commit db94f90

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

jupyter-lib/kotlin-jupyter-api-gradle-plugin/build.gradle.kts

+5-11
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ val saveVersion by tasks.registering {
4848
}
4949
}
5050

51+
java {
52+
withSourcesJar()
53+
withJavadocJar()
54+
}
55+
5156
tasks {
5257
processResources {
5358
dependsOn(saveVersion)
@@ -59,11 +64,6 @@ tasks {
5964
events("passed", "skipped", "failed")
6065
}
6166
}
62-
63-
register<Jar>("sourceJar") {
64-
archiveClassifier.set("sources")
65-
from(sourceSets.named("main").get().allSource)
66-
}
6767
}
6868

6969
val pluginName = "apiGradlePlugin"
@@ -97,12 +97,6 @@ pluginBundle {
9797
}
9898

9999
publishing {
100-
publications {
101-
withType<MavenPublication> {
102-
artifact(tasks["sourceJar"])
103-
}
104-
}
105-
106100
repositories {
107101
(rootProject.findProperty("localPublicationsRepo") as? java.nio.file.Path)?.let {
108102
maven {

0 commit comments

Comments
 (0)