mirror of https://github.com/apache/kafka.git
KAFKA-17881 Apply the minJavaVersion to test code (#17610)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
parent
5a2d44ff4d
commit
7fe009b2e7
|
@ -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"))
|
||||||
|
|
Loading…
Reference in New Issue