Revert "speed up javac and error-prone tasks by using less resources (#11927)"

This reverts commit deab699188.

Having a shitty day: git lost changes :(
This commit is contained in:
Robert Muir 2022-11-15 19:08:43 -05:00
parent deab699188
commit 0753f48a80
No known key found for this signature in database
GPG Key ID: 817AE1DD322D7ECA
5 changed files with 6 additions and 14 deletions

View File

@ -24,7 +24,7 @@ plugins {
id "org.owasp.dependencycheck" version "7.2.0" id "org.owasp.dependencycheck" version "7.2.0"
id 'de.thetaphi.forbiddenapis' version '3.4' apply false id 'de.thetaphi.forbiddenapis' version '3.4' apply false
id "de.undercouch.download" version "5.2.0" apply false id "de.undercouch.download" version "5.2.0" apply false
id "net.ltgt.errorprone" version "3.0.1" apply false id "net.ltgt.errorprone" version "2.0.2" apply false
id 'com.diffplug.spotless' version "6.5.2" apply false id 'com.diffplug.spotless' version "6.5.2" apply false
id 'org.barfuin.gradle.jacocolog' version "3.0.0-RC2" apply false id 'org.barfuin.gradle.jacocolog' version "3.0.0-RC2" apply false
} }

View File

@ -68,7 +68,7 @@ systemProp.file.encoding=UTF-8
# The heap seems huge but gradle runs out of memory on lower values (don't know why). # The heap seems huge but gradle runs out of memory on lower values (don't know why).
# #
# We also open up internal compiler modules for spotless/ google java format. # We also open up internal compiler modules for spotless/ google java format.
org.gradle.jvmargs=-Xmx3g -XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 \\ org.gradle.jvmargs=-Xmx3g \\
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \\ --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \\
--add-exports jdk.compiler/com.sun.tools.javac.file=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.parser=ALL-UNNAMED \\

View File

@ -19,8 +19,7 @@
allprojects { allprojects {
def vmOpts = [ def vmOpts = [
'-XX:+UseParallelGC', '-XX:+UseParallelGC',
'-XX:TieredStopAtLevel=1', '-XX:TieredStopAtLevel=1'
'-XX:ActiveProcessorCount=1'
] ]
// Inject vm options into custom javadoc rendering. We can't refer // Inject vm options into custom javadoc rendering. We can't refer
@ -39,11 +38,4 @@ allprojects {
jvmArgs += vmOpts jvmArgs += vmOpts
} }
}
// Tweak javac to not be too resource-hungry.
// This applies to any JVM when javac runs forked (e.g. error-prone)
// Avoiding the fork entirely is best.
tasks.withType(JavaCompile) { JavaCompile task ->
task.options.forkOptions.jvmArgs += vmOpts
}
}

View File

@ -47,7 +47,7 @@ allprojects {
description: "Number of forked test JVMs"], description: "Number of forked test JVMs"],
[propName: 'tests.haltonfailure', value: true, description: "Halt processing on test failure."], [propName: 'tests.haltonfailure', value: true, description: "Halt processing on test failure."],
[propName: 'tests.jvmargs', [propName: 'tests.jvmargs',
value: { -> propertyOrEnvOrDefault("tests.jvmargs", "TEST_JVM_ARGS", "-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1") }, value: { -> propertyOrEnvOrDefault("tests.jvmargs", "TEST_JVM_ARGS", "-XX:TieredStopAtLevel=1") },
description: "Arguments passed to each forked JVM."], description: "Arguments passed to each forked JVM."],
// Other settings. // Other settings.
[propName: 'tests.neverUpToDate', value: true, [propName: 'tests.neverUpToDate', value: true,

View File

@ -47,7 +47,7 @@ separately from the gradle workers, for example:
tests.jvms=3 tests.jvms=3
tests.heapsize=512m tests.heapsize=512m
tests.minheapsize=512m tests.minheapsize=512m
tests.jvmargs=-XX:+UseParallelGC -XX:TieredStopAtLevel=1 -XX:ActiveProcessorCount=1 tests.jvmargs=-XX:+UseParallelGC -XX:TieredStopAtLevel=1
Gradle Daemon Gradle Daemon
------------- -------------