1515 */
1616
1717/* *******************************/
18- /* gradleVersion = '9.4.1 ' */
18+ /* gradleVersion = '9.7.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.6.1 '
23+ id ' com.github.spotbugs' version ' 6.5.10 '
24+ id ' org.jreleaser' version ' 1.25 .0'
25+ id ' com.diffplug.spotless' version ' 8.9 .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 '
55- api ' org.bouncycastle:bcprov-jdk18on:1.84 '
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.1 '
54+ api ' com.fasterxml.jackson.core:jackson-databind:2.22.1 '
55+ api ' org.bouncycastle:bcprov-jdk18on:1.85.2 '
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.1 '
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.3 '
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'
@@ -168,6 +176,16 @@ project(':api') {
168176 dependsOn tasks. named(' shadowJar' )
169177 }
170178
179+ tasks. named(' shadowJar' , com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar ) {
180+ // okhttp/okio/kotlin-stdlib each ship a distinct META-INF/*.kotlin_module marker file.
181+ // Shadow's KotlinModuleMetadataTransformer expects to see every duplicate, but the
182+ // default EXCLUDE strategy would drop them beforehand; WARN lets the transformer run
183+ // and still logs if a real duplicate ever shows up (gradleup.com/shadow/configuration/merging).
184+ filesMatching(' META-INF/*.kotlin_module' ) {
185+ duplicatesStrategy = DuplicatesStrategy . WARN
186+ }
187+ }
188+
171189 tasks. withType(Jar ). configureEach {
172190 doLast {
173191 def jarFile = archiveFile. get(). asFile
@@ -226,7 +244,7 @@ project(':api') {
226244 }
227245
228246 signing {
229- required {
247+ required = {
230248 gradle. taskGraph. allTasks. any { it. name. contains(' LocalMavenWithChecksums' ) }
231249 }
232250 sign publishing. publications. minioJava
@@ -246,7 +264,7 @@ project(':adminapi') {
246264
247265 dependencies {
248266 api project(' :api' )
249- api ' com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.21.2 '
267+ api ' com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.1 '
250268 testImplementation project(' :api' )
251269 }
252270
@@ -288,6 +306,16 @@ project(':adminapi') {
288306 dependsOn tasks. named(' shadowJar' )
289307 }
290308
309+ tasks. named(' shadowJar' , com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar ) {
310+ // okhttp/okio/kotlin-stdlib each ship a distinct META-INF/*.kotlin_module marker file.
311+ // Shadow's KotlinModuleMetadataTransformer expects to see every duplicate, but the
312+ // default EXCLUDE strategy would drop them beforehand; WARN lets the transformer run
313+ // and still logs if a real duplicate ever shows up (gradleup.com/shadow/configuration/merging).
314+ filesMatching(' META-INF/*.kotlin_module' ) {
315+ duplicatesStrategy = DuplicatesStrategy . WARN
316+ }
317+ }
318+
291319 tasks. withType(Jar ). configureEach {
292320 doLast {
293321 def jarFile = archiveFile. get(). asFile
@@ -346,7 +374,7 @@ project(':adminapi') {
346374 }
347375
348376 signing {
349- required {
377+ required = {
350378 gradle. taskGraph. allTasks. any { it. name. contains(' LocalMavenWithChecksums' ) }
351379 }
352380 sign publishing. publications. minioJava
@@ -355,7 +383,7 @@ project(':adminapi') {
355383
356384project(' :examples' ) {
357385 dependencies {
358- compileOnly ' me.tongfei:progressbar:0.9.5 '
386+ compileOnly ' me.tongfei:progressbar:0.10.2 '
359387 compileOnly project(' :api' )
360388 }
361389
@@ -367,14 +395,17 @@ project(':examples') {
367395 main {
368396 java {
369397 srcDirs = [" $rootDir /examples" ]
398+ // srcDir is the module root, which also contains build/; keep generated
399+ // files (e.g. Spotless lint output) out of compilation.
400+ exclude ' build/**'
370401 }
371402 }
372403 }
373404}
374405
375406project(' :functional' ) {
376407 dependencies {
377- implementation ' org.junit.jupiter:junit-jupiter-api:5.14.3 '
408+ implementation ' org.junit.jupiter:junit-jupiter-api:5.14.4 '
378409 implementation project(' :api' )
379410 implementation project(' :adminapi' )
380411 }
@@ -387,6 +418,9 @@ project(':functional') {
387418 main {
388419 java {
389420 srcDirs = [" $rootDir /functional" ]
421+ // srcDir is the module root, which also contains build/; keep generated
422+ // files (e.g. Spotless lint output) out of compilation.
423+ exclude ' build/**'
390424 }
391425 }
392426 }
0 commit comments