File tree Expand file tree Collapse file tree 3 files changed +44
-6
lines changed Expand file tree Collapse file tree 3 files changed +44
-6
lines changed Original file line number Diff line number Diff line change @@ -16,18 +16,18 @@ android {
16
16
17
17
buildTypes {
18
18
debug {
19
- // Disabled for now. TODO: fix proguard rules file.
20
- minifyEnabled false
21
- // Uses new built-in shrinker http://tools.android.com/tech-docs/new-build-system/built-in-shrinker+
19
+ minifyEnabled true
20
+ // Uses new built-in shrinker http://tools.android.com/tech-docs/new-build-system/built-in-shrinker
22
21
useProguard false
23
22
proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
23
+ testProguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguardTest-rules.pro'
24
24
}
25
25
26
26
release {
27
- // Disabled for now. TODO: fix proguard rules file.
28
- minifyEnabled false
29
- useProguard false
27
+ minifyEnabled true
28
+ useProguard true
30
29
proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
30
+ testProguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguardTest-rules.pro'
31
31
}
32
32
}
33
33
Original file line number Diff line number Diff line change
1
+ # Some methods are only called from tests, so make sure the shrinker keeps them.
2
+ -keep class com.example.android.architecture.blueprints.** { *; }
3
+
4
+ -keep class android.support.v4.widget.DrawerLayout { *; }
5
+ -keep class android.support.test.espresso.IdlingResource { *; }
6
+ -keep class com.google.common.base.Preconditions { *; }
7
+
1
8
# For Guava:
2
9
-dontwarn javax.annotation.**
3
10
-dontwarn javax.inject.**
4
11
-dontwarn sun.misc.Unsafe
12
+
13
+ # Proguard rules that are applied to your test apk/code.
14
+ -ignorewarnings
15
+
16
+ -keepattributes *Annotation*
17
+
18
+ -dontnote junit.framework.**
19
+ -dontnote junit.runner.**
20
+
21
+ -dontwarn android.test.**
22
+ -dontwarn android.support.test.**
23
+ -dontwarn org.junit.**
24
+ -dontwarn org.hamcrest.**
25
+ -dontwarn com.squareup.javawriter.JavaWriter
26
+ # Uncomment this if you use Mockito
27
+ -dontwarn org.mockito.**
Original file line number Diff line number Diff line change
1
+ # Proguard rules that are applied to your test apk/code.
2
+ -ignorewarnings
3
+
4
+ -keepattributes *Annotation*
5
+
6
+ -dontnote junit.framework.**
7
+ -dontnote junit.runner.**
8
+
9
+ -dontwarn android.test.**
10
+ -dontwarn android.support.test.**
11
+ -dontwarn org.junit.**
12
+ -dontwarn org.hamcrest.**
13
+ -dontwarn com.squareup.javawriter.JavaWriter
14
+ # Uncomment this if you use Mockito
15
+ -dontwarn org.mockito.**
You can’t perform that action at this time.
0 commit comments