-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgradle.properties
More file actions
61 lines (55 loc) · 4.29 KB
/
Copy pathgradle.properties
File metadata and controls
61 lines (55 loc) · 4.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# ── Gradle daemon JVM (build tooling) ────────────────────────────────────────
# ParallelGC > G1GC for batch/throughput workloads like compilation.
# G1GC is for latency-sensitive interactive apps; build tools are batch.
# MaxMetaspaceSize was 768m until 2026-08-13, when a `:desktopApp:hotRunDesktop` run on this
# 36-module tree exhausted it outright: "Daemon will be stopped at the end of the build after
# running out of JVM Metaspace ... the configured max metaspace is '768 MiB'". The daemon dying
# mid-session is the expensive failure — every following build pays a cold start. 1536m is the
# value HireSignal already arrived at for the same reason (FIR/IR actualization + KSP across the
# iOS targets); Mileway has strictly more modules, so it had no business running a smaller cap.
org.gradle.jvmargs=-Xmx4g -Xms1g -XX:MaxMetaspaceSize=1536m -XX:+UseParallelGC -Dfile.encoding=UTF-8
# ── Kotlin compiler daemon (separate JVM; omitting causes OOM on KMP+iOS builds) ──
# MaxMetaspaceSize mirrors HireSignal: the Kotlin daemon is a SEPARATE JVM, so the cap above does
# not apply to it, and an uncapped default is what produced "OutOfMemoryError: Metaspace" there.
kotlin.daemon.jvmargs=-Xmx3g -XX:MaxMetaspaceSize=2g
# ── Build parallelism and caching ────────────────────────────────────────────
org.gradle.parallel=true
org.gradle.caching=true
# configureondemand deliberately NOT enabled: the Kotlin Multiplatform plugin emits
# "Kotlin targets do not support Configuration on Demand ... may lead to unpredictable and
# inconsistent behaviour" (KT-52074) for EVERY KMP module in this build, not just wasmJs. The
# configuration cache below already provides the speedup CoD was there for, without the warning or
# the correctness caveat.
# Configuration cache, skips the config phase on subsequent runs (80-90% speedup).
# `problems=fail`, not `warn`: warn mode would let a future plugin bump silently degrade every
# build with no CI signal. If a genuinely CC-breaking plugin has to be added back
# (google-services, firebase-perf, kapt and GnuPG signing are the known offenders), flip this to
# `warn` in that same change so the reason is on the record.
#
# Corrected 2026-08-05: this used to claim a full local gate reports "ZERO configuration-cache
# problems today". That was false. `:app:verifyNoGmsDependencyPrefixes` could not execute at all
# under the configuration cache, and because `problems=fail` is set here and that task is wired
# into `assembleNoGmsRelease`, the next F-Droid release build would have failed. It stayed
# invisible because nothing in routine CI runs `check` or `assembleNoGmsRelease` — both release
# workflows are tag-triggered. Fixed in the same change that corrected this comment. The lesson
# is the claim, not the bug: "zero problems" was written from a gate that never covered the task.
org.gradle.configuration-cache=true
org.gradle.configuration-cache.problems=fail
# ── Android ───────────────────────────────────────────────────────────────────
android.useAndroidX=true
android.enableJetifier=false
android.nonTransitiveRClass=true
# Non-final R fields, better incremental compilation; default in AGP 8.0+ but explicit here.
android.nonFinalResIds=true
# BuildConfig is disabled by default in AGP 9.0 (the property was removed; false is hardcoded).
# Modules that need it must add: buildFeatures { buildConfig = true }
# ── Kotlin compiler ───────────────────────────────────────────────────────────
kotlin.incremental=true
# kotlin.incremental.useClasspathSnapshot removed in Kotlin 2.x, ABI snapshots are always on.
# Incremental Kotlin/Native klib recompilation (experimental; stable in Kotlin 2.x).
kotlin.incremental.native=true
kotlin.mpp.stability.nowarn=true
# Write per-task build timing reports to build/kotlin-build-report/ for diagnosing slow tasks.
kotlin.build.report.output=file
# Bleeding-edge: parallel configuration cache
org.gradle.configuration-cache.parallel=true