Skip to content
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
3 changes: 3 additions & 0 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '**/*.gradle.kts'
- '**/*.java'
- '**/gradle-build.yml'
- 'gradle.properties'
pull_request:
branches: [ "master" ]
types: [opened, synchronize, reopened]
Expand All @@ -16,6 +17,7 @@ on:
- '**/*.gradle.kts'
- '**/*.java'
- '**/gradle-build.yml'
- 'gradle.properties'

permissions:
contents: write
Expand All @@ -39,6 +41,7 @@ jobs:
- 'gradle/wrapper/**'
- '**/*.gradle.kts'
- '**/gradle-build.yml'
- 'gradle.properties'

gradle-build:
name: Build project with Gradle
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
org.gradle.configuration-cache=true
org.gradle.caching=true
org.gradle.jvmargs=-Xmx4g -XX:+UseZGC

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While enabling ZGC can improve build performance by reducing GC pauses, hardcoding the heap size to 4GB (-Xmx4g) might be too high for some developer machines or CI environments with limited memory. This could lead to failures when starting the Gradle daemon if sufficient memory cannot be allocated.

To make this configuration more flexible, it's good practice to add a comment indicating that this value can be overridden in a user's personal ~/.gradle/gradle.properties file. This helps other contributors easily adapt the settings to their own environment.

org.gradle.jvmargs=-Xmx4g -XX:+UseZGC # Override in ~/.gradle/gradle.properties for different memory requirements