Modern Apps git

← Modern-Apps.git

reduce gradle memory to fit github actions runners

Commit
301b81cf969dd3aaab53932323b14e03de3960b8
Author
Vayun Mathur <[email protected]>
When
2026-05-30 20:50 UTC (6 months ago)
Parents
65d4bc5

Diff

.github/workflows/android.yml
diff --git a/.github/workflows/android.yml b/.github/workflows/android.ymlindex 1a7c83c983..8f3d4cbbe0 100644--- a/.github/workflows/android.yml+++ b/.github/workflows/android.yml@@ -117,23 +117,9 @@ jobs:           git commit -m "chore: prepare release $VERSION_NAME" || echo "No changes to commit"           git tag "$VERSION_NAME" -      - name: Build and Sign APKs (Parallel & No Lint)+      - name: Build and Sign APKs         run: |-          # Construct the list of tasks (e.g., :app:assembleRelease :module2:assembleRelease)-          TASKS=""-          for dir in ${{ env.module_dirs }}; do-            gradle_path=$(echo $dir | sed 's|/|:|g')-            TASKS="$TASKS :$gradle_path:assembleRelease"-          done--          echo "Starting parallel build for tasks: $TASKS"--          # Flags explained:-          # -x lint: Skips the Android Lint task-          # -x test: Skips unit tests-          # --parallel: Builds modules in parallel-          ./gradlew $TASKS \-            --parallel \+          ./gradlew assembleRelease \             --no-daemon \             -x lint \             -x test \
gradle.properties
diff --git a/gradle.properties b/gradle.propertiesindex 45d97c89a9..2f7efac5cb 100644--- a/gradle.properties+++ b/gradle.properties@@ -1,11 +1,11 @@-# Tuned for a 48GB machine — generous Gradle + Kotlin daemon heaps so big-# modules (maps, photos, youpipe) don't OOM on full builds.-org.gradle.jvmargs=-Xmx16g -Xms2g -XX:MaxMetaspaceSize=2g -Dfile.encoding=UTF-8-kotlin.daemon.jvm.options=-Xmx12g+# Tuned to fit GitHub Actions runners (7GB RAM). Gradle + Kotlin daemon heaps+# combined stay well under the limit while still building all modules.+org.gradle.jvmargs=-Xmx3584m -Xms512m -XX:MaxMetaspaceSize=512m -XX:+UseG1GC -Dfile.encoding=UTF-8+kotlin.daemon.jvm.options=-Xmx1536m  # Use more workers in parallel for multi-module compilation. org.gradle.parallel=true-org.gradle.workers.max=8+org.gradle.workers.max=4 org.gradle.caching=true  # Modern defaults