1515 */
1616
1717/* *******************************/
18- /* gradleVersion = '9.4.1 ' */
18+ /* gradleVersion = '9.6.0 ' */
1919/* *******************************/
2020
2121plugins {
22- id ' com.gradleup.shadow' version ' 9.0.0 '
23- id ' com.github.spotbugs' version ' 6.5.1 '
24- id ' org.jreleaser' version ' 1.23 .0'
25- id ' com.diffplug.spotless' version ' 6.13 .0'
22+ id ' com.gradleup.shadow' version ' 9.4.2 '
23+ id ' com.github.spotbugs' version ' 6.5.8 '
24+ id ' org.jreleaser' version ' 1.24 .0'
25+ id ' com.diffplug.spotless' version ' 8.7 .0'
2626}
2727
2828/* Root project definitions */
@@ -48,22 +48,26 @@ subprojects {
4848 dependencies {
4949 api ' com.carrotsearch.thirdparty:simple-xml-safe:2.7.1'
5050 api ' com.google.guava:guava:33.6.0-jre'
51- api ' com.squareup.okhttp3:okhttp:5.3.2 '
52- api ' com.fasterxml.jackson.core:jackson-annotations:2.21 '
53- api ' com.fasterxml.jackson.core:jackson-core:2.21.2 '
54- api ' com.fasterxml.jackson.core:jackson-databind:2.21.2 '
51+ api ' com.squareup.okhttp3:okhttp:5.4.0 '
52+ api ' com.fasterxml.jackson.core:jackson-annotations:2.22 '
53+ api ' com.fasterxml.jackson.core:jackson-core:2.22.0 '
54+ api ' com.fasterxml.jackson.core:jackson-databind:2.22.0 '
5555 api ' org.bouncycastle:bcprov-jdk18on:1.84'
5656 api ' org.apache.commons:commons-compress:1.28.0'
57- api ' commons-codec:commons-codec:1.21 .0'
57+ api ' commons-codec:commons-codec:1.22 .0'
5858 api ' org.xerial.snappy:snappy-java:1.1.10.8'
59- compileOnly ' com.github.spotbugs:spotbugs-annotations:4.9.8 '
59+ compileOnly ' com.github.spotbugs:spotbugs-annotations:4.10.2 '
6060
61- testImplementation ' com.squareup.okhttp3:mockwebserver:5.3.2 '
62- testImplementation ' org.junit.jupiter:junit-jupiter-api:5.14.3 '
61+ testImplementation ' com.squareup.okhttp3:mockwebserver:5.4.0 '
62+ testImplementation ' org.junit.jupiter:junit-jupiter-api:5.14.4 '
6363 }
6464
6565 [compileJava, compileTestJava]. each() {
6666 it. options. fork = true
67+ // Build runs on JDK 25 (see java.toolchain) but enforces the Java 8 API surface and
68+ // emits Java 8 bytecode via --release 8. --release also avoids the "source/target 8 is
69+ // obsolete" warning; -Xlint:-options is kept as a belt-and-braces guard for -Werror.
70+ it. options. release = 8
6771 it. options. compilerArgs + = [' -Xlint:unchecked' , ' -Xlint:deprecation' , ' -Xlint:-options' , ' -Werror' , ' -Xdiags:verbose' ]
6872 it. options. encoding = ' UTF-8'
6973 }
@@ -103,6 +107,10 @@ subprojects {
103107 check. dependsOn localeTest
104108
105109 java {
110+ // Compile/test/javadoc run on JDK 25; bytecode/API level pinned to Java 8 via release below.
111+ toolchain {
112+ languageVersion = JavaLanguageVersion . of(25 )
113+ }
106114 sourceCompatibility = JavaVersion . VERSION_1_8
107115 targetCompatibility = JavaVersion . VERSION_1_8
108116 }
@@ -112,7 +120,7 @@ subprojects {
112120 target ' **/*.java'
113121 importOrder ' edu' , ' com' , ' io' , ' java' , ' javax' , ' org' , ' '
114122 removeUnusedImports()
115- googleJavaFormat(' 1.7 ' )
123+ googleJavaFormat(' 1.35.0 ' )
116124 }
117125 groovyGradle {
118126 target ' *.gradle'
@@ -226,7 +234,7 @@ project(':api') {
226234 }
227235
228236 signing {
229- required {
237+ required = {
230238 gradle. taskGraph. allTasks. any { it. name. contains(' LocalMavenWithChecksums' ) }
231239 }
232240 sign publishing. publications. minioJava
@@ -346,7 +354,7 @@ project(':adminapi') {
346354 }
347355
348356 signing {
349- required {
357+ required = {
350358 gradle. taskGraph. allTasks. any { it. name. contains(' LocalMavenWithChecksums' ) }
351359 }
352360 sign publishing. publications. minioJava
@@ -355,7 +363,7 @@ project(':adminapi') {
355363
356364project(' :examples' ) {
357365 dependencies {
358- compileOnly ' me.tongfei:progressbar:0.9.5 '
366+ compileOnly ' me.tongfei:progressbar:0.10.2 '
359367 compileOnly project(' :api' )
360368 }
361369
@@ -367,14 +375,17 @@ project(':examples') {
367375 main {
368376 java {
369377 srcDirs = [" $rootDir /examples" ]
378+ // srcDir is the module root, which also contains build/; keep generated
379+ // files (e.g. Spotless lint output) out of compilation.
380+ exclude ' build/**'
370381 }
371382 }
372383 }
373384}
374385
375386project(' :functional' ) {
376387 dependencies {
377- implementation ' org.junit.jupiter:junit-jupiter-api:5.14.3 '
388+ implementation ' org.junit.jupiter:junit-jupiter-api:5.14.4 '
378389 implementation project(' :api' )
379390 implementation project(' :adminapi' )
380391 }
@@ -387,6 +398,9 @@ project(':functional') {
387398 main {
388399 java {
389400 srcDirs = [" $rootDir /functional" ]
401+ // srcDir is the module root, which also contains build/; keep generated
402+ // files (e.g. Spotless lint output) out of compilation.
403+ exclude ' build/**'
390404 }
391405 }
392406 }
0 commit comments