From b1001f6e7cb579b9c0c8017672e440fa85e8a22d Mon Sep 17 00:00:00 2001 From: Eliseo Ocampos Date: Thu, 4 Jan 2018 10:09:37 -0300 Subject: [PATCH] Add Proguard setup section on README Add Proguard rules for Android projects so it can be referenced right away. --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index bbde8055..57475710 100644 --- a/README.md +++ b/README.md @@ -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