Skip to content

Commit

Permalink
Make library AAR buildable with Proguard for release build type.
Browse files Browse the repository at this point in the history
  • Loading branch information
philliphsu committed Jun 13, 2017
1 parent 1c897a3 commit 6bcddcb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions bottomsheetpickers/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ android {
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
vectorDrawables.useSupportLibrary = true
// TODO: If we ever remove the duplicate number pad classes in this library and instead
// import our NumberPadTimePicker library, we can safely remove this line. The remaining
// classes in this library have no issue building with Proguard for release build type,
// so we don't have any exclusion rules to add.
consumerProguardFiles 'proguard-rules.pro'
}
}

Expand Down
4 changes: 4 additions & 0 deletions bottomsheetpickers/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# TODO: If we ever remove the duplicate number pad classes in this library and instead
# import our NumberPadTimePicker library, we can safely remove this line.
-dontwarn com.philliphsu.bottomsheetpickers.time.numberpad.**
3 changes: 2 additions & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ android {
}
buildTypes {
release {
minifyEnabled false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Expand Down

0 comments on commit 6bcddcb

Please sign in to comment.