Enable proguard's minify and fix warnings to be able to create the apks.
This commit is contained in:
parent
21c6b776af
commit
5465dcaa44
3 changed files with 56 additions and 13 deletions
|
@ -28,15 +28,12 @@ android {
|
|||
}
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO Fix minify issues and enable again
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
// enable crashlytics
|
||||
ext.enableCrashlytics = true
|
||||
}
|
||||
debug {
|
||||
// TODO enabling minify breaks the debugger breakpoints, find a way to fix it and enable minify again
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
resValue("string", "PORT_NUMBER", "8082")
|
||||
|
|
58
app/proguard-rules.pro
vendored
58
app/proguard-rules.pro
vendored
|
@ -20,13 +20,59 @@
|
|||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
-dontwarn sun.misc.Unsafe
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
|
||||
-dontwarn org.bitcoinj.store**
|
||||
-dontwarn org.slf4j.**
|
||||
-dontwarn okhttp3.internal.platform.*
|
||||
###### itextpdf & opencsv
|
||||
-dontwarn java.awt.**
|
||||
-dontwarn javax.security.**
|
||||
-dontwarn java.beans.**
|
||||
|
||||
# Firabase Crashlytics
|
||||
-dontwarn com.itextpdf.awt.**
|
||||
-dontwarn javax.imageio.**
|
||||
|
||||
-keep class org.bouncycastle.**
|
||||
-dontwarn org.bouncycastle.**
|
||||
|
||||
-keep class org.spongycastle.** { *; }
|
||||
-dontwarn org.spongycastle.**
|
||||
|
||||
-keep class javax.xml.crypto.dsig.** { *; }
|
||||
-dontwarn javax.xml.crypto.dsig.**
|
||||
|
||||
-keep class org.apache.jcp.xml.dsig.internal.dom.** { *; }
|
||||
-dontwarn org.apache.jcp.xml.dsig.internal.dom.**
|
||||
|
||||
-keep class javax.xml.crypto.dom.** { *; }
|
||||
-dontwarn javax.xml.crypto.dom.**
|
||||
|
||||
-keep class org.apache.xml.security.utils.** { *; }
|
||||
-dontwarn org.apache.xml.security.utils.**
|
||||
|
||||
-keep class javax.xml.crypto.XMLStructure
|
||||
-dontwarn javax.xml.crypto.XMLStructure
|
||||
|
||||
|
||||
###### OkHttp
|
||||
# JSR 305 annotations are for embedding nullability information.
|
||||
-dontwarn javax.annotation.**
|
||||
|
||||
# A resource is loaded with a relative path so the package of this class must be preserved.
|
||||
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
|
||||
|
||||
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
||||
|
||||
# OkHttp platform used only on JVM and when Conscrypt dependency is available.
|
||||
-dontwarn okhttp3.internal.platform.ConscryptPlatform
|
||||
|
||||
|
||||
###### bitcoinj
|
||||
-dontwarn org.bitcoinj.store**
|
||||
|
||||
|
||||
###### ???
|
||||
-dontwarn org.slf4j.**
|
||||
|
||||
|
||||
###### Firabase Crashlytics
|
||||
-keepattributes *Annotation*
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
-keep public class * extends java.lang.Exception
|
|
@ -1,7 +1,7 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.20'
|
||||
ext.kotlin_version = '1.3.21'
|
||||
ext.nav_version = '1.0.0-beta01'
|
||||
repositories {
|
||||
google()
|
||||
|
@ -12,11 +12,11 @@ buildscript {
|
|||
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.3.0'
|
||||
classpath 'com.android.tools.build:gradle:3.3.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:$nav_version"
|
||||
classpath 'com.google.gms:google-services:4.2.0'
|
||||
classpath 'io.fabric.tools:gradle:1.27.0'
|
||||
classpath 'io.fabric.tools:gradle:1.27.1'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
|
Loading…
Reference in a new issue