Add Proguard setup section on README

Add Proguard rules for Android projects so it can be referenced right away.
This commit is contained in:
Eliseo Ocampos 2018-01-04 10:09:37 -03:00 committed by GitHub
parent 44faaca422
commit b1001f6e7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 0 deletions

View File

@ -136,6 +136,29 @@ try {
//don't trust the JWT!
}
```
## Android Proguard Setup
You can use the following rules on your Android projects (see [Proguard Exclusions](https://github.com/jwtk/jjwt/wiki/ProGaurd-exclusions)):
```
-keepnames class com.fasterxml.jackson.databind.** { *; }
-dontwarn com.fasterxml.jackson.databind.*
-keepattributes InnerClasses
-keep class org.bouncycastle.** { *; }
-keepnames class org.bouncycastle.** { *; }
-dontwarn org.bouncycastle.**
-keep class io.jsonwebtoken.** { *; }
-keepnames class io.jsonwebtoken.* { *; }
-keepnames interface io.jsonwebtoken.* { *; }
-dontwarn javax.xml.bind.DatatypeConverter
-dontwarn io.jsonwebtoken.impl.Base64Codec
-keepnames class com.fasterxml.jackson.** { *; }
-keepnames interface com.fasterxml.jackson.** { *; }
```
## Supported Features