We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6baf7c8 commit e9b247eCopy full SHA for e9b247e
buildSrc/src/main/kotlin/pub-conventions.gradle.kts
@@ -22,15 +22,11 @@ publishing {
22
apply(plugin = "java-library")
23
24
// MPP projects pack their sources automatically, java libraries need to explicitly pack them
25
- val sources = tasks.register("sourcesJar", Jar::class) {
26
- archiveClassifier = "sources"
27
- from(sourceSets.named("main").get().allSource)
28
- }
+ project.extensions.getByType(JavaPluginExtension::class.java).withSourcesJar()
29
30
publications {
31
register("mavenJava", MavenPublication::class) {
32
from(components["java"])
33
- artifact(sources)
34
}
35
36
0 commit comments