Skip to content

Commit 96c69d4

Browse files
authored
Increase memory used for forked compiler (#1753)
1 parent 2f7ee38 commit 96c69d4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

gradle.properties

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
2-
# This is required to provide enough memory for the Minecraft decompilation process.
3-
org.gradle.jvmargs=-Xmx3G
2+
# This is required to provide enough memory for recompilation
3+
# (see also projects/neoforged/build.gradle, where the compile tasks is set to have enough memory when forked)
4+
org.gradle.jvmargs=-Xmx2G
45
org.gradle.daemon=true
56
org.gradle.parallel=true
67
org.gradle.caching=true

projects/neoforge/build.gradle

+5
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,11 @@ generateAccessTransformers {
222222
)
223223
}
224224

225+
tasks.withType(JavaCompile.class).configureEach {
226+
// Increase memory used during compilation, to avoid OutOfMemoryErrors
227+
options.forkOptions.memoryMaximumSize = '2g'
228+
}
229+
225230
tasks.withType(Javadoc.class).configureEach {
226231
options.tags = [
227232
'apiNote:a:<em>API Note:</em>',

0 commit comments

Comments
 (0)