This is an automated email from the ASF dual-hosted git repository.

chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new e41373cef63 KAFKA-18242 The java code in core module is NOT configured 
with suitable release version (#18182)
e41373cef63 is described below

commit e41373cef630721c3719d73ed9086311c10c53f8
Author: TengYao Chi <[email protected]>
AuthorDate: Sat Dec 14 17:33:32 2024 +0800

    KAFKA-18242 The java code in core module is NOT configured with suitable 
release version (#18182)
    
    Reviewers: Ken Huang <[email protected]>, Chia-Ping Tsai 
<[email protected]>
---
 build.gradle | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/build.gradle b/build.gradle
index 78bf91d799f..2f734615f29 100644
--- a/build.gradle
+++ b/build.gradle
@@ -801,6 +801,11 @@ subprojects {
     scalaCompileOptions.additionalParameters += ["-Xfatal-warnings"]
     scalaCompileOptions.additionalParameters += ["--release", 
String.valueOf(releaseVersion)]
 
+    // Gradle does not support the `release` configuration when performing 
joint Java-Scala compilation.
+    // For more details, refer to 
https://github.com/gradle/gradle/issues/13762.
+    // As a result, we need to explicitly configure the Scala compiler with 
this setting.
+    options.compilerArgs += ["--release", String.valueOf(releaseVersion)]
+
     configureJavaCompiler(name, options, project.path)
 
     configure(scalaCompileOptions.forkOptions) {

Reply via email to