mirror of
https://gitea.com/actions/setup-android.git
synced 2026-10-07 15:23:07 +01:00
Compare commits
4 Commits
v4.0.3
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6be61bfda0 | ||
|
|
035682743a | ||
|
|
be39fa8340 | ||
|
|
1f87d5b2a1 |
1
.github/workflows/build-test.yml
vendored
1
.github/workflows/build-test.yml
vendored
@@ -66,6 +66,7 @@ jobs:
|
||||
- windows-2025
|
||||
- windows-2022
|
||||
cmdline-tools-version:
|
||||
- 15859902
|
||||
- 14742923
|
||||
- 12266719
|
||||
- 11479570
|
||||
|
||||
@@ -85,7 +85,7 @@ and `uiautomatorviewer` were dropped without one.
|
||||
Command line tools are versioned using two variables - short and long.
|
||||
Long one is the build number, used in the zip URL, short one is the human friendly version name.
|
||||
|
||||
By default, setup-android installs version 14742923 (short version 20.0).
|
||||
By default, setup-android installs version 15859902 (short version 22.0).
|
||||
|
||||
To install a different version, call setup-android with desired long version as the input parameter `cmdline-tools-version`:
|
||||
```yaml
|
||||
@@ -98,6 +98,7 @@ To install a different version, call setup-android with desired long version as
|
||||
#### Version table
|
||||
| Short version | Long version |
|
||||
|---------------| --- |
|
||||
| 22.0 | 15859902 |
|
||||
| 20.0 | 14742923 |
|
||||
| 16.0 | 12266719 |
|
||||
| 13.0 | 11479570 |
|
||||
|
||||
@@ -6,7 +6,7 @@ inputs:
|
||||
cmdline-tools-version:
|
||||
description: 'cmdline-tools-version. See https://developer.android.com/studio#command-line-tools-only'
|
||||
required: false
|
||||
default: '14742923'
|
||||
default: '15859902'
|
||||
|
||||
accept-android-sdk-licenses:
|
||||
description: 'Android SDK is usable only after the license agreement. Should setup-android agree to the licences, provided by "sdkmanager --licenses"'
|
||||
|
||||
9
dist/index.js
vendored
9
dist/index.js
vendored
@@ -23152,6 +23152,8 @@ var fs4 = __toESM(require("fs"));
|
||||
var os6 = __toESM(require("os"));
|
||||
function getVersionShort(versionLong) {
|
||||
switch (versionLong) {
|
||||
case "15859902":
|
||||
return "22.0";
|
||||
case "14742923":
|
||||
return "20.0";
|
||||
case "12266719":
|
||||
@@ -23184,6 +23186,7 @@ if (VERSION_LONG.includes("/") || VERSION_LONG.includes("\\")) {
|
||||
var VERSION_SHORT = getVersionShort(VERSION_LONG);
|
||||
var COMMANDLINE_TOOLS_WIN_URL = `https://dl.google.com/android/repository/commandlinetools-win-${VERSION_LONG}_latest.zip`;
|
||||
var COMMANDLINE_TOOLS_MAC_URL = `https://dl.google.com/android/repository/commandlinetools-mac-${VERSION_LONG}_latest.zip`;
|
||||
var COMMANDLINE_TOOLS_MAC_ARM64_URL = `https://dl.google.com/android/repository/commandlinetools-mac_arm64-${VERSION_LONG}_latest.zip`;
|
||||
var COMMANDLINE_TOOLS_LIN_URL = `https://dl.google.com/android/repository/commandlinetools-linux-${VERSION_LONG}_latest.zip`;
|
||||
var ANDROID_HOME_SDK_DIR = path6.join(os6.homedir(), ".android", "sdk");
|
||||
var ANDROID_SDK_ROOT = process.env["ANDROID_SDK_ROOT"] || ANDROID_HOME_SDK_DIR;
|
||||
@@ -23218,7 +23221,11 @@ async function installSdkManager() {
|
||||
if (process.platform === "linux") {
|
||||
cmdlineToolsURL = COMMANDLINE_TOOLS_LIN_URL;
|
||||
} else if (process.platform === "darwin") {
|
||||
cmdlineToolsURL = COMMANDLINE_TOOLS_MAC_URL;
|
||||
if (Number(VERSION_LONG) >= 15859902) {
|
||||
cmdlineToolsURL = COMMANDLINE_TOOLS_MAC_ARM64_URL;
|
||||
} else {
|
||||
cmdlineToolsURL = COMMANDLINE_TOOLS_MAC_URL;
|
||||
}
|
||||
} else if (process.platform === "win32") {
|
||||
cmdlineToolsURL = COMMANDLINE_TOOLS_WIN_URL;
|
||||
} else {
|
||||
|
||||
17
package-lock.json
generated
17
package-lock.json
generated
@@ -26,7 +26,7 @@
|
||||
"jest-circus": "^30.3.0",
|
||||
"js-yaml": "^5.4.2",
|
||||
"prettier": "^3.9.7",
|
||||
"ts-jest": "^29.4.12",
|
||||
"ts-jest": "^29.4.14",
|
||||
"typescript": "^6.0.3"
|
||||
}
|
||||
},
|
||||
@@ -5898,10 +5898,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ts-jest": {
|
||||
"version": "29.4.12",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.12.tgz",
|
||||
"integrity": "sha512-Ov6ClY53Fflh6BGAnY2DlTq1hYDrTycz2PVTXBWFW2CU+9zrEqAp9fWdGXl42EXO5RLSFAcAZ2JFKbP+zBTFfw==",
|
||||
"version": "29.4.14",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.14.tgz",
|
||||
"integrity": "sha512-+943G6wCX5E3VpzTQhBGBFntCmdT+QAkTvUlp03edTONFBvqskuXPhpyX16xdUotO4P5HQKyppldSWjocoltLQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bs-logger": "^0.2.6",
|
||||
"fast-json-stable-stringify": "^2.1.0",
|
||||
@@ -5920,7 +5921,7 @@
|
||||
"node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.0 <8",
|
||||
"@babel/core": ">=7.0.0-beta.0 <9",
|
||||
"@jest/transform": "^29.0.0 || ^30.0.0",
|
||||
"@jest/types": "^29.0.0 || ^30.0.0",
|
||||
"babel-jest": "^29.0.0 || ^30.0.0",
|
||||
@@ -10270,9 +10271,9 @@
|
||||
"requires": {}
|
||||
},
|
||||
"ts-jest": {
|
||||
"version": "29.4.12",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.12.tgz",
|
||||
"integrity": "sha512-Ov6ClY53Fflh6BGAnY2DlTq1hYDrTycz2PVTXBWFW2CU+9zrEqAp9fWdGXl42EXO5RLSFAcAZ2JFKbP+zBTFfw==",
|
||||
"version": "29.4.14",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.14.tgz",
|
||||
"integrity": "sha512-+943G6wCX5E3VpzTQhBGBFntCmdT+QAkTvUlp03edTONFBvqskuXPhpyX16xdUotO4P5HQKyppldSWjocoltLQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bs-logger": "^0.2.6",
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
"jest-circus": "^30.3.0",
|
||||
"js-yaml": "^5.4.2",
|
||||
"prettier": "^3.9.7",
|
||||
"ts-jest": "^29.4.12",
|
||||
"ts-jest": "^29.4.14",
|
||||
"typescript": "^6.0.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import * as os from 'os'
|
||||
|
||||
function getVersionShort(versionLong: string): string {
|
||||
switch (versionLong) {
|
||||
case '15859902':
|
||||
return '22.0'
|
||||
case '14742923':
|
||||
return '20.0'
|
||||
case '12266719':
|
||||
@@ -41,6 +43,7 @@ const VERSION_SHORT = getVersionShort(VERSION_LONG)
|
||||
|
||||
const COMMANDLINE_TOOLS_WIN_URL = `https://dl.google.com/android/repository/commandlinetools-win-${VERSION_LONG}_latest.zip`
|
||||
const COMMANDLINE_TOOLS_MAC_URL = `https://dl.google.com/android/repository/commandlinetools-mac-${VERSION_LONG}_latest.zip`
|
||||
const COMMANDLINE_TOOLS_MAC_ARM64_URL = `https://dl.google.com/android/repository/commandlinetools-mac_arm64-${VERSION_LONG}_latest.zip`
|
||||
const COMMANDLINE_TOOLS_LIN_URL = `https://dl.google.com/android/repository/commandlinetools-linux-${VERSION_LONG}_latest.zip`
|
||||
|
||||
const ANDROID_HOME_SDK_DIR = path.join(os.homedir(), '.android', 'sdk')
|
||||
@@ -105,7 +108,11 @@ async function installSdkManager(): Promise<string> {
|
||||
if (process.platform === 'linux') {
|
||||
cmdlineToolsURL = COMMANDLINE_TOOLS_LIN_URL
|
||||
} else if (process.platform === 'darwin') {
|
||||
cmdlineToolsURL = COMMANDLINE_TOOLS_MAC_URL
|
||||
if (Number(VERSION_LONG) >= 15859902) {
|
||||
cmdlineToolsURL = COMMANDLINE_TOOLS_MAC_ARM64_URL
|
||||
} else {
|
||||
cmdlineToolsURL = COMMANDLINE_TOOLS_MAC_URL
|
||||
}
|
||||
} else if (process.platform === 'win32') {
|
||||
cmdlineToolsURL = COMMANDLINE_TOOLS_WIN_URL
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user