Use ProGuard to strip unused code in release builds (#2753)

This commit is contained in:
cketti 2017-11-10 22:54:31 +01:00 committed by Philip
parent f78ed69a88
commit a8c5327dcf
2 changed files with 26 additions and 0 deletions

View file

@ -77,6 +77,9 @@ android {
signingConfig signingConfigs.release
}
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "boolean", "DEVELOPER_MODE", "false"
}

23
k9mail/proguard-rules.pro vendored Normal file
View file

@ -0,0 +1,23 @@
# Add project specific ProGuard rules here.
-dontobfuscate
# Preserve the line number information for debugging stack traces.
-keepattributes SourceFile,LineNumberTable
# Library specific rules
-dontnote android.net.http.*
-dontnote org.apache.commons.codec.**
-dontnote org.apache.http.**
-dontnote com.squareup.moshi.**
-dontnote com.github.amlcurran.showcaseview.**
-dontnote de.cketti.safecontentresolver.**
-dontnote com.tokenautocomplete.**
-dontwarn okio.**
-dontwarn com.squareup.moshi.**
# Project specific rules
-dontnote com.fsck.k9.PRNGFixes
-dontnote com.fsck.k9.ui.messageview.**
-dontnote com.fsck.k9.view.**