Merge pull request #15038 from rmuir/java_ram

Give enough ram so javac won't OOM
This commit is contained in:
Robert Muir 2015-11-26 21:18:16 -05:00
commit 7d1903b01e
1 changed files with 2 additions and 0 deletions

View File

@ -288,10 +288,12 @@ class BuildPlugin implements Plugin<Project> {
project.tasks.withType(JavaCompile) { project.tasks.withType(JavaCompile) {
options.fork = true options.fork = true
options.forkOptions.executable = new File(project.javaHome, 'bin/javac') options.forkOptions.executable = new File(project.javaHome, 'bin/javac')
options.forkOptions.memoryMaximumSize = "1g"
/* /*
* -path because gradle will send in paths that don't always exist. * -path because gradle will send in paths that don't always exist.
* -missing because we have tons of missing @returns and @param. * -missing because we have tons of missing @returns and @param.
*/ */
// don't even think about passing args with -J-xxx, oracle will ask you to submit a bug report :)
options.compilerArgs << '-Werror' << '-Xlint:all,-path' << '-Xdoclint:all' << '-Xdoclint:-missing' options.compilerArgs << '-Werror' << '-Xlint:all,-path' << '-Xdoclint:all' << '-Xdoclint:-missing'
options.encoding = 'UTF-8' options.encoding = 'UTF-8'
} }