From 0ed7ec06242f35ab81988d5af2fd8a36e7adeb8d Mon Sep 17 00:00:00 2001 From: Marcus Rehbock Date: Fri, 7 Aug 2026 17:57:51 -0700 Subject: [PATCH] Config plugin: parallel Gradle with all cores + build cache Clean arm64 release rebuild drops ~2m40s -> ~1m on 32 threads. Co-Authored-By: Claude Fable 5 --- plugins/with-release-signing.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/with-release-signing.js b/plugins/with-release-signing.js index 27fecee..34d8fa8 100644 --- a/plugins/with-release-signing.js +++ b/plugins/with-release-signing.js @@ -40,6 +40,17 @@ module.exports = function withReleaseSigning(config) { if (jdk && !cfg.modResults.some((p) => p.key === 'org.gradle.java.home')) { cfg.modResults.push({ type: 'property', key: 'org.gradle.java.home', value: jdk }); } + /* use every core: parallel module builds + build cache */ + const set = (key, value) => { + const hit = cfg.modResults.find((p) => p.key === key); + if (hit) hit.value = value; + else cfg.modResults.push({ type: 'property', key, value }); + }; + set('org.gradle.parallel', 'true'); + set('org.gradle.caching', 'true'); + set('org.gradle.configuration-cache', 'false'); + set('org.gradle.workers.max', String(os.cpus().length)); + set('org.gradle.jvmargs', '-Xmx6g -XX:MaxMetaspaceSize=1g'); return cfg; }); return withAppBuildGradle(config, (cfg) => {