Skip to content

Commit c828f15

Browse files
committed
Merge branch 'todo-mvp' into todo-mvp-loaders
2 parents 997cafc + 367f8f2 commit c828f15

File tree

3 files changed

+44
-6
lines changed

3 files changed

+44
-6
lines changed

todoapp/app/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ android {
1616

1717
buildTypes {
1818
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
2221
useProguard false
2322
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
23+
testProguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguardTest-rules.pro'
2424
}
2525

2626
release {
27-
// Disabled for now. TODO: fix proguard rules file.
28-
minifyEnabled false
29-
useProguard false
27+
minifyEnabled true
28+
useProguard true
3029
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
30+
testProguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguardTest-rules.pro'
3131
}
3232
}
3333

todoapp/app/proguard-rules.pro

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
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+
18
# For Guava:
29
-dontwarn javax.annotation.**
310
-dontwarn javax.inject.**
411
-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.**

todoapp/app/proguardTest-rules.pro

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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.**

0 commit comments

Comments
 (0)