Skip to content

Commit

Permalink
Enable minification for release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbakker committed Apr 12, 2024
1 parent 071e390 commit 20bdd47
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
.externalNativeBuild
.cxx
local.properties
app/release

3 changes: 2 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ android {
manifestPlaceholders = [providerAuthority: providerAuthority]
buildConfigField("String", "PROVIDER_AUTHORITY", "\"${providerAuthority}\"")

minifyEnabled false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand Down
26 changes: 7 additions & 19 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
-keepattributes LineNumberTable,SourceFile
-renamesourcefileattribute SourceFile
-dontobfuscate

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-dontwarn org.xmlpull.v1.**
-dontwarn android.content.res.**

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-keep class org.xmlpull.** { *; }
-keepclassmembers class org.xmlpull.** { *; }

0 comments on commit 20bdd47

Please sign in to comment.