Skip to content

Commit e08f702

Browse files
committed
Merge branch 'main' into release/v2
* main: Prepare for release 2.13.0. Update cmdline-tools to 3.0. Update npm packages. Add Shopify/android-testify to list of projects
2 parents 07b0366 + 11559ab commit e08f702

File tree

6 files changed

+180
-102
lines changed

6 files changed

+180
-102
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## v2.13.0
4+
5+
* Updated to SDK command-line tools `3.0`.
6+
37
## v2.12.0
48

59
Added support for using the `playstore` system images:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,5 +132,6 @@ These are some of the open-source projects using (or used) **Android Emulator Ru
132132
- [simpledotorg/simple-android](https://github.com/simpledotorg/simple-android)
133133
- [cashapp/copper](https://github.com/cashapp/copper/blob/trunk/.github/workflows/build.yaml)
134134
- [square/radiography](https://github.com/square/radiography/blob/main/.github/workflows/android.yml)
135+
- [Shopify/android-testify](https://github.com/Shopify/android-testify/blob/master/.github/workflows/sample_build.yml)
135136

136137
If you are using **Android Emulator Runner** and want your project included in the list, please feel free to create an issue or open a pull request.

lib/sdk-installer.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ exports.installAndroidSdk = void 0;
3232
const core = __importStar(require("@actions/core"));
3333
const exec = __importStar(require("@actions/exec"));
3434
const io = __importStar(require("@actions/io"));
35+
const tc = __importStar(require("@actions/tool-cache"));
3536
const fs = __importStar(require("fs"));
3637
const BUILD_TOOLS_VERSION = '30.0.2';
37-
const CMDLINE_TOOLS_URL_MAC = 'https://dl.google.com/android/repository/commandlinetools-mac-6609375_latest.zip';
38-
const CMDLINE_TOOLS_URL_LINUX = 'https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip';
38+
const CMDLINE_TOOLS_URL_MAC = 'https://dl.google.com/android/repository/commandlinetools-mac-6858069_latest.zip';
39+
const CMDLINE_TOOLS_URL_LINUX = 'https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip';
3940
/**
4041
* Installs & updates the Android SDK for the macOS platform, including SDK platform for the chosen API level, latest build tools, platform tools, Android Emulator,
4142
* and the system image for the chosen API level, CPU arch, and target.
@@ -50,12 +51,11 @@ function installAndroidSdk(apiLevel, target, arch, emulatorBuild, ndkVersion, cm
5051
if (!fs.existsSync(cmdlineToolsPath)) {
5152
console.log('Installing new cmdline-tools.');
5253
const sdkUrl = isOnMac ? CMDLINE_TOOLS_URL_MAC : CMDLINE_TOOLS_URL_LINUX;
53-
yield io.mkdirP(`${process.env.ANDROID_HOME}/cmdline-tools`);
54-
yield exec.exec(`curl -fo commandlinetools.zip ${sdkUrl}`);
55-
yield exec.exec(`unzip -q commandlinetools.zip -d ${cmdlineToolsPath}`);
56-
yield io.rmRF('commandlinetools.zip');
54+
const downloadPath = yield tc.downloadTool(sdkUrl);
55+
yield tc.extractZip(downloadPath, cmdlineToolsPath);
56+
yield io.mv(`${cmdlineToolsPath}/cmdline-tools`, `${cmdlineToolsPath}/latest`);
5757
// add paths for commandline-tools and platform-tools
58-
core.addPath(`${cmdlineToolsPath}/tools:${cmdlineToolsPath}/tools/bin:${process.env.ANDROID_HOME}/platform-tools`);
58+
core.addPath(`${cmdlineToolsPath}/latest:${cmdlineToolsPath}/latest/bin:${process.env.ANDROID_HOME}/platform-tools`);
5959
}
6060
// additional permission and license requirements for Linux
6161
const sdkPreviewLicensePath = `${process.env.ANDROID_HOME}/licenses/android-sdk-preview-license`;

package-lock.json

Lines changed: 158 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)