JinwooHwang commented on code in PR #7930:
URL: https://github.com/apache/geode/pull/7930#discussion_r2371993150
##########
build-tools/scripts/src/main/groovy/geode-java.gradle:
##########
@@ -31,17 +31,26 @@ dependencies {
}
String javaVersion = System.properties['java.version']
-if (javaVersion.startsWith("1.8.0") &&
javaVersion.split("-")[0].split("_")[1].toInteger() < 121) {
- throw new GradleException("Java version 1.8.0_121 or later required, but was
" + javaVersion)
+def versionMajor = JavaVersion.current().majorVersion.toInteger()
+if (versionMajor < 17) {
+ throw new GradleException("Java version 17 or later required, but was " +
javaVersion)
}
// apply compiler options
gradle.taskGraph.whenReady({ graph ->
tasks.withType(JavaCompile).each { javac ->
javac.configure {
- sourceCompatibility '1.8'
- targetCompatibility '1.8'
+ sourceCompatibility '17'
+ targetCompatibility '17'
options.encoding = 'UTF-8'
+ options.compilerArgs.addAll([
+
'--add-exports=java.management/com.sun.jmx.remote.security=ALL-UNNAMED',
+ '--add-exports=java.base/sun.nio.ch=ALL-UNNAMED',
+ '--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED',
+ '--add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED',
+ '-Xlint:-removal',
+ '-Xlint:-deprecation'
+ ])
Review Comment:
Excellent point, @raboof . We should be able to address that with
https://issues.apache.org/jira/browse/GEODE-10479. I would appreciate your
insight. Thank you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]