-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Enable non-final resource IDs #21179
base: trunk
Are you sure you want to change the base?
Conversation
8657fb8
to
683099c
Compare
Generated by 🚫 Danger |
Quality Gate passedIssues Measures |
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
@jkmassel This PR has been a draft for over a month. Do we need to close it or update it to be ready for review? |
👋 @jkmassel @nbradbury and thanks for the ping!
In terms of keeping up with the standards, this is indeed a good idea. As of AGP 8.0, the default value is true, meaning resource IDs are non-final by default. As such, it is (usually) better to use the default whenever possible.
FYI:
Performance wise, non-final IDs could actually have a slight performance impact, as the values need to be looked up at runtime rather than being inlined as constants. However, this impact is generally minimal in most applications. Thus, I wouldn't worry too much about that. PS: This became an AGP default because if has the potential for build time improvements and allowing for more flexible runtime resource loading and manipulation. NOTE: If you proceed with this change I would recommend the following:
Hope I helped a bit! 🙏 Btw, this |
Mostly just curious if this will work – Android Studio says it'll speed up build times
To Test:
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist (strike-out the not-applying and unnecessary ones):