Skip to content

Commit c39fc98

Browse files
committed
ADD: ProGuard rules for release build.
1 parent 431c41d commit c39fc98

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,3 @@ build
1414

1515
# OSX files
1616
.DS_Store
17-
18-
proguard-rules.pro

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ android {
3030
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3131
}
3232

33+
buildTypes {
34+
release {
35+
minifyEnabled true
36+
shrinkResources true
37+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
38+
}
39+
}
40+
3341
aaptOptions {
3442
noCompress "apk"
3543
}

proguard-rules.pro

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in E:/Android/sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
18+
19+
# Shrink only
20+
-dontobfuscate
21+
22+
# More debugging info (file name & line number)
23+
-renamesourcefileattribute SourceFile
24+
-keepattributes SourceFile,LineNumberTable

0 commit comments

Comments
 (0)