Adds composite build support for AztecEditor-Android #15432
Merged
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 adds composite build support for AztecEditor-Android. It works exactly the same way as other composite builds, so there is not too much to explain. The only thing to be aware of is that even if the modules of this library were to be added as a dependency to one of the dependencies of WPAndroid (a dependency of
react-native-aztecfor example instead of directly being added) the composite build would still work. This is the case for every other composite build as well, but it's more important to be aware of for this project as explained below.There was an interesting decision to be made here about how to setup composite build for this project, because the main client for the library is actually react-native-aztec however it's also used for the classic editor in WPAndroid. I opted for the simplest solution right now, as this is very familiar for developers and how it works will be clear to everyone who uses it.
The main setback of this approach is that react-native-aztec or react-native-editor can't directly use the composite build setup. (not without using it in WPAndroid) However, if we were to go for a solution to support that, it'd not only be harder to setup, but more importantly it'd also require some understanding or guessing by developers on how the dependency resolution will work for each project. If a developer forgets to turn off composite build at a library level, it'll also be a lot harder for #platform9 to help the developer when they are having build issues. So, I think this is a good start and we can re-visit it once developers get a chance to use it and report back on their needs.
To test:
local-builds.gradle-exampleaslocal-builds.gradlelocalAztecAndroidPathto reflect your local pathisNotEmpty()methodTest steps (5) & (6) are mostly for demonstration purposes.
Another test for the curious is to create a Gradle scan for example by running
./gradlew assembleWordPressVanillaDebug --scan, going into theDependenciessection and searching foraztecto verify the dependencies were resolved as the local module. Here is an example scan.Regression Notes
Potential unintended areas of impact
N/A - because this change can't have any impact on the CI builds as the composite builds are ignore
What I did to test those areas of impact (or what existing automated tests I relied on)
N/A
What automated tests I added (or what prevented me from doing so)
N/A
PR submission checklist:
RELEASE-NOTES.txtif necessary.