Skip to content

Commit

Permalink
Fix avd path on ubuntu-24.04 - attempt 2 (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
ychescale9 authored Oct 12, 2024
1 parent e800fff commit ead704c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
api-level: 34
target: aosp_atd
arch: x86_64
- os: ubuntu-24.04
- os: ubuntu-lastest
api-level: 35
target: google_apis
arch: x86_64
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
~/.android/avd/*
~/.android/adb*
~/.android/debug.keystore
key: avd-${{ matrix.api-level }}-${{ matrix.os }}-${{ matrix.target }}
key: avd-${{ matrix.api-level }}-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.arch }}

- uses: gradle/actions/setup-gradle@v4

Expand Down
1 change: 1 addition & 0 deletions lib/sdk-installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function installAndroidSdk(apiLevel, target, arch, channelId, emulatorBuild, ndk
// add paths for commandline-tools and platform-tools
core.addPath(`${cmdlineToolsPath}/latest:${cmdlineToolsPath}/latest/bin:${process.env.ANDROID_HOME}/platform-tools`);
// set standard AVD path
yield io.mkdirP(`${process.env.HOME}/.android/avd`);
core.exportVariable('ANDROID_AVD_HOME', `${process.env.HOME}/.android/avd`);
// accept all Android SDK licenses
yield exec.exec(`sh -c \\"yes | sdkmanager --licenses > /dev/null"`);
Expand Down
1 change: 1 addition & 0 deletions src/sdk-installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export async function installAndroidSdk(apiLevel: string, target: string, arch:
core.addPath(`${cmdlineToolsPath}/latest:${cmdlineToolsPath}/latest/bin:${process.env.ANDROID_HOME}/platform-tools`);

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

// accept all Android SDK licenses
Expand Down

0 comments on commit ead704c

Please sign in to comment.