-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-17811: Separate modules to use different JDKs #17522
base: trunk
Are you sure you want to change the base?
Conversation
ce2af51
to
1807f63
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@frankvicky thanks for this patch
@@ -128,7 +135,11 @@ ext { | |||
options.compilerArgs << "-Xlint:-serial" | |||
options.compilerArgs << "-Xlint:-try" | |||
options.compilerArgs << "-Werror" | |||
options.compilerArgs += ["--release", String.valueOf(minJavaVersion)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add minClientJavaVersion
and minServerJavaVersion
?
build.gradle
Outdated
@@ -116,6 +116,13 @@ ext { | |||
configureJavaCompiler = { name, options -> | |||
// -parameters generates arguments with parameter names in TestInfo#getDisplayName. | |||
// ref: https://github.com/junit-team/junit5/blob/4c0dddad1b96d4a20e92a2cd583954643ac56ac0/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java#L161-L164 | |||
|
|||
def modulesNeedingJava17 = [ | |||
":core", ":coordinator-common", ":generator", ":group-coordinator", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
connect:runtime
, connect:mirror
, connect:test-plugins
, and ``connect:file` should use JDK 17 as well
options.compilerArgs += ["--release", String.valueOf(17)] | ||
} else { | ||
options.compilerArgs += ["--release", String.valueOf(minJavaVersion)] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update scala module as well
build.gradle
Outdated
":metadata", ":raft", ":server", ":server-common", ":share", ":storage", | ||
":share-coordinator", ":test-common", ":tools", ":transaction-coordinator" | ||
] | ||
|
||
if (name == "compileTestJava" || name == "compileTestScala") { | ||
options.compilerArgs << "-parameters" | ||
options.compilerArgs += ["--release", String.valueOf(minJavaVersion)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this need to be updated too.
3d9b01a
to
35bc484
Compare
|
||
scalaCompileOptions.additionalParameters += ["-release", String.valueOf(minJavaVersion)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
streams-scala
and streams:test-utils
need java 11
@@ -47,7 +47,8 @@ plugins { | |||
|
|||
ext { | |||
gradleVersion = versions.gradle | |||
minJavaVersion = 11 | |||
minClientJavaVersion = 11 | |||
minServerJavaVersion = 17 | |||
buildVersionFileName = "kafka-version.properties" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please move modulesNeedingJava11
up to line#52?
modulesNeedingJava11 = [":clients", ":streams", ":streams:test-utils", ":streams-scala"]
build.gradle
Outdated
// -parameters generates arguments with parameter names in TestInfo#getDisplayName. | ||
// 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") { | ||
|
||
def releaseVersion = isModuleNeedJava11(projectPath) ? minClientJavaVersion : minServerJavaVersion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def releaseVersion = modulesNeedingJava11.any { projectPath == it } ? minClientJavaVersion : minServerJavaVersion
build.gradle
Outdated
@@ -726,7 +734,9 @@ subprojects { | |||
} | |||
|
|||
tasks.withType(ScalaCompile) { | |||
|
|||
def modulesNeedingJava11 = [":clients", ":streams", ":streams:test-utils", ":streams-scala"] | |||
def releaseVersion = modulesNeedingJava11.any { project.path.equals(it) } ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def releaseVersion = modulesNeedingJava11.any { project.path == it } ? minClientJavaVersion : minServerJavaVersion
Hi @chia7712 |
JIRA: KAFKA-17811
This is sub-task to drop broker and tools support for Java 11.
Committer Checklist (excluded from commit message)