-
Notifications
You must be signed in to change notification settings - Fork 0
/
gradle_
executable file
·54 lines (41 loc) · 1.72 KB
/
gradle_
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# L_VV
# Workaround script for fixing incompatibility Gradle 3.5 with JDK9-ea+162
JAVA_HOME="/usr/lib/jvm/JavaSE-9"
echo "JAVA_HOME=${JAVA_HOME}"
export JAVA_HOME
# ###################################################
GRADLE_HOME="/opt/java/deployment/gradle/gradle-3.5"
#GRADLE_HOME="/opt/java/deployment/gradle/gradle-4.0"
#GRADLE_HOME="/opt/java/deployment/gradle/gradle-4.1"
echo "GRADLE_HOME=${GRADLE_HOME}"
export GRADLE_HOME
# ###################################################
#JDK_JAVA_OPTIONS=--permit-illegal-access
# More "legal" way:
JDK_JAVA_OPTIONS="-Dsun.reflect.debugModuleAccessChecks=true \
-XX:+IgnoreUnrecognizedVMOptions \
--add-modules=java.se.ee \
--add-opens=java.base/java.lang=ALL-UNNAMED \
--add-opens=java.base/java.lang.annotation=ALL-UNNAMED
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED \
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
--add-opens=java.base/java.io=ALL-UNNAMED \
--add-opens=java.base/java.net=ALL-UNNAMED \
--add-opens=java.base/java.text=ALL-UNNAMED \
--add-opens=java.base/java.util=ALL-UNNAMED \
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED \
--add-opens=java.base/java.util.regex=ALL-UNNAMED \
--add-opens=java.base/java.util.jar=ALL-UNNAMED \
--add-opens=java.base/java.util.zip=ALL-UNNAMED \
--add-opens=java.base/javax.net=ALL-UNNAMED \
--add-opens=java.base/sun.net.www=ALL-UNNAMED \
--add-opens=java.base/sun.net.www.protocol.file=ALL-UNNAMED \
--add-opens=java.base/sun.nio.fs=ALL-UNNAMED \
--add-opens=java.base/java.security=ALL-UNNAMED"
#echo "JDK_JAVA_OPTIONS=${JDK_JAVA_OPTIONS}"
export JDK_JAVA_OPTIONS
# old variable name: _JAVA_OPTIONS
#echo "_JAVA_OPTIONS=${_JAVA_OPTIONS}"
#export _JAVA_OPTIONS
"$GRADLE_HOME/bin/gradle" "$@"