mirror of
https://github.com/android-actions/setup-android.git
synced 2026-09-27 15:18:36 +00:00
Fix #537: stop installing the deprecated tools package
Google no longer serves the `tools` package: it is gone from repository2-3.xml, so `sdkmanager tools` fails with "Failed to find package 'tools'" and takes the whole action down with it. - Drop `tools` from the default value of the `packages` input, leaving `platform-tools`. The command line tools that replaced it are already installed by this action, and there is no bare `cmdline-tools` package path to install instead (only versioned ones, e.g. `cmdline-tools;20.0`). - Skip `tools` with a warning when it is requested explicitly, so the many workflows that pass `packages: 'tools platform-tools'` keep working instead of failing. - Update the README accordingly. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
committed by
Vilius Sutkus '89
co-authored by
Claude Opus 5
parent
4d90f94363
commit
7731365548
+13
@@ -175,6 +175,19 @@ async function run(): Promise<void> {
|
||||
.filter(function (element, index, array) {
|
||||
return element
|
||||
})
|
||||
.filter(function (pkg) {
|
||||
// The 'tools' package is deprecated and no longer served by Google,
|
||||
// asking sdkmanager for it fails the whole action.
|
||||
// Its replacement, cmdline-tools, is already installed by this action.
|
||||
if (pkg === 'tools') {
|
||||
core.warning(
|
||||
"Skipping deprecated package 'tools', it is no longer available in the Android SDK repository. " +
|
||||
'The command line tools installed by this action replace it, see https://developer.android.com/tools#tools-sdk'
|
||||
)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
for (const pkg of packages) {
|
||||
await callSdkManager(sdkManagerExe, pkg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user