Skip to content

Commit

Permalink
Wear release to use proguard minification
Browse files Browse the repository at this point in the history
  • Loading branch information
jamorham committed Oct 17, 2016
1 parent e2fc620 commit d82bd45
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 3 deletions.
4 changes: 2 additions & 2 deletions wear/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ android {
}
buildTypes {
release {
minifyEnabled false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Expand All @@ -40,7 +41,6 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.ustwo.android:clockwise-wearable:1.0.2'
//compile 'com.google.android.support:wearable:1.1.0'
compile 'com.google.android.support:wearable:1.4.0'
compile 'com.google.android.gms:play-services-wearable:9.4.0'
compile 'com.google.code.gson:gson:2.4'
Expand Down
42 changes: 41 additions & 1 deletion wear/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/stephenblack/Library/Android/sdk/tools/proguard/proguard-android.txt
# in /Users/stephenblack/adt-bundle-mac-x86_64-20140702 2/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
Expand All @@ -15,3 +15,43 @@
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

-dontwarn retrofit.**
-keep class retrofit.** { *; }
-keepattributes Signature
-keepattributes Exceptions
-keepattributes InnerClasses
-keepattributes *Annotation*

-dontobfuscate

-dontwarn com.nightscout.**
-dontwarn com.squareup.**
-dontwarn net.tribe7.**
-dontwarn com.mongodb.**
-dontwarn com.google.common.**
-dontwarn okio.**
-dontwarn org.bson.**
-dontwarn org.slf4j.**
-dontwarn rx.internal.util.**
-dontwarn org.apache.commons.**
-dontwarn uk.com.robust-it.**
-dontwarn com.rits.cloning.**
-dontwarn obj.objenesis.instantiator.sun.**
-dontwarn obj.objenesis.instantiator.sun.UnsafeFactoryInstantiator
-dontwarn sun.misc.Unsafe
-dontwarn ar.com.hjg.pngj.**

-keep class com.nightscout.** { *; }
-keep class com.squareup.** { *; }
-keep class net.tribe7.** { *; }
-keep class com.mongodb.** { *; }
-keep class com.google.common.** { *; }
-keep class okay.** { *; }
-keep class org.bson.** { *; }
-keep class org.slf4j.** { *; }
-keep class rx.internal.util.** { *; }
-keep class sun.misc.Unsafe { *; }
-keep class com.eveningoutpost.dexdrip.Models.** { *; }
-keep class ar.com.hjg.pngj.** { *; }
-keep class android.support.v7.widget.SearchView { *; }

0 comments on commit d82bd45

Please sign in to comment.