osmith submitted this change.
gradlew: fix "Unrecognized option: --add-opens"
Comment out the code that causes the following errors during build:
+ ./gradlew test
Unrecognized option: --add-opens
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
The build did not abort but this is distracting.
Change-Id: I788e44cfe20ba6a331e8247677ecb5a526c433f7
---
M gradlew
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/gradlew b/gradlew
index 17a9170..f03a59b 100755
--- a/gradlew
+++ b/gradlew
@@ -162,9 +162,10 @@
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
-if $JAVACMD --add-opens java.base/java.lang=ALL-UNNAMED -version ; then
- DEFAULT_JVM_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED $DEFAULT_JVM_OPTS"
-fi
+# NOTE: commented out as this doesn't work with openjdk-8
+# if $JAVACMD --add-opens java.base/java.lang=ALL-UNNAMED -version ; then
+# DEFAULT_JVM_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED $DEFAULT_JVM_OPTS"
+# fi
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
To view, visit change 39583. To unsubscribe, or for help writing mail filters, visit settings.