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

Ensure proguard files are included in AAR #1096

Merged
merged 4 commits into from
Jan 27, 2021
Merged

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Jan 27, 2021

Goal

Ensures that proguard.txt is added to AARs so that consumers of the library can use ProGuard and R8 for obfuscation.

Changeset

Alters the gradle script so that each module declares the consumerProguardFiles, rather than setting it in an afterEvaluate closure. The AGP version used to build the project has recently changed, so it seems probable that newer versions of AGP read this information before the afterEvaluate block triggers, thus ignoring the consumer proguard file.

Testing

Confirmed that a locally generated AAR contains a proguard.txt file with the appropriate contents, and checked that the deployed artefact does not.
https://developer.android.com/studio/projects/android-library#aar-contents

@fractalwrench fractalwrench marked this pull request as ready for review January 27, 2021 18:04
@bugsnagbot
Copy link
Collaborator

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1459.67 1374.4
arm64_v8a 377.51 291.5
armeabi 357.03 266.91
armeabi_v7a 340.65 250.54
x86 414.36 328.34
x86_64 397.98 311.97

Generated by 🚫 Danger

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

Successfully merging this pull request may close these issues.

4 participants