diff --git a/app/build.gradle b/app/build.gradle index 97e1bc60..8975a008 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,10 +11,13 @@ android { } buildTypes { + debug { + minifyEnabled true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' + } release { - minifyEnabled false - // minifyEnabled true - // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' + minifyEnabled true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } dexOptions { @@ -32,7 +35,7 @@ dependencies { compile 'org.apache.commons:commons-io:1.3.2' // Lombok for useful @helpers - compile 'org.projectlombok:lombok:1.14.8' + provided 'org.projectlombok:lombok:1.14.8' // ical4j for parsing/generating iCalendars compile 'org.mnode.ical4j:ical4j:1.0.6' diff --git a/app/proguard-rules.txt b/app/proguard-rules.txt new file mode 100644 index 00000000..e49b71a5 --- /dev/null +++ b/app/proguard-rules.txt @@ -0,0 +1,33 @@ + +# ProGuard usage for DAVdroid: +# shrinking yes - main reason for using ProGuard +# optimization no - too risky +# obfuscation no - DAVdroid is open-source +# preverification no (Android default) + +-dontobfuscate + + +# SimpleXML +-keep class org.simpleframework.** { *; } # keep all interfaces etc. to allow reflection +-dontwarn com.bea.xml.stream.** # StAX API not used +-dontwarn javax.xml.stream.** + +# ez-vcard +-dontwarn com.fasterxml.jackson.** # Jackson JSON Processor (for jCards) not used +-dontwarn freemarker.** # freemarker templating library (for creating hCards) not used +-dontwarn org.jsoup.** # jsoup library (for hCard parsing) not used +-dontwarn sun.misc.Perf + +# ical4j: ignore unused dynamic libraries +-dontwarn groovy.** # Groovy-based ContentBuilder not used +-dontwarn org.codehaus.groovy.** +-dontwarn org.apache.commons.logging.** # Commons logging is not available +-dontwarn net.fortuna.ical4j.model.** # ignore warnings from Groovy dependency + +# dnsjava +-dontwarn sun.net.spi.nameservice.** # not available on Android + +# DAVdroid +-keep class at.bitfire.davdroid.** { *; } # all DAVdroid code is required +