When I set GRADLE_OPTS
or JAVA_OPTS
, these are set for GradleWrapperMain
when I run ./gradlew build
for my project. But I need them to be set for GradleWorkerMain
as well.
How do I do that?
Here's the ps
listing when that Gradle job is running in Bamboo. My JAVA_OPTS
(such as -Dcool.opt=1
) is missing from GradleWorkerMain
.
53854 ? Sl 2:13 /home/apps/jdk7/bin/java -Dorg.gradle.daemon=false -Dcool.opt=1 -Xms1g -Xmx8g -XX:PermSize=256m -XX:MaxPermSize=768m -Djava.security.egd=file:/dev/./urandom -Dorg.gradle.appname=gradlew -classpath /path/to/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain build
54272 ? Sl 0:19 /home/apps/jdk1.7.0_45/bin/java -Dfile.encoding=ISO-8859-1 -cp /path/to/lots/of/jars.jar org.gradle.process.internal.launcher.GradleWorkerMain
-Dbamboo.buildKey=${bamboo.buildKey}
would do the trick. – Inn