Skip to content

Commit 62dbb60

Browse files
committed
Merge branch 'main' into release/v2
* main: Prepare for release 2.33.0. Fix avd path on ubuntu-24.04 - attempt 2 (#415) Revert creating avd directory. (#414) Fix SDK path issues with ubuntu-24.04 (#409) SDK build tools 35.0.0, command-line tools 16.0. (#408) Avoid changing the owner of unnecessary files (#406) Update npm packages. (#401)
2 parents f0d1ed2 + c77bfe7 commit 62dbb60

File tree

10 files changed

+61
-75
lines changed

10 files changed

+61
-75
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,32 @@ jobs:
1818
timeout-minutes: 15
1919
strategy:
2020
matrix:
21-
os: [ubuntu-latest]
22-
api-level: [23, 29]
23-
target: [default, google_apis]
24-
arch: [x86]
25-
exclude:
26-
- target: google_apis
27-
api-level: 16
28-
- target: google_apis
29-
api-level: 23
30-
- target: google_apis
31-
api-level: 29
3221
include:
33-
- os: ubuntu-latest
22+
- os: ubuntu-22.04
23+
api-level: 23
24+
target: default
25+
arch: x86
26+
- os: ubuntu-24.04
3427
api-level: 24
3528
target: playstore
3629
arch: x86
37-
- os: ubuntu-latest
38-
api-level: 30
39-
target: aosp_atd
40-
arch: x86
41-
- os: macos-latest
30+
- os: macos-13
4231
api-level: 31
43-
target: google_apis
32+
target: default
4433
arch: x86_64
45-
- os: ubuntu-latest
34+
- os: ubuntu-24.04
4635
api-level: 34
4736
target: aosp_atd
4837
arch: x86_64
38+
- os: ubuntu-lastest
39+
api-level: 35
40+
target: google_apis
41+
arch: x86_64
4942

5043
steps:
5144
- name: checkout
5245
uses: actions/checkout@v4
5346

54-
- name: validate gradle wrapper
55-
uses: gradle/wrapper-validation-action@v2
56-
5747
- name: build, test and lint
5848
run: |
5949
npm install
@@ -64,7 +54,7 @@ jobs:
6454
- uses: actions/setup-java@v4
6555
with:
6656
distribution: 'zulu'
67-
java-version: 21
57+
java-version: 23
6858

6959
- uses: actions/cache@v4
7060
id: avd-cache
@@ -73,9 +63,9 @@ jobs:
7363
~/.android/avd/*
7464
~/.android/adb*
7565
~/.android/debug.keystore
76-
key: avd-${{ matrix.api-level }}-${{ matrix.os }}-${{ matrix.target }}
66+
key: avd-${{ matrix.api-level }}-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.arch }}
7767

78-
- uses: gradle/actions/setup-gradle@v3
68+
- uses: gradle/actions/setup-gradle@v4
7969

8070
- name: assemble tests
8171
working-directory: test-fixture

.github/workflows/manually.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ on:
99
api-level:
1010
description: 'API level of the platform and system image'
1111
required: true
12-
default: '30'
12+
default: '34'
1313
target:
1414
description: 'target of the system image - default, google_apis, google_apis_playstore, aosp_atd, google_atd, android-wear, android-wear-cn, android-tv or google-tv'
1515
required: true
1616
default: 'default'
1717
arch:
1818
description: 'CPU architecture of the system image - x86, x86_64 or arm64-v8a'
19-
default: 'x86'
19+
default: 'x86_64'
2020
emulator-options:
2121
description: 'command-line options used when launching the emulator'
2222
default: '-no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim'
@@ -41,9 +41,6 @@ jobs:
4141
- name: checkout
4242
uses: actions/checkout@v4
4343

44-
- name: validate gradle wrapper
45-
uses: gradle/wrapper-validation-action@v2
46-
4744
- name: build, test and lint
4845
run: |
4946
npm install
@@ -54,11 +51,9 @@ jobs:
5451
- uses: actions/setup-java@v4
5552
with:
5653
distribution: 'zulu'
57-
java-version: 21
54+
java-version: 23
5855

59-
- uses: gradle/actions/setup-gradle@v3
60-
with:
61-
gradle-home-cache-cleanup: true
56+
- uses: gradle/actions/setup-gradle@v4
6257

6358
- name: enable KVM for linux runners
6459
if: runner.os == 'Linux'

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.33.0
4+
5+
* Fix missing AVD directory in `ubuntu-24.04` runner. - [415](https://github.com/ReactiveCircus/android-emulator-runner/pull/415)
6+
* Update SDK build tools to `35.0.0`, update SDK command-line tools to `16.0`. - [#356](https://github.com/ReactiveCircus/android-emulator-runner/pull/356)
7+
* Stop changing owner of the SDK directory. - [406](https://github.com/ReactiveCircus/android-emulator-runner/pull/406) [#409](https://github.com/ReactiveCircus/android-emulator-runner/pull/409)
8+
* Upgrade to latest npm dependencies. - [#401](https://github.com/ReactiveCircus/android-emulator-runner/pull/401)
9+
310
## v2.32.0
411

512
* Add `port` parameter for customizing the emulator port to use. - [#383](https://github.com/ReactiveCircus/android-emulator-runner/pull/383)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
122122
We can significantly reduce emulator startup time by setting up AVD snapshot caching:
123123
124-
1. add a `gradle/actions/setup-gradle@v3` step for caching Gradle, more details see [#229](https://github.com/ReactiveCircus/android-emulator-runner/issues/229)
124+
1. add a `gradle/actions/setup-gradle@v4` step for caching Gradle, more details see [#229](https://github.com/ReactiveCircus/android-emulator-runner/issues/229)
125125
2. add an `actions/cache@v4` step for caching the `avd`
126126
3. add a `reactivecircus/android-emulator-runner@v2` step to generate a clean snapshot - specify `emulator-options` without `no-snapshot`
127127
4. add another `reactivecircus/android-emulator-runner@v2` step to run your tests using existing AVD / snapshot - specify `emulator-options` with `no-snapshot-save`

lib/sdk-installer.js

Lines changed: 5 additions & 7 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 = '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';
41+
const BUILD_TOOLS_VERSION = '35.0.0';
42+
// SDK command-line tools 16.0
43+
const CMDLINE_TOOLS_URL_MAC = 'https://dl.google.com/android/repository/commandlinetools-mac-12266719_latest.zip';
44+
const CMDLINE_TOOLS_URL_LINUX = 'https://dl.google.com/android/repository/commandlinetools-linux-12266719_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.
@@ -52,9 +52,6 @@ function installAndroidSdk(apiLevel, target, arch, channelId, emulatorBuild, ndk
5252
console.log(`::group::Install Android SDK`);
5353
const isOnMac = process.platform === 'darwin';
5454
const isArm = process.arch === 'arm64';
55-
if (!isOnMac) {
56-
yield exec.exec(`sh -c \\"sudo chown $USER:$USER ${process.env.ANDROID_HOME} -R`);
57-
}
5855
const cmdlineToolsPath = `${process.env.ANDROID_HOME}/cmdline-tools`;
5956
if (!fs.existsSync(cmdlineToolsPath)) {
6057
console.log('Installing new cmdline-tools.');
@@ -66,6 +63,7 @@ function installAndroidSdk(apiLevel, target, arch, channelId, emulatorBuild, ndk
6663
// add paths for commandline-tools and platform-tools
6764
core.addPath(`${cmdlineToolsPath}/latest:${cmdlineToolsPath}/latest/bin:${process.env.ANDROID_HOME}/platform-tools`);
6865
// set standard AVD path
66+
yield io.mkdirP(`${process.env.HOME}/.android/avd`);
6967
core.exportVariable('ANDROID_AVD_HOME', `${process.env.HOME}/.android/avd`);
7068
// accept all Android SDK licenses
7169
yield exec.exec(`sh -c \\"yes | sdkmanager --licenses > /dev/null"`);

package-lock.json

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

src/sdk-installer.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import * as io from '@actions/io';
44
import * as tc from '@actions/tool-cache';
55
import * as fs from 'fs';
66

7-
const BUILD_TOOLS_VERSION = '34.0.0';
8-
// SDK command-line tools 11.0
9-
const CMDLINE_TOOLS_URL_MAC = 'https://dl.google.com/android/repository/commandlinetools-mac-10406996_latest.zip';
10-
const CMDLINE_TOOLS_URL_LINUX = 'https://dl.google.com/android/repository/commandlinetools-linux-10406996_latest.zip';
7+
const BUILD_TOOLS_VERSION = '35.0.0';
8+
// SDK command-line tools 16.0
9+
const CMDLINE_TOOLS_URL_MAC = 'https://dl.google.com/android/repository/commandlinetools-mac-12266719_latest.zip';
10+
const CMDLINE_TOOLS_URL_LINUX = 'https://dl.google.com/android/repository/commandlinetools-linux-12266719_latest.zip';
1111

1212
/**
1313
* Installs & updates the Android SDK for the macOS platform, including SDK platform for the chosen API level, latest build tools, platform tools, Android Emulator,
@@ -19,10 +19,6 @@ export async function installAndroidSdk(apiLevel: string, target: string, arch:
1919
const isOnMac = process.platform === 'darwin';
2020
const isArm = process.arch === 'arm64';
2121

22-
if (!isOnMac) {
23-
await exec.exec(`sh -c \\"sudo chown $USER:$USER ${process.env.ANDROID_HOME} -R`);
24-
}
25-
2622
const cmdlineToolsPath = `${process.env.ANDROID_HOME}/cmdline-tools`;
2723
if (!fs.existsSync(cmdlineToolsPath)) {
2824
console.log('Installing new cmdline-tools.');
@@ -36,6 +32,7 @@ export async function installAndroidSdk(apiLevel: string, target: string, arch:
3632
core.addPath(`${cmdlineToolsPath}/latest:${cmdlineToolsPath}/latest/bin:${process.env.ANDROID_HOME}/platform-tools`);
3733

3834
// set standard AVD path
35+
await io.mkdirP(`${process.env.HOME}/.android/avd`);
3936
core.exportVariable('ANDROID_AVD_HOME', `${process.env.HOME}/.android/avd`);
4037

4138
// accept all Android SDK licenses

test-fixture/app/build.gradle

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ apply plugin: 'kotlin-android'
44
android {
55
namespace = "com.example.testapp"
66

7-
compileSdkVersion 34
8-
buildToolsVersion "34.0.0"
7+
compileSdkVersion 35
8+
buildToolsVersion "35.0.0"
99

1010
defaultConfig {
1111
applicationId "com.example.testapp"
12-
minSdkVersion 15
13-
targetSdkVersion 34
12+
minSdkVersion 21
13+
targetSdkVersion 35
1414
versionCode 1
1515
versionName "1.0"
1616

@@ -30,8 +30,7 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
3030
}
3131

3232
dependencies {
33-
implementation fileTree(dir: 'libs', include: ['*.jar'])
34-
implementation 'androidx.appcompat:appcompat:1.6.1'
35-
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
36-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
33+
implementation 'androidx.appcompat:appcompat:1.7.0'
34+
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
35+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
3736
}

test-fixture/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ buildscript {
66
mavenCentral()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:8.2.0'
10-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.21"
9+
classpath 'com.android.tools.build:gradle:8.7.0'
10+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.20"
1111

1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files

test-fixture/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)