Skip to content

Commit e18701b

Browse files
committed
Fix publishing error on Maven.
1 parent 00898b9 commit e18701b

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

build.gradle

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,20 @@ ext.pluginClassNames = [
2727

2828
apply plugin: 'java'
2929
apply plugin: 'groovy'
30-
sourceCompatibility = 17
31-
targetCompatibility = 17
30+
31+
// Maven Central (Sonatype) requires -sources.jar and -javadoc.jar on close; same as attribute-match java.gradle
32+
java {
33+
sourceCompatibility = JavaVersion.VERSION_17
34+
targetCompatibility = JavaVersion.VERSION_17
35+
withSourcesJar()
36+
withJavadocJar()
37+
}
38+
39+
// Lombok @Builder inner types break strict javadoc; Central still requires a -javadoc.jar artifact
40+
tasks.withType(Javadoc).configureEach {
41+
failOnError = false
42+
options.encoding = 'UTF-8'
43+
}
3244

3345
scmVersion {
3446
ignoreUncommittedChanges = false

0 commit comments

Comments
 (0)