[Build] Enable Non-Transitive Resources#18707
Merged
Conversation
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.
Contributor
|
| App Name | WordPress |
|
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr18707-ed4c57e | |
| Commit | ed4c57e | |
| Direct Download | wordpress-prototype-build-pr18707-ed4c57e.apk |
Contributor
|
| App Name | Jetpack |
|
| 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
Contributor
AjeshRPai
left a comment
There was a problem hiding this comment.
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
Contributor
Author
|
Awesome @AjeshRPai , thank you so much for reviewing, testing and merging this, you rock! 🙇❤️🚀 |
12 tasks
This file contains hidden or 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
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 Libsproject.Platform Request:
pdnsEh-13V-p2Project Thread:
paaHJt-57Z-p2This PR enables non-transitive resources (
android.nonTransitiveRClass) for the project.FYI: This behavior becomes the default in AGP
8.0and higher. As such, this becomes a prerequisite for the AGP8.0.2upgrade, that is of course, unlessandroid.nonTransitiveRClassis explicitly set tofalse.PS: I recommend reviewing this PR commit-by-commit, and more so, to focus on the
Buildrelated commits. Avoid spending too much time on reviewing theRefactorrelated 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.Ris the main import of choice.LoginRfororg.wordpress.android.login.RStoriesRforcom.wordpress.stories.REditorRfororg.wordpress.android.editor.RZendeskRforcom.zendesk.sdk.RComposeRforandroidx.compose.ui.RCoordinatorLayoutRforandroidx.coordinatorlayout.RMaterialRforimport com.google.android.material.RAndroidRforimport android.RTo test:
Regression Notes
Potential unintended areas of impact
Rrelated changes apply to the whole project, including its module related libraries (likelibs:image-editorandlibs:editor).What I did to test those areas of impact (or what existing automated tests I relied on)
To testsection above.What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txtif necessary.UI Changes testing checklist: