Skip to content

Commit

Permalink
Merge branch 'master' into release/v2
Browse files Browse the repository at this point in the history
* master:
  Prepare for release 2.6.1.
  Fix sdk license issue with API 28+ system images on Linux.
  • Loading branch information
ychescale9 committed Mar 31, 2020
2 parents 769ff28 + 22965df commit 0159db6
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
api-level: [16, 23, 29]
api-level: [16, 23, 28, 29]
exclude:
- os: ubuntu-latest
api-level: 23
- os: ubuntu-latest
api-level: 29
- os: macos-latest
api-level: 28
steps:
- name: checkout
uses: actions/checkout@v2
Expand Down
14 changes: 9 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
# Change Log

## v2.6.1

* Fixed SDK license issue on Linux when downloading API 28+ system images - [#42](https://github.com/ReactiveCircus/android-emulator-runner/issues/42).

## v2.6.0

* Added support for Linux VMs (no hardware acceleration).
* Added support for Linux VMs (no hardware acceleration) - [#15](https://github.com/ReactiveCircus/android-emulator-runner/issues/15).

## v2.5.0

* Added support for API 15-19 system images.
* Switched to the new SDK command-line tools which supports running `sdkmanager` and `avdmanager` with Java 9+.
* Added support for API 15-19 system images - [#26](https://github.com/ReactiveCircus/android-emulator-runner/issues/26).
* Switched to the new SDK command-line tools which supports running `sdkmanager` and `avdmanager` with Java 9+ - [#25](https://github.com/ReactiveCircus/android-emulator-runner/issues/25).

## v2.4.0

* Added support for setting custom `working-directory` - e.g. `./android` if your root Gradle project is under the `./android` sub-directory within your repository.
* Added support for setting custom `working-directory` - e.g. `./android` if your root Gradle project is under the `./android` sub-directory within your repository - [#22](https://github.com/ReactiveCircus/android-emulator-runner/issues/22).

## v2.3.2

* Fixed an issue where environment variables are escaped in script.
* Fixed an issue where environment variables are escaped in script - [#19](https://github.com/ReactiveCircus/android-emulator-runner/issues/19).

## v2.3.1

Expand Down
4 changes: 2 additions & 2 deletions lib/emulator-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
const exec = __importStar(require("@actions/exec"));
const EMULATOR_BOOT_TIMEOUT_SECONDS = 300;
const EMULATOR_BOOT_TIMEOUT_SECONDS = 600;
/**
* Creates and launches a new AVD instance with the specified configurations.
*/
Expand Down Expand Up @@ -99,7 +99,7 @@ function waitForDevice() {
}
}
catch (error) {
console.log(error.message);
console.warn(error.message);
}
if (attempts < maxAttemps) {
yield delay(retryInterval * 1000);
Expand Down
6 changes: 5 additions & 1 deletion lib/sdk-installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ function installAndroidSdk(apiLevel, target, arch, emulatorBuild) {
yield exec.exec(`sudo rm -f commandlinetools.zip`);
// add paths for commandline-tools and platform-tools
core.addPath(`${process.env.ANDROID_HOME}/cmdline-tools/tools:${process.env.ANDROID_HOME}/cmdline-tools/tools/bin:${process.env.ANDROID_HOME}/platform-tools`);
yield exec.exec(`sh -c \\"sudo chmod -R 777 ${process.env.ANDROID_HOME}"`);
// additional permission and license requirements for Linux
if (!isOnMac) {
yield exec.exec(`sh -c \\"sudo chmod -R 777 ${process.env.ANDROID_HOME}"`);
yield exec.exec(`sh -c \\"echo -e '\n84831b9409646a918e30573bab4c9c91346d8abd' > ${process.env.ANDROID_HOME}/licenses/android-sdk-preview-license"`);
}
console.log('Installing latest build tools, platform tools, and platform.');
yield exec.exec(`sh -c \\"sdkmanager --install 'build-tools;${BUILD_TOOLS_VERSION}' platform-tools 'platforms;android-${apiLevel}' > /dev/null"`);
if (emulatorBuild) {
Expand Down
4 changes: 2 additions & 2 deletions src/emulator-manager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as exec from '@actions/exec';

const EMULATOR_BOOT_TIMEOUT_SECONDS = 300;
const EMULATOR_BOOT_TIMEOUT_SECONDS = 600;

/**
* Creates and launches a new AVD instance with the specified configurations.
Expand Down Expand Up @@ -81,7 +81,7 @@ async function waitForDevice(): Promise<void> {
break;
}
} catch (error) {
console.log(error.message);
console.warn(error.message);
}

if (attempts < maxAttemps) {
Expand Down
7 changes: 6 additions & 1 deletion src/sdk-installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ export async function installAndroidSdk(apiLevel: number, target: string, arch:

// add paths for commandline-tools and platform-tools
core.addPath(`${process.env.ANDROID_HOME}/cmdline-tools/tools:${process.env.ANDROID_HOME}/cmdline-tools/tools/bin:${process.env.ANDROID_HOME}/platform-tools`);
await exec.exec(`sh -c \\"sudo chmod -R 777 ${process.env.ANDROID_HOME}"`);

// additional permission and license requirements for Linux
if (!isOnMac) {
await exec.exec(`sh -c \\"sudo chmod -R 777 ${process.env.ANDROID_HOME}"`);
await exec.exec(`sh -c \\"echo -e '\n84831b9409646a918e30573bab4c9c91346d8abd' > ${process.env.ANDROID_HOME}/licenses/android-sdk-preview-license"`);
}

console.log('Installing latest build tools, platform tools, and platform.');

Expand Down

0 comments on commit 0159db6

Please sign in to comment.