Skip to content

Commit dbeeec8

Browse files
committed
feat: publish sources and jdoc
1 parent cfd9d19 commit dbeeec8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

build.gradle.kts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,22 @@ tasks.withType<Jar> {
6666
}
6767
}
6868

69+
val sourcesJar by tasks.creating(Jar::class) {
70+
archiveClassifier.set("sources")
71+
from(sourceSets.main.get().allSource)
72+
}
73+
74+
val javadocJar by tasks.creating(Jar::class) {
75+
archiveClassifier.set("javadoc")
76+
from(tasks.javadoc)
77+
}
78+
6979
publishing {
7080
publications {
7181
create<MavenPublication>("pub") {
7282
from(components["java"])
83+
artifact(tasks["sourcesJar"])
84+
artifact(tasks["javadocJar"])
7385

7486
pom {
7587
name.set(projectName)

0 commit comments

Comments
 (0)