This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git
The following commit(s) were added to refs/heads/main by this push:
new cde51b1 [SPARK-53670] Use `Gradle Java Toolchain`
cde51b1 is described below
commit cde51b18dab404ec54e5425566a23ec9a89c6b41
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Mon Sep 22 19:48:41 2025 -0700
[SPARK-53670] Use `Gradle Java Toolchain`
### What changes were proposed in this pull request?
This PR aims to use `Gradle Java Toolchain` to ensure to use JDK 17 API
Compatibility.
### Why are the changes needed?
In addition to `sourceCompatibility` and `targetCompatibility`, `Toolchain`
will ensure `--release` too.
### Does this PR introduce _any_ user-facing change?
No behavior change.
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #333 from dongjoon-hyun/SPARK-53670.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
build.gradle | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/build.gradle b/build.gradle
index fdb6e71..bed9d7a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -50,8 +50,13 @@ subprojects {
apply plugin: 'java'
java {
- sourceCompatibility = 17
- targetCompatibility = 17
+ toolchain {
+ languageVersion = JavaLanguageVersion.of(17)
+ }
+ }
+
+ tasks.withType(JavaCompile).configureEach {
+ options.release = 17
}
repositories {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]