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

Add consumer proguard rules #17

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@joshfriend
Copy link

joshfriend commented Jan 10, 2019

I can't figure out how to build a jar for this project, but this setup is supposed to work and automatically provide the right proguard rules for anyone using R8 or proguard v6+ (bundled with AGP 3.2+)

@commonsguy

This comment has been minimized.

Copy link
Owner

commonsguy commented Jan 12, 2019

I can't figure out how to build a jar for this project

Run the netsecurity:jarRelease Gradle task.

this setup is supposed to work and automatically provide the right proguard rules for anyone using R8 or proguard v6+ (bundled with AGP 3.2+)

AFAIK, a JAR does not contain ProGuard rules. consumerProguardFiles should work in AAR packaging.

I will look into incorporating consumerProguardFiles (whether via your PR or a separate implementation) when I next need to make changes to this library. Thanks for the suggestion!

@joshfriend

This comment has been minimized.

Copy link

joshfriend commented Jan 13, 2019

If the jar includes proguard files in META-INF/proguard, R8 will use it (https://twitter.com/JakeWharton/status/1004401938467876865). Libraries like OkHttp, Moshi and Retrofit are currently distributing consumer proguard rules this way. I'll see if I can spend a bit more time on this to get it working, I didn't realize consumerProguardFiles only applies to AARs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment