Skip to content

Commit be0655c

Browse files
committed
Use embedded function to create jars
1 parent 122ea8f commit be0655c

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

build.gradle.kts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,9 @@ tasks {
3131
}
3232
}
3333

34-
create<Jar>("sourcesJar") {
35-
destinationDirectory.set(rootProject.layout.buildDirectory.file("libs").get().asFile)
36-
37-
archiveClassifier.set("sources")
38-
39-
from(sourceSets.main.get().allSource)
40-
from(processResources.get().outputs)
41-
from(getByName("includeReadmeAndLicense").outputs)
34+
java {
35+
withSourcesJar()
36+
withJavadocJar()
4237
}
4338

4439
jar {
@@ -80,7 +75,6 @@ publishing {
8075
version = rootProject.version.toString()
8176

8277
from(components.getByName("java"))
83-
artifact(tasks.getByName("sourcesJar"))
8478

8579
pom {
8680
name.set(artifactId)

0 commit comments

Comments
 (0)