Skip to content
This repository was archived by the owner on Oct 20, 2023. It is now read-only.

Commit 067b9ba

Browse files
committed
Only apply desugar rules on Release builds
1 parent 42c8d25 commit 067b9ba

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

app/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ android {
9090
}
9191

9292
tasks.withType(L8DexDesugarLibTask) {
93-
keepRulesFiles.from("desugar-rules.pro")
93+
if (it.name.contains("Release"))
94+
{
95+
keepRulesFiles.from("desugar-rules.pro")
96+
}
9497
}
9598
}
9699

app/desugar-rules.pro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# 此文件用于L8 Desugar Shrinking
22
# 包含整个Desugar Library, 以防止加载desugar的插件时已被加载的desugar class缺少方法
3+
# 只在 Release Build 中使用
34

4-
-keep class * { *; }
5-
-dontobfuscate
5+
-keepclassmembers class * { *; }

0 commit comments

Comments
 (0)