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

Accept proguard mapping file in resource shrinker #149

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mauriciogg
Copy link
Contributor

@mauriciogg mauriciogg commented Sep 21, 2023

Implementation of resource_shrinker cli. This is a direct copy pasta of the gradle resource shrinker https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:build-system/shrinker/src/main/java/com/android/build/shrinker/ResourceShrinkerCli.java?q=ResourceShrinkerCli
With the addition of the --proguard_mapping in order to allow obfuscated builds to provide the obfuscation mapping to the resource shrinker.

This is half of the work needed to resolve #133
A follow up pr will wire the generated map by the r8 action to the srhinker action

@ahumesky
Copy link
Collaborator

ahumesky commented Dec 12, 2023

since the original file is "Copyright (C) 2022 The Android Open Source Project" I think we may need to set up a third_party directory and maintain the original copyright header -- but this is actually more complicated than just adding a directory to this repo, because internally we have this code in a third_party directory, and we can't have a third_party directory within the third_party directory, so we'll have to figure out what to do here

@mauriciogg
Copy link
Contributor Author

since the original file is "Copyright (C) 2022 The Android Open Source Project" I think we may need to set up a third_party directory and maintain the original copyright header -- but this is actually more complicated than just adding a directory to this repo, because internally we have this code in a third_party directory, and we can't have a third_party directory within the third_party directory, so we'll have to figure out what to do here

The flag is now available in R8 (https://partnerissuetracker.corp.google.com/issues/299961324). I think we can just wait for it to be released and remove the need for the custom tool

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.

R8 Proguard mappings are not propagated to the resource shrinker
3 participants