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

Allow disabling android resource merging via android_non_transitive_r_class configuration option #15806

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arunkumar9t2
Copy link
Contributor

@arunkumar9t2 arunkumar9t2 commented Jul 4, 2022

With this change each android_library target will generate R class with entries only from current local target instead of including entries from transitive closure of dependencies usually created via a separate merging action.

R entries from libraries should be referenced by their fully qualified name otherwise build would fail.

Reference: https://developer.android.com/studio/build/optimize-your-build#use-non-transitive-r-classes

In our large android app, we save several thousand actions and reduce cache output by 1.1 GB.

Adapted from #11385 and renamed flag to be in line with Android Gradle plugin flag.

Fixes bazelbuild/rules_android#10

…r_class` configuration option

With this change each `android_library` target will generate `R` class with entries only from current local target instead of including entries from transitive closure of dependencies usually created via a separate merging action.

`R` entries from libraries should be referenced by their fully qualified name otherwise build would fail.
@sgowroji sgowroji added team-Android Issues for Android team awaiting-user-response Awaiting a response from the author labels Jul 5, 2022
@sgowroji
Copy link
Member

Hello @arunkumar9t2, Can you please check build failures and Code conflict. Thank you!

@sgowroji
Copy link
Member

sgowroji commented Sep 1, 2022

@arunkumar9t2 We are marking the above PR as stale because it has not had any recent activity from many days.
It will be closed in 7 days if there is no further activity occurs. Thank you.

Copy link

github-actions bot commented Nov 6, 2023

Thank you for contributing to the Bazel repository! This pull request has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-review", "awaiting-PR-merge". Please reach out to the triage team (@bazelbuild/triage) if you think this PR is still relevant or you are interested in getting the PR merged.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Nov 6, 2023
@github-actions github-actions bot removed the stale Issues or PRs that are stale (no activity for 30 days) label Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-user-response Awaiting a response from the author team-Android Issues for Android team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Permit disabling resource merging
3 participants