File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff 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+
172190java {
173191 // Use Java 21 for compilation
174192 toolchain {
You can’t perform that action at this time.
0 commit comments