From 02011790b442b16f348f31cfc20d1586df6ec5ed Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 14 Dec 2017 14:25:49 +0100 Subject: [PATCH] enable proguard --- build.gradle | 14 ++++++++++++++ proguard-rules.pro | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 proguard-rules.pro diff --git a/build.gradle b/build.gradle index 1762892b7..b1ed2c231 100644 --- a/build.gradle +++ b/build.gradle @@ -87,6 +87,20 @@ android { free } + buildTypes { + release { + shrinkResources true + minifyEnabled true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + debug { + shrinkResources true + minifyEnabled true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + + if(new File("signing.properties").exists()) { Properties props = new Properties() diff --git a/proguard-rules.pro b/proguard-rules.pro new file mode 100644 index 000000000..c3ef891bd --- /dev/null +++ b/proguard-rules.pro @@ -0,0 +1,18 @@ +-dontobfuscate + +-keep class eu.siacs.conversations.** + +-keep class org.whispersystems.** + +-keep class com.kyleduo.switchbutton.Configuration + +-keep class com.soundcloud.android.crop.** + +-keep class com.google.android.gms.** + +-keep class org.openintents.openpgp.* + +-dontwarn org.bouncycastle.mail.** +-dontwarn org.bouncycastle.x509.util.LDAPStoreHelper +-dontwarn org.bouncycastle.jce.provider.X509LDAPCertStoreSpi +-dontwarn org.bouncycastle.cert.dane.**