-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathgradle.properties
More file actions
69 lines (64 loc) · 3.6 KB
/
Copy pathgradle.properties
File metadata and controls
69 lines (64 loc) · 3.6 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
62
63
64
65
66
67
68
69
# --- JVM / encoding ---
# --sun-misc-unsafe-memory-access=allow: ktlint's embedded Kotlin compiler
# (kotlin-compiler-embeddable 2.2.x) still uses sun.misc.Unsafe accessors,
# which JDK 26 warns about (JEP 498). Remove once ktlint ships a compiler
# that uses VarHandles.
# MaxMetaspaceSize=4g: dual-flavor Kotlin compile + unit tests + lint + R8
# exhaust 2g (daemon expires mid-build with "running out of JVM Metaspace").
# Heap stays at 4g; this machine has headroom and sister apps hit the same wall.
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=4g -Dfile.encoding=UTF-8 -XX:+UseG1GC --sun-misc-unsafe-memory-access=allow
# Same JEP 498 opt-in for the forked Kotlin compile daemon.
# 3g heap: dual-flavor compile was faster than 2g on this 8-core/14GB box
# (compass full recompile 11s -> 8s); 4g overcommits when GMD qemu is up.
kotlin.daemon.jvmargs=-Xmx3g -XX:MaxMetaspaceSize=2g --sun-misc-unsafe-memory-access=allow
# Match the 8 physical cores. Measured: --max-workers=8 beat 4 on dual-flavor
# Kotlin compile (11s -> 8s). Stay at nproc; do not exceed RAM with GMD.
org.gradle.workers.max=8
android.useAndroidX=true
kotlin.code.style=official
android.nonTransitiveRClass=true
# --- AGP 9 R8 / DSL (explicit so AGP 8-era copies cannot silently regress) ---
# Full mode is the AGP 9 default; keep the pin so a stray =false cannot land.
android.enableR8.fullMode=true
# AGP 9.0 flipped these from false -> true (see AGP 9.0 release notes).
android.r8.optimizedResourceShrinking=true
android.r8.strictFullModeForKeepRules=true
# --- Project-specific override (CLAUDE.md) ---
# Build cache is on: task outputs (Kotlin, KSP, AGP) reuse across incremental
# runs and survive a manual ./build.sh --clean. Configuration cache stays OFF;
# AGP alpha + KSP + Hilt on this stack is not reliably CC-safe. Isolated
# Projects requires CC, so that stays off too.
org.gradle.caching=true
# org.gradle.configuration-cache=true <- intentionally OFF
# --- Gradle 9.6.0 perf knobs (safe subset) ---
# Parallel project execution; safe and orthogonal to config-cache.
org.gradle.parallel=true
# File-system watching is already on by default in 9.x; keep explicit so CI
# doesn't reset it.
org.gradle.vfs.watch=true
# Persistent Java compiler daemon (8.3+ Linux/macOS) - ~30% on Java-heavy builds.
org.gradle.daemon=true
# Long-lived daemons avoid cold-start on CI (default 3h idle).
org.gradle.daemon.idletimeout=10800000
# Daemon toolchain stability (9.2+) - drop the @Incubating warning and force
# the daemon JVM to match the project toolchain.
org.gradle.daemon.toolchain.enabled=true
org.gradle.java.installations.auto-detect=true
org.gradle.java.installations.auto-download=true
# --- Build-script compilation strictness ---
# Catches AGP/Compose/KSP deprecations at PR time. Combined with --warning-mode=all
# in CI it surfaces every new deprecation before it breaks the build.
org.gradle.kotlin.dsl.allWarningsAsErrors=true
org.gradle.warning.mode=all
# Actionable issues still fail the build; skip the incubating HTML tip line.
org.gradle.problems.report=false
# GMD lanes pass the experimental
# android.testoptions.manageddevices.emulator.gpu option on the CLI
# (build.sh GMD_GPU). AGP warns on every configure otherwise.
# Suppresses only that "experimental option in use" notice.
android.sync.suppressAgpWarnings=UNSUPPORTED_PROJECT_OPTION_USE
# dependency-analysis 3.17.0 declares AGP 8.10-9.2.1 as its tested range and
# prints a compatibility warning on our 9.4 alphas. This is the plugin's own
# opt-out for deliberately running ahead of that range (buildHealth works).
# REMOVE once a DAGP release lists AGP 9.4+ as supported.
dependency.analysis.compatibility=NONE