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.
Platforms affected
android
Motivation and Context
Fixes a regression outlined in #1290
Closes #1290
While cordova-android always used the latest build tools version by default, through gradle parameters users could pin their build tools version to a specific version. In 10.x this behaviour was changed so that the gradle parameter value was used as hte minimum version instead of the desired build tools version.
Description
I added a
MIN_BUILD_TOOLS_VERSION
as our declared minimum build tools version. The previously declaredBUILD_TOOLS_VERSION
now is unset by default, but will become either the latest build tools version that is available or the declared build tools version configured byconfig.xml
preference or the gradle args CLI parameter.LATEST_INSTALLED_BUILD_TOOLS
config variable was completely removed in favour ofBUILD_TOOLS_VERSION
The above changes were made in effort to not introduce anything breaking.
Requires #1294 to fix CI testing.
Testing
Ran npm test successfully.
Manually testing the following cases:
29
errors out as expected (min 30.0.3)30.0.3
runs successfully.31
runs successfully as expected (uses 30.0.3)android-buildtoolsversion
preference 29, errors out as expected (min 30.0.3)android-buildtoolsversion
preference 30.0.3 runs successfully--gradleArg=-PcdvBuildToolsVersion=29.0.3
errors out as expected (min 30.0.3)--gradleArg=-PcdvBuildToolsVersion=30.0.3
runs successfullyChecklist
(platform)
if this change only applies to one platform (e.g.(android)
)