KAFKA-17881 Apply the minJavaVersion to test code (#17610)

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
Chia-Chuan Yu 2024-10-27 22:09:54 +08:00 committed by GitHub
parent 5a2d44ff4d
commit 7fe009b2e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -118,6 +118,7 @@ ext {
// ref: https://github.com/junit-team/junit5/blob/4c0dddad1b96d4a20e92a2cd583954643ac56ac0/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java#L161-L164 // ref: https://github.com/junit-team/junit5/blob/4c0dddad1b96d4a20e92a2cd583954643ac56ac0/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java#L161-L164
if (name == "compileTestJava" || name == "compileTestScala") { if (name == "compileTestJava" || name == "compileTestScala") {
options.compilerArgs << "-parameters" options.compilerArgs << "-parameters"
options.compilerArgs += ["--release", String.valueOf(minJavaVersion)]
} else if (name == "compileJava" || name == "compileScala") { } else if (name == "compileJava" || name == "compileScala") {
options.compilerArgs << "-Xlint:all" options.compilerArgs << "-Xlint:all"
if (!project.path.startsWith(":connect") && !project.path.startsWith(":storage")) if (!project.path.startsWith(":connect") && !project.path.startsWith(":storage"))