[Ubuntu] Switch android tools installation to use sdkmanager from command-line tools (#3650)

* Switch android tools installation to cmdline-tools
* Replace deprecated sdkmanger from sdk-tools to the one from cmdline tools
* Remove patcherv4 from toolsets as it's included in m2repository extras

* Add tests to make sure both sdkmanagers exist

* Return cmdline-tools to software readme
* Get-AndroidInstalledPackages function now use list_installed param
* Create a function to get sdkmanager version = cmdline tools version

* Get rid of hardcoded path to ANDROID_HOME
* Add reloadEtcEnvironment call to installation script
* Use env variable ANDROID_HOME in tests

* Modify software report to output any version

* Change regex pattern to output the group
* Currently the function returns 4. instead of 4.0, this change fixes it
This commit is contained in:
Mikhail Timofeev
2021-07-07 15:16:46 +03:00
committed by GitHub
parent 6e7af98600
commit f1ab1bd12f
7 changed files with 49 additions and 38 deletions

View File

@@ -56,7 +56,7 @@ function Get-ToolsetValue {
}
function Get-AndroidPackages {
$androidSDKManagerPath = "/usr/local/lib/android/sdk/tools/bin/sdkmanager"
$androidSDKManagerPath = "/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager"
$androidPackages = & $androidSDKManagerPath --list --verbose
return $androidPackages
}