Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable proguard for the android app #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -317,3 +317,5 @@ fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output

androidApp/keystore\.properties
Binary file removed androidApp/.DS_Store
Binary file not shown.
19 changes: 0 additions & 19 deletions androidApp/ACMAppAndroid.iml

This file was deleted.

14 changes: 9 additions & 5 deletions androidApp/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down
44 changes: 29 additions & 15 deletions androidApp/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -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.* <methods>;
}

# 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.**
6 changes: 3 additions & 3 deletions androidApp/build.gradle
Original file line number Diff line number Diff line change
@@ -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()
Expand All @@ -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'
Expand All @@ -29,7 +29,7 @@ allprojects {
}

ext {
googlePlayServicesVersion = '11.4.2'
googlePlayServicesVersion = '11.8.0'
supportLibVersion = '25.4.0'
}
}
Expand Down