Skip to content

Commit 204a91d

Browse files
committed
fix: fixed main jar mixes with -api jar
1 parent 482c039 commit 204a91d

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

build.gradle.kts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,17 @@ tasks {
106106
}
107107
}
108108

109+
tasks.named<Jar>("jar") {
110+
// Keep jar enabled for Maven publishing
111+
enabled = true
112+
// Add custom naming: v before version and -api before .jar
113+
if (version != "unspecified") {
114+
archiveFileName.set("${rootProject.name}-v${version}-api.jar")
115+
} else {
116+
archiveFileName.set("${rootProject.name}-api.jar")
117+
}
118+
}
119+
109120
java {
110121
// Use Java 21 for compilation
111122
toolchain {

0 commit comments

Comments
 (0)