Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase memory used for forked compiler #1753

Merged
merged 3 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
# This is required to provide enough memory for recompilation
# (see also projects/neoforged/build.gradle, where the compile tasks is set to have enough memory when forked)
org.gradle.jvmargs=-Xmx2G
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.caching=true
Expand Down
5 changes: 5 additions & 0 deletions projects/neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ generateAccessTransformers {
)
}

tasks.withType(JavaCompile.class).configureEach {
Technici4n marked this conversation as resolved.
Show resolved Hide resolved
// Increase memory used during compilation, to avoid OutOfMemoryErrors
options.forkOptions.memoryMaximumSize = '2g'
}

sciwhiz12 marked this conversation as resolved.
Show resolved Hide resolved
tasks.withType(Javadoc.class).configureEach {
options.tags = [
'apiNote:a:<em>API Note:</em>',
Expand Down
Loading