-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathgradle.properties
More file actions
28 lines (23 loc) · 1.46 KB
/
Copy pathgradle.properties
File metadata and controls
28 lines (23 loc) · 1.46 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
# 基准环境为 GitHub Actions 公共仓库 runner:4 vCPU / 16 GB RAM / 14 GB SSD。
# 16GB 下 daemon 堆给 4096m,容纳 in-process Kotlin 编译与 R8 三 flavor 峰值。
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=1024m -XX:+UseParallelGC
# Kotlin 编译改 in-process:跑进 Gradle daemon,省掉独立的 Kotlin daemon JVM(再省一份内存)。
# 官方推荐策略之一,详见 kotlin.compiler.execution.strategy。
kotlin.compiler.execution.strategy=in-process
# 对齐 runner 的 4 vCPU;不设更高是因为 R8 三 flavor 同时压缩资源时内存会顶到 16GB 上限。
org.gradle.workers.max=4
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.daemon=true
# 配置缓存:缓存命中时直接跳过整个配置阶段(脚本编译 + 插件初始化与 task 图构建)。
# problems=warn 让不兼容项只告警不中断构建。
# 注意属性名:叫 configuration-cache(不是 configure-cache),写错不会报错而是默默失效。
org.gradle.configuration-cache=true
org.gradle.configuration-cache.problems=warn
android.useAndroidX=true
android.enableJetifier=true
# Jetifier 跳过 byte-buddy(mockk 传递依赖):其 1.18.x 是 multi-release jar,
# META-INF/versions/24/ 下类按 Java 24 编译(class file 68),Jetifier 内置 ASM 不支持。
# 它是纯 JVM 测试库、不引用 support 包,无需转换。
android.jetifier.ignorelist=byte-buddy,byte-buddy-agent
android.suppressUnsupportedCompileSdk=37