From 6694fe631409526ef51c71244a725d57e9d784bf Mon Sep 17 00:00:00 2001 From: tylercarberry Date: Fri, 29 Dec 2017 16:26:09 -0500 Subject: [PATCH] Enable proguard for the android app --- .gitignore | 2 ++ androidApp/.DS_Store | Bin 6148 -> 0 bytes androidApp/ACMAppAndroid.iml | 19 ------------- androidApp/app/build.gradle | 14 ++++++---- androidApp/app/proguard-rules.pro | 44 ++++++++++++++++++++---------- androidApp/build.gradle | 6 ++-- 6 files changed, 43 insertions(+), 42 deletions(-) delete mode 100644 androidApp/.DS_Store delete mode 100644 androidApp/ACMAppAndroid.iml diff --git a/.gitignore b/.gitignore index f43570c..39a142b 100644 --- a/.gitignore +++ b/.gitignore @@ -317,3 +317,5 @@ fastlane/report.xml fastlane/Preview.html fastlane/screenshots fastlane/test_output + +androidApp/keystore\.properties diff --git a/androidApp/.DS_Store b/androidApp/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/androidApp/app/build.gradle b/androidApp/app/build.gradle index b9b6f93..d7ba43a 100755 --- a/androidApp/app/build.gradle +++ b/androidApp/app/build.gradle @@ -36,16 +36,20 @@ android { } buildTypes { release { - // Before enabling Proguard, you must update the proguard rules to include Firebase - // See https://travis-ci.org/RowanACM/ACMAppAndroid/builds/203307727 - minifyEnabled false - - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + debuggable false signingConfig signingConfigs.release + + minifyEnabled true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { + debuggable true signingConfig signingConfigs.debug + minifyEnabled true + useProguard true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + applicationIdSuffix '.dev' versionNameSuffix '-dev' } diff --git a/androidApp/app/proguard-rules.pro b/androidApp/app/proguard-rules.pro index bc7ca78..cd94e8b 100755 --- a/androidApp/app/proguard-rules.pro +++ b/androidApp/app/proguard-rules.pro @@ -1,17 +1,31 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /Users/Tyler/Library/Android/sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html +# Project specific ProGuard rules +# See https://github.com/krschultz/android-proguard-snippets -# Add any project specific keep options here: +-dontobfuscate +-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*,!code/allocation/variable -# 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 *; -#} +# Retrofit 2.X +# https://square.github.io/retrofit/ +-dontwarn retrofit2.** +-keep class retrofit2.** { *; } +-keepattributes Signature +-keepattributes Exceptions +-keepclasseswithmembers class * { + @retrofit2.http.* ; +} + +# Okio +-keep class sun.misc.Unsafe { *; } +-dontwarn java.nio.file.* +-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement +-dontwarn okio.** + +# OkHttp +-dontwarn okhttp3.** +-dontwarn javax.annotation.* + +# Google Play Services +-dontwarn com.google.android.gms.** + +# Picasso +-dontwarn com.squareup.okhttp.** \ No newline at end of file diff --git a/androidApp/build.gradle b/androidApp/build.gradle index 692794c..ec05244 100755 --- a/androidApp/build.gradle +++ b/androidApp/build.gradle @@ -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.1.4-2' + ext.kotlin_version = '1.2.0' repositories { jcenter() mavenCentral() @@ -11,7 +11,7 @@ buildscript { // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files - classpath 'com.android.tools.build:gradle:3.0.0-beta7' + classpath 'com.android.tools.build:gradle:3.0.1' classpath 'com.google.gms:google-services:3.1.0' classpath 'com.github.triplet.gradle:play-publisher:1.1.5' classpath 'com.google.firebase:firebase-plugins:1.1.0' @@ -29,7 +29,7 @@ allprojects { } ext { - googlePlayServicesVersion = '11.4.2' + googlePlayServicesVersion = '11.8.0' supportLibVersion = '25.4.0' } }