Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proguard exclusions #215

Closed
bpappin opened this issue Mar 28, 2017 · 9 comments
Closed

Proguard exclusions #215

bpappin opened this issue Mar 28, 2017 · 9 comments

Comments

@bpappin
Copy link

bpappin commented Mar 28, 2017

What are the ProGuard exclusions for JJWT?

For instance, we can't build due to this error.

Warning:io.jsonwebtoken.impl.Base64Codec: can't find referenced class javax.xml.bind.DatatypeConverter
Warning:io.jsonwebtoken.impl.crypto.EllipticCurveProvider: can't find referenced class org.bouncycastle.jce.ECNamedCurveTable
Warning:there were 5 unresolved references to classes or interfaces.
@bpappin
Copy link
Author

bpappin commented Mar 28, 2017

one of the warning can be handled with ProGuard rules.

-keep class org.bouncycastle.** { *; }
-keepnames class org.bouncycastle.** { *; }
-dontwarn org.bouncycastle.**

Note: likely don't need the -keepnames entry.

@sbanouar
Copy link

Hi Brill Pappin,

The proguard exclusions for JJWT & Jackson are:

-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.** { *; }

I hope this help you.

@lhazlewood
Copy link
Contributor

I've added this to a new wiki page:

https://github.com/jwtk/jjwt/wiki/ProGaurd-exclusions

Please free to re-open this issue if you think other actionable work needs to be done.

@ederpadilla
Copy link

Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. > Job failed, see logs for details
-keepnames class com.fasterxml.jackson.databind.** { ; }

and steel send me this warning
Warning:com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning:io.jsonwebtoken.impl.crypto.EllipticCurveProvider: can't find referenced class org.bouncycastle.jce.ECNamedCurveTable

@asdfiop
Copy link

asdfiop commented Jul 2, 2017

不好

1 similar comment
@asdfiop
Copy link

asdfiop commented Jul 2, 2017

不好

@c0state
Copy link

c0state commented Aug 11, 2017

There were some syntax errors and/or incorrect rules in the snippet above I believe. Wiki entry has been updated with corrections.

@pedroromao-acceptto
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants