Skip to content

Commit

Permalink
Add consumer proguard rules
Browse files Browse the repository at this point in the history
This will automatically configure proguard for R8 shrinker users
  • Loading branch information
Josh Friend committed Oct 11, 2019
1 parent 8a742bd commit 602b3a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ Learn more at http://ocpsoft.org/prettytime/

Android
=======
To use prettytime in android, first add the following dependency to your app level build.gradle
To use prettytime in android, first add the following dependency to your app level build.gradle

compile 'org.ocpsoft.prettytime:prettytime:4.0.1.Final'
implementation 'org.ocpsoft.prettytime:prettytime:4.0.1.Final'

When using Android with ProGuard, you must add the following to your ProGuard configuration script:

-keep class org.ocpsoft.prettytime.i18n.**
ProGuard rules are automatically configured for you if you use the R8 shrinker (which is the default since version 3.4.0 of the Android Gradle Plugin). If you are using an older version of AGP, add the ProGuard rules from [this file](core/src/main/resources/META-INF/proguard/prettytime.pro)

DEVELOPMENT
===========
Expand Down
1 change: 1 addition & 0 deletions core/src/main/resources/META-INF/proguard/prettytime.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-keep class org.ocpsoft.prettytime.i18n.**

0 comments on commit 602b3a9

Please sign in to comment.