Skip to content

Commit 99a4aac

Browse files
committed
Merge branch 'main' into release/v2
* main: Prepare for release 2.29.0. SDK command-line tools 11.0. (#356) Update npm packages. (#355) Check in updated `*.js` file. Update test fixture dependencies. (#354) Upgrade to latest npm dependencies (#347) Fixed emulator download URL (#343) Update README.md (Who is using…) (#335)
2 parents d94c3fb + 677db68 commit 99a4aac

File tree

13 files changed

+2960
-1854
lines changed

13 files changed

+2960
-1854
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
matrix:
2121
os: [macos-latest, ubuntu-latest]
22-
api-level: [16, 23, 29]
22+
api-level: [23, 29]
2323
target: [default, google_apis]
2424
arch: [x86]
2525
exclude:

CHANGELOG.md

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

3+
## v2.29.0
4+
5+
* Fixed emulator download URL. - [#343](https://github.com/ReactiveCircus/android-emulator-runner/pull/343)
6+
* Upgrade to latest npm dependencies. - [#347](https://github.com/ReactiveCircus/android-emulator-runner/pull/347) [#355](https://github.com/ReactiveCircus/android-emulator-runner/pull/355)
7+
* Update SDK command-line tools to `11.0`. - [#356](https://github.com/ReactiveCircus/android-emulator-runner/pull/356)
8+
* Update SDK build tools to `34.0.0`. - [#356](https://github.com/ReactiveCircus/android-emulator-runner/pull/356)
9+
310
## v2.28.0
411

512
* Add `emulator-boot-timeout` to support configuring maximum time waiting for emulator boot. - [#326](https://github.com/ReactiveCircus/android-emulator-runner/pull/326)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,5 +210,6 @@ These are some of the open-source projects using (or used) **Android Emulator Ru
210210
- [tinylog-org/tinylog](https://github.com/tinylog-org/tinylog/blob/v3.0/.github/workflows/build.yaml)
211211
- [hzi-braunschweig/SORMAS-Project](https://github.com/hzi-braunschweig/SORMAS-Project/blob/development/.github/workflows/sormas_app_ci.yml)
212212
- [ACRA/acra](https://github.com/ACRA/acra/blob/master/.github/workflows/test.yml)
213+
- [bitfireAT/davx5-ose](https://github.com/bitfireAT/davx5-ose/blob/dev-ose/.github/workflows/test-dev.yml)
213214

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

lib/sdk-installer.js

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ const exec = __importStar(require("@actions/exec"));
3838
const io = __importStar(require("@actions/io"));
3939
const tc = __importStar(require("@actions/tool-cache"));
4040
const fs = __importStar(require("fs"));
41-
const BUILD_TOOLS_VERSION = '33.0.2';
42-
// SDK command-line tools 9.0
43-
const CMDLINE_TOOLS_URL_MAC = 'https://dl.google.com/android/repository/commandlinetools-mac-9477386_latest.zip';
44-
const CMDLINE_TOOLS_URL_LINUX = 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip';
41+
const BUILD_TOOLS_VERSION = '34.0.0';
42+
// SDK command-line tools 11.0
43+
const CMDLINE_TOOLS_URL_MAC = 'https://dl.google.com/android/repository/commandlinetools-mac-10406996_latest.zip';
44+
const CMDLINE_TOOLS_URL_LINUX = 'https://dl.google.com/android/repository/commandlinetools-linux-10406996_latest.zip';
4545
/**
4646
* Installs & updates the Android SDK for the macOS platform, including SDK platform for the chosen API level, latest build tools, platform tools, Android Emulator,
4747
* and the system image for the chosen API level, CPU arch, and target.
@@ -51,6 +51,7 @@ function installAndroidSdk(apiLevel, target, arch, channelId, emulatorBuild, ndk
5151
try {
5252
console.log(`::group::Install Android SDK`);
5353
const isOnMac = process.platform === 'darwin';
54+
const isArm = process.arch === 'arm64';
5455
if (!isOnMac) {
5556
yield exec.exec(`sh -c \\"sudo chown $USER:$USER ${process.env.ANDROID_HOME} -R`);
5657
}
@@ -75,7 +76,22 @@ function installAndroidSdk(apiLevel, target, arch, channelId, emulatorBuild, ndk
7576
if (emulatorBuild) {
7677
console.log(`Installing emulator build ${emulatorBuild}.`);
7778
// TODO find out the correct download URLs for all build ids
78-
const downloadUrlSuffix = Number(emulatorBuild.charAt(0)) > 6 ? `_x64-${emulatorBuild}` : `-${emulatorBuild}`;
79+
var downloadUrlSuffix;
80+
const majorBuildVersion = Number(emulatorBuild);
81+
if (majorBuildVersion >= 8000000) {
82+
if (isArm) {
83+
downloadUrlSuffix = `_aarch64-${emulatorBuild}`;
84+
}
85+
else {
86+
downloadUrlSuffix = `_x64-${emulatorBuild}`;
87+
}
88+
}
89+
else if (majorBuildVersion >= 7000000) {
90+
downloadUrlSuffix = `_x64-${emulatorBuild}`;
91+
}
92+
else {
93+
downloadUrlSuffix = `-${emulatorBuild}`;
94+
}
7995
yield exec.exec(`curl -fo emulator.zip https://dl.google.com/android/repository/emulator-${isOnMac ? 'darwin' : 'linux'}${downloadUrlSuffix}.zip`);
8096
yield exec.exec(`unzip -o -q emulator.zip -d ${process.env.ANDROID_HOME}`);
8197
yield io.rmRF('emulator.zip');

0 commit comments

Comments
 (0)