Skip to content

Commit 0626f0b

Browse files
committed
build: allow obfuscation in play store release to further optimize app
1 parent 395969f commit 0626f0b

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

app/build.gradle.kts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ android {
5757
release {
5858
isMinifyEnabled = true
5959
isShrinkResources = true
60-
proguardFiles(
61-
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
62-
)
6360
}
6461
debug {
6562
applicationIdSuffix = ".debug"
@@ -71,10 +68,16 @@ android {
7168
create("foss") {
7269
dimension = "version"
7370
isDefault = true
71+
proguardFiles(
72+
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules-foss.pro"
73+
)
7474
}
7575
create("play") {
7676
dimension = "version"
7777
versionNameSuffix = "-play"
78+
proguardFiles(
79+
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules-play.pro"
80+
)
7881
}
7982
}
8083

File renamed without changes.

app/proguard-rules-play.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile

0 commit comments

Comments
 (0)