Skip to content

Commit c56210b

Browse files
committed
Merge branch 'main' into release/v2
* main: Prepare for release 2.11.1. Update npm packages. Bump @actions/core from 1.2.4 to 1.2.6 Update to gradle 6.7-rc-1 for test fixture. Build with Java 15 on CI. Improve GitHub Actions Gradle cache. Add square/radiography to adopter list Add cashapp/copper to adapter list SDK Build tools 30.0.2. Update fixture dependencies. Gradle 6.6. Update README.md Update packages. Build tools 30.0.1. Use fs for writing licence files. Update cmdline-tools to 2.1.
2 parents 4a8a9af + 04a32d7 commit c56210b

32 files changed

+4633
-1598
lines changed

.github/workflows/workflow.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,15 @@ jobs:
4747
npm run lint
4848
npm test
4949
50-
- name: Java 14
50+
- name: Java 15
5151
uses: actions/setup-java@v1
5252
with:
53-
java-version: 14
54-
- uses: actions/cache@v1
53+
java-version: 15
54+
- uses: actions/cache@v2
5555
with:
56-
path: ~/.gradle/caches
56+
path: |
57+
~/.gradle/caches
58+
~/.gradle/wrapper
5759
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
5860
- name: run action
5961
uses: ./

CHANGELOG.md

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

3+
## v2.11.1
4+
5+
* Update SDK command-line tools to `2.1`.
6+
* Update @actions/core to `1.2.6`.
7+
38
## v2.11.0
49

510
* Support running multiple instances of the action sequentially in a single job - [#73](https://github.com/ReactiveCircus/android-emulator-runner/issues/73).

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
| `api-level` | Required | N/A | API level of the platform system image - e.g. 23 for Android Marshmallow, 29 for Android 10. **Minimum API level supported is 15**. |
9292
| `target` | Optional | `default` | Target of the system image - `default` or `google_apis`. |
9393
| `arch` | Optional | `x86` | CPU architecture of the system image - `x86` or `x86_64`. Note that `x86_64` image is only available for API 21+. |
94-
| `profile` | Optional | N/A | Hardware profile used for creating the AVD - e.g. `Nexus 6`. For a list of all profiles available, run `$ANDROID_HOME/tools/bin/avdmanager list` and refer to the results under "Available Android Virtual Devices". |
94+
| `profile` | Optional | N/A | Hardware profile used for creating the AVD - e.g. `Nexus 6`. For a list of all profiles available, run `avdmanager list` and refer to the results under "Available Android Virtual Devices". |
9595
| `avd-name` | Optional | `test` | Custom AVD name used for creating the Android Virtual Device. |
9696
| `emulator-options` | Optional | See below | Command-line options used when launching the emulator (replacing all default options) - e.g. `-no-window -no-snapshot -camera-back emulated`. |
9797
| `disable-animations` | Optional | `true` | Whether to disable animations - `true` or `false`. |
@@ -129,5 +129,8 @@ These are some of the open-source projects using (or used) **Android Emulator Ru
129129
- [vinaygaba/Learn-Jetpack-Compose-By-Example](https://github.com/vinaygaba/Learn-Jetpack-Compose-By-Example/)
130130
- [ashishb/adb-enhanced](https://github.com/ashishb/adb-enhanced/tree/master/.github/workflows)
131131
- [vgaidarji/ci-matters](https://github.com/vgaidarji/ci-matters/blob/master/.github/workflows/main.yaml)
132+
- [simpledotorg/simple-android](https://github.com/simpledotorg/simple-android)
133+
- [cashapp/copper](https://github.com/cashapp/copper/blob/trunk/.github/workflows/build.yaml)
134+
- [square/radiography](https://github.com/square/radiography/blob/main/.github/workflows/android.yml)
132135

133136
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/emulator-manager.js

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
11
"use strict";
2+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3+
if (k2 === undefined) k2 = k;
4+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5+
}) : (function(o, m, k, k2) {
6+
if (k2 === undefined) k2 = k;
7+
o[k2] = m[k];
8+
}));
9+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10+
Object.defineProperty(o, "default", { enumerable: true, value: v });
11+
}) : function(o, v) {
12+
o["default"] = v;
13+
});
14+
var __importStar = (this && this.__importStar) || function (mod) {
15+
if (mod && mod.__esModule) return mod;
16+
var result = {};
17+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18+
__setModuleDefault(result, mod);
19+
return result;
20+
};
221
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
323
return new (P || (P = Promise))(function (resolve, reject) {
424
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
525
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6-
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
26+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
727
step((generator = generator.apply(thisArg, _arguments || [])).next());
828
});
929
};
10-
var __importStar = (this && this.__importStar) || function (mod) {
11-
if (mod && mod.__esModule) return mod;
12-
var result = {};
13-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
14-
result["default"] = mod;
15-
return result;
16-
};
1730
Object.defineProperty(exports, "__esModule", { value: true });
31+
exports.killEmulator = exports.launchEmulator = void 0;
1832
const exec = __importStar(require("@actions/exec"));
1933
const EMULATOR_BOOT_TIMEOUT_SECONDS = 600;
2034
/**

lib/input-validator.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
3+
exports.checkEmulatorBuild = exports.checkDisableAnimations = exports.checkArch = exports.checkTarget = exports.checkApiLevel = exports.VALID_ARCHS = exports.VALID_TARGETS = exports.MIN_API_LEVEL = void 0;
34
exports.MIN_API_LEVEL = 15;
45
exports.VALID_TARGETS = ['default', 'google_apis'];
56
exports.VALID_ARCHS = ['x86', 'x86_64'];

lib/main.js

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
11
"use strict";
2+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3+
if (k2 === undefined) k2 = k;
4+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5+
}) : (function(o, m, k, k2) {
6+
if (k2 === undefined) k2 = k;
7+
o[k2] = m[k];
8+
}));
9+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10+
Object.defineProperty(o, "default", { enumerable: true, value: v });
11+
}) : function(o, v) {
12+
o["default"] = v;
13+
});
14+
var __importStar = (this && this.__importStar) || function (mod) {
15+
if (mod && mod.__esModule) return mod;
16+
var result = {};
17+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18+
__setModuleDefault(result, mod);
19+
return result;
20+
};
221
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
323
return new (P || (P = Promise))(function (resolve, reject) {
424
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
525
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6-
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
26+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
727
step((generator = generator.apply(thisArg, _arguments || [])).next());
828
});
929
};
10-
var __importStar = (this && this.__importStar) || function (mod) {
11-
if (mod && mod.__esModule) return mod;
12-
var result = {};
13-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
14-
result["default"] = mod;
15-
return result;
16-
};
1730
Object.defineProperty(exports, "__esModule", { value: true });
1831
const core = __importStar(require("@actions/core"));
1932
const sdk_installer_1 = require("./sdk-installer");

lib/script-parser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
3+
exports.parseScript = void 0;
34
/**
45
* Convert a (potentially multi-line) script to an array of single-line script(s).
56
*/

lib/sdk-installer.js

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,41 @@
11
"use strict";
2+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3+
if (k2 === undefined) k2 = k;
4+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5+
}) : (function(o, m, k, k2) {
6+
if (k2 === undefined) k2 = k;
7+
o[k2] = m[k];
8+
}));
9+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10+
Object.defineProperty(o, "default", { enumerable: true, value: v });
11+
}) : function(o, v) {
12+
o["default"] = v;
13+
});
14+
var __importStar = (this && this.__importStar) || function (mod) {
15+
if (mod && mod.__esModule) return mod;
16+
var result = {};
17+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18+
__setModuleDefault(result, mod);
19+
return result;
20+
};
221
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
323
return new (P || (P = Promise))(function (resolve, reject) {
424
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
525
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6-
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
26+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
727
step((generator = generator.apply(thisArg, _arguments || [])).next());
828
});
929
};
10-
var __importStar = (this && this.__importStar) || function (mod) {
11-
if (mod && mod.__esModule) return mod;
12-
var result = {};
13-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
14-
result["default"] = mod;
15-
return result;
16-
};
1730
Object.defineProperty(exports, "__esModule", { value: true });
31+
exports.installAndroidSdk = void 0;
1832
const core = __importStar(require("@actions/core"));
1933
const exec = __importStar(require("@actions/exec"));
2034
const io = __importStar(require("@actions/io"));
2135
const fs = __importStar(require("fs"));
22-
const BUILD_TOOLS_VERSION = '30.0.0';
23-
const CMDLINE_TOOLS_URL_MAC = 'https://dl.google.com/android/repository/commandlinetools-mac-6514223_latest.zip';
24-
const CMDLINE_TOOLS_URL_LINUX = 'https://dl.google.com/android/repository/commandlinetools-linux-6514223_latest.zip';
36+
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';
2539
/**
2640
* Installs & updates the Android SDK for the macOS platform, including SDK platform for the chosen API level, latest build tools, platform tools, Android Emulator,
2741
* and the system image for the chosen API level, CPU arch, and target.
@@ -46,12 +60,12 @@ function installAndroidSdk(apiLevel, target, arch, emulatorBuild, ndkVersion, cm
4660
// additional permission and license requirements for Linux
4761
const sdkPreviewLicensePath = `${process.env.ANDROID_HOME}/licenses/android-sdk-preview-license`;
4862
if (!isOnMac && !fs.existsSync(sdkPreviewLicensePath)) {
49-
yield exec.exec(`sh -c \\"echo -e '\n84831b9409646a918e30573bab4c9c91346d8abd' > ${sdkPreviewLicensePath}"`);
63+
fs.writeFileSync(sdkPreviewLicensePath, '\n84831b9409646a918e30573bab4c9c91346d8abd');
5064
}
5165
// license required for API 30 system images
5266
const sdkArmDbtLicensePath = `${process.env.ANDROID_HOME}/licenses/android-sdk-arm-dbt-license`;
5367
if (apiLevel == 30 && !fs.existsSync(sdkArmDbtLicensePath)) {
54-
yield exec.exec(`sh -c \\"echo -e '\n859f317696f67ef3d7f30a50a5560e7834b43903' > ${sdkArmDbtLicensePath}"`);
68+
fs.writeFileSync(sdkArmDbtLicensePath, '\n859f317696f67ef3d7f30a50a5560e7834b43903');
5569
}
5670
console.log('Installing latest build tools, platform tools, and platform.');
5771
yield exec.exec(`sh -c \\"sdkmanager --install 'build-tools;${BUILD_TOOLS_VERSION}' platform-tools 'platforms;android-${apiLevel}' > /dev/null"`);

node_modules/@actions/core/lib/file-command.d.ts

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

node_modules/@actions/core/lib/file-command.js

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

0 commit comments

Comments
 (0)