File tree Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,9 @@ java {
160160 toolchain {
161161 languageVersion.set(JavaLanguageVersion .of(21 ))
162162 }
163+ // Automatically create sources and javadoc JARs
164+ withSourcesJar()
165+ withJavadocJar()
163166}
164167
165168kotlin {
@@ -177,19 +180,6 @@ tasks.withType<JavaCompile> {
177180 targetCompatibility = " 1.8"
178181}
179182
180- // Configure Kotlin sources jar
181- tasks.register<Jar >(" kotlinSourcesJar" ) {
182- archiveClassifier.set(" sources" )
183- from(sourceSets[" main" ].allSource)
184- }
185-
186- // Configure Javadoc jar
187- tasks.register<Jar >(" javadocJar" ) {
188- archiveClassifier.set(" javadoc" )
189- // For Kotlin projects, we can use an empty javadoc jar or generate KDoc
190- // Empty javadoc is acceptable for Maven Central
191- }
192-
193183// Publishing configuration
194184publishing {
195185 publications {
@@ -199,10 +189,7 @@ publishing {
199189 version = project.version.toString()
200190
201191 from(components[" java" ])
202-
203- // Include sources and javadoc
204- artifact(tasks.named(" kotlinSourcesJar" ))
205- artifact(tasks.named(" javadocJar" ))
192+ // Sources and Javadoc JARs are automatically included via withSourcesJar() and withJavadocJar()
206193
207194 pom {
208195 name.set(" Parsek" )
You can’t perform that action at this time.
0 commit comments