fix: cordova requirements command and SDK lookup based on tools#1877
Merged
breautek merged 5 commits intoapache:masterfrom Dec 18, 2025
Merged
fix: cordova requirements command and SDK lookup based on tools#1877breautek merged 5 commits intoapache:masterfrom
breautek merged 5 commits intoapache:masterfrom
Conversation
dpogue
reviewed
Dec 17, 2025
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1877 +/- ##
==========================================
+ Coverage 60.77% 61.39% +0.62%
==========================================
Files 23 24 +1
Lines 4813 4919 +106
==========================================
+ Hits 2925 3020 +95
- Misses 1888 1899 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fc9a44f to
6741c41
Compare
6ffcd66 to
a28582c
Compare
erisu
approved these changes
Dec 18, 2025
Member
erisu
left a comment
There was a problem hiding this comment.
Everything looks OK to me.
I just added a few nitpicks 😄
I've been updating license headers across the board to follow a consistent pattern for the various file types.
Co-authored-by: エリス <erisu@users.noreply.github.com>
Co-authored-by: エリス <erisu@users.noreply.github.com>
Co-authored-by: エリス <erisu@users.noreply.github.com>
breautek
commented
Dec 18, 2025
erisu
reviewed
Dec 18, 2025
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.
Platforms affected
Android/All OS
Motivation and Context
Fixes #1841
Description
This PR does two things:
The resolving algorithm will prefer the
"latest"(a specific Android SDK package that installs the cmdline tools to alatestdirectory), however if this package is not installed, it will choose the latest stable versioned cmdline-tools, e.g.19.0. It usessemverto coarce the directory names and sort them in descending order.Prelease packages are acceptable but prioritized lower than stable releases of the same version.
Directories that are not parseable as a version are ignored.
Directories that are valid name wise are not asserted for it's contents and assumes that it's structure matches what is expected based on Android SDK cmdline-tools installation.
$ANDROID_HOME/tools/binbinaries. These are legacy tools that are not compatible with modern toolsets. The cmdline-tools is the replacement. There is existing code that would infer the Android SDK home directory based on the result ofwhichofavdmanagerAdditional Notes
The cmd-line tools resolution prefers the latest cmdline-tools version possible because that is what our guide says to install. However cmdline-tools can introduce breaking changes. Typically in the java runtime required to run these tools.
It would be better if we define a version or a range of versions for Cordova CLI to prefer, but doing so I'd consider out of scope for addressing the reported issue.
Testing
npm test passes.
Manually tested on windows using
cordova requirements android/cordova build android:Checklist
(platform)if this change only applies to one platform (e.g.(android))