JinwooHwang commented on code in PR #7930:
URL: https://github.com/apache/geode/pull/7930#discussion_r2384371147


##########
gradle.properties:
##########
@@ -64,18 +64,18 @@ geodeDockerImageName = geode:develop
 
 #JAVA_HOME to be used for compilation
 compileJVM=
-compileJVMVer=8
+compileJVMVer=17
 
 #JAVA_HOME to be used by tests
 testJVM=
-testJVMVer=8
+testJVMVer=17
 
 repeat = 100
 
 org.gradle.caching = true
 org.gradle.configureondemand = false
 org.gradle.daemon = true
-org.gradle.jvmargs = -Xmx3g
+org.gradle.jvmargs = -Xmx3g 
--add-exports=java.base/sun.security.x509=ALL-UNNAMED 
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED 
--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED 
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED 
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED 
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED 
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED 
--add-exports=java.management/com.sun.jmx.remote.security=ALL-UNNAMED

Review Comment:
   I am sorry @sboorlagadda. JDK compiler exports are required for Spotless 
removeUnusedImports step (uses Google Java Format internally)
   These CANNOT be moved to task-specific configuration because:
   - Spotless plugin doesn't expose JVM args configuration for its internal 
processes
   - Google Java Format runs in the same JVM as Gradle daemon, not a forked 
process
   - Module exports must be set at JVM startup time, not dynamically during 
execution
   - Gradle's org.gradle.jvmargs is the only mechanism that works for this use 
case 
   
   I moved Test,JavaExec, and Javadoc but could not move Spotless. So I 
reverted back to the original implementation. 



-- 
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]

Reply via email to