-
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
[Build] Enable Non-Transitive Resources #18707
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sources: - Production: 54 imports - WordPress: 2 imports - Main: 52 imports - Test: 18 imports
Sources: - Production: 15 imports - WordPress: 2 imports - Main: 13 imports - Test: 0 imports
Sources: - Production: 11 imports - WordPress: 0 imports - Main: 11 imports - Test: 0 imports
Sources: - Production: 9 imports - WordPress: 3 imports - Main: 6 imports - Test: 1 imports
Sources: - Production: 9 imports - WordPress: 2 imports - Main: 7 imports - Test: 2 imports
Sources: - Production: 6 imports - WordPress: 0 imports - Main: 6 imports - Test: 0 imports
Sources: - Production: 4 imports - WordPress: 0 imports - Main: 4 imports - Test: 0 imports
This 'other' keyword includes the following categories: - other 6 import - style 1 import (Main) - styleable 1 import (Main) - anim 1 import (Main) - font 1 import (WordPress) - integer 1 import (Main) - array 1 import (Main) Sources: - Production: 6 imports - WordPress: 1 imports - Main: 5 imports - Test: 0 imports
Sources: - Production: 6 imports - WordPress: 0 imports - Main: 6 imports - Test: 0 imports
This optimization only applies to Kotlin files since import aliases is not supported on Java files.
This optimization only applies to Kotlin files since import aliases is not supported on Java files.
This optimization only applies to Kotlin files since import aliases is not supported on Java files.
This optimization only applies to Kotlin files since import aliases is not supported on Java files.
This optimization only applies to Kotlin files since import aliases is not supported on Java files.
This optimization only applies to Kotlin files since import aliases is not supported on Java files.
This optimization only applies to Kotlin files since import aliases is not supported on Java files.
This optimization only applies to Kotlin files since import aliases is not supported on Java files
This optimization only applies to Kotlin files since import aliases is not supported on Java files.
These 'R.drawable.ic_close_24px' resources come from the 'mobile-gutenberg', and more specifically the ':react-native-gutenberg-bridge' project dependency. As such these resources cannot be used in a non-transitive way. Replacing the 'R.drawable.ic_close_24px' resources with its identical 'org.wordpress.android.R' such 'R.drawable.ic_close_white_24dp' resources resolves these non-transitive related issues.
This 'R.drawable.ic_arrow_back_white_24dp' resources come from the 'tenor-android-core-jetified' dependency. As such this resource cannot be used in a non-transitive way. Replacing the 'R.drawable.ic_arrow_back_white_24dp' resources with its identical 'org.wordpress.android.R' such 'R.drawable.ic_arrow_left_white_24dp' resource resolves this non-transitive related issue.
This commit updates the encrypted 'gradle.properties.enc' file to point to that pinned hash which has the 'android.nonTransitiveRClass=true' property added into the 'gradle.properties' file for the WPAndroid project. FYI: This is done in order for the CI to pick-up this specific change and download the correct version of 'gradle.properties' to then build the project with non transitive resources enabled.
|
App Name | ![]() |
|
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr18707-ed4c57e | |
Commit | ed4c57e | |
Direct Download | wordpress-prototype-build-pr18707-ed4c57e.apk |
|
App Name | ![]() |
|
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr18707-ed4c57e | |
Commit | ed4c57e | |
Direct Download | jetpack-prototype-build-pr18707-ed4c57e.apk |
… into build/enable-non-transitive-resources
AjeshRPai
approved these changes
Jul 4, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did the smoke testing of the Jetpack and wordpress app, everything looks good to me 👍🏼 ✅
Scenario's i covered in my smoke testing
- login
- publish a story post
- publish a blog post with images and video
- follow a site
- check the stats
- read an article
Awesome @AjeshRPai , thank you so much for reviewing, testing and merging this, you rock! 🙇❤️🚀 |
12 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a prerequisite for the
Gradle 8.1.1 & AGP 8.0.2 Upgrade for WPAndroid, WCAndroid & Related Libs
project.Platform Request:
pdnsEh-13V-p2
Project Thread:
paaHJt-57Z-p2
This PR enables non-transitive resources (
android.nonTransitiveRClass
) for the project.FYI: This behavior becomes the default in AGP
8.0
and higher. As such, this becomes a prerequisite for the AGP8.0.2
upgrade, that is of course, unlessandroid.nonTransitiveRClass
is explicitly set tofalse
.PS: I recommend reviewing this PR commit-by-commit, and more so, to focus on the
Build
related commits. Avoid spending too much time on reviewing theRefactor
related commits as those was purely done for codebase alignment purposes(*).PS: @AjeshRPai I added you as the main reviewer, randomly so, since I just wanted someone from the WordPress team to be aware of and sign-off on that change for WPAndroid. I also added the @wordpress-mobile/apps-infrastructure team, but this in done only for monitoring purposes, as such, I am not expecting any active review from that team. Thus, feel free to merge this PR if you deem so.
(*) The convention I followed in order to align the R related usage in the codebase is the following:
import org.wordpress.android.R
is the main import of choice.LoginR
fororg.wordpress.android.login.R
StoriesR
forcom.wordpress.stories.R
EditorR
fororg.wordpress.android.editor.R
ZendeskR
forcom.zendesk.sdk.R
ComposeR
forandroidx.compose.ui.R
CoordinatorLayoutR
forandroidx.coordinatorlayout.R
MaterialR
forimport com.google.android.material.R
AndroidR
forimport android.R
To test:
Regression Notes
Potential unintended areas of impact
R
related changes apply to the whole project, including its module related libraries (likelibs:image-editor
andlibs:editor
).What I did to test those areas of impact (or what existing automated tests I relied on)
To test
section above.What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txt
if necessary.UI Changes testing checklist: