Skip to content

Commit b9e45b9

Browse files
committed
fix: fixed JAR names for javadoc and source
1 parent e0cb86b commit b9e45b9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

build.gradle.kts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,24 @@ tasks.named<Jar>("jar") {
169169
}
170170
}
171171

172+
tasks.named<Jar>("sourcesJar") {
173+
// Add custom naming: v before version and -api before .jar
174+
if (version != "unspecified") {
175+
archiveFileName.set("${rootProject.name}-v${version}-api-sources.jar")
176+
} else {
177+
archiveFileName.set("${rootProject.name}-api-sources.jar")
178+
}
179+
}
180+
181+
tasks.named<Jar>("javadocJar") {
182+
// Add custom naming: v before version and -api before .jar
183+
if (version != "unspecified") {
184+
archiveFileName.set("${rootProject.name}-v${version}-api-javadoc.jar")
185+
} else {
186+
archiveFileName.set("${rootProject.name}-api-javadoc.jar")
187+
}
188+
}
189+
172190
java {
173191
// Use Java 21 for compilation
174192
toolchain {

0 commit comments

Comments
 (0)