Skip to content

Commit 2be3000

Browse files
committed
Increase checkstyle heap size and reduce default metaspace size of gradle JVM
1 parent 052552f commit 2be3000

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Keep all these properties in sync unless you know what you are doing!
22
# We set '-Dlog4j2.disableJmx=true' to prevent classloader leaks triggered by the logger.
33
# (Some of these settings need to be repeated in the test.jvmArgs blocks of each module)
4-
org.gradle.jvmargs=-Dlog4j2.disableJmx -Xmx2g -XX:MaxMetaspaceSize=448m -XX:+HeapDumpOnOutOfMemoryError -Duser.language=en -Duser.country=US -Duser.timezone=UTC -Dfile.encoding=UTF-8
4+
org.gradle.jvmargs=-Dlog4j2.disableJmx -Xmx2g -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Duser.language=en -Duser.country=US -Duser.timezone=UTC -Dfile.encoding=UTF-8
55
toolchain.compiler.jvmargs=-Dlog4j2.disableJmx=true -Xmx2g -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Duser.language=en -Duser.country=US -Duser.timezone=UTC -Dfile.encoding=UTF-8
66
toolchain.javadoc.jvmargs=-Dlog4j2.disableJmx=true -Xmx2g -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Duser.language=en -Duser.country=US -Duser.timezone=UTC -Dfile.encoding=UTF-8
77
toolchain.launcher.jvmargs=-Dlog4j2.disableJmx=true -Xmx2g -XX:MaxMetaspaceSize=448m -XX:+HeapDumpOnOutOfMemoryError -Duser.language=en -Duser.country=US -Duser.timezone=UTC -Dfile.encoding=UTF-8

gradle/java-module.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,8 @@ tasks.checkstyleMain.source = 'src/main/java'
459459
tasks.checkstyleMain
460460
.exclude('org/hibernate/processor/util/NullnessUtil.java')
461461
.exclude('org/hibernate/internal/util/NullnessUtil.java')
462+
// For some big files we need more heap memory than the default 512m for parsing
463+
tasks.checkstyleMain.maxHeapSize = "640m"
462464

463465
// define a second checkstyle task for checking non-fatal violations
464466
task nonFatalCheckstyle(type:Checkstyle) {

0 commit comments

Comments
 (0)