Skip to content

Commit

Permalink
Add support for API 15-19 system images.
Browse files Browse the repository at this point in the history
  • Loading branch information
ychescale9 committed Mar 5, 2020
1 parent 4a94905 commit ede514c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
api-level: [21, 23, 29]
api-level: [16, 21, 23, 29]
steps:
- name: checkout
uses: actions/checkout@v2
Expand All @@ -37,7 +37,7 @@ jobs:
uses: ./
with:
api-level: ${{ matrix.api-level }}
target: google_apis
target: default
arch: x86
profile: Nexus 6
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ jobs:

| | **Required** | **Default** | **Description** |
|----------------------|--------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `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 21**. |
| `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**. |
| `target` | Optional | `default` | Target of the system image - `default` or `google_apis`. |
| `arch` | Optional | `x86` | CPU architecture of the system image - `x86` or `x86_64`. |
| `arch` | Optional | `x86` | CPU architecture of the system image - `x86` or `x86_64`. Note that `x86_64` image is only available for API 21+. |
| `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". |
| `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`. |
| `disable-animations` | Optional | `true` | Whether to disable animations - `true` or `false`. |
Expand Down
4 changes: 2 additions & 2 deletions __tests__/input-validator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ describe('api-level validator tests', () => {

it('Throws if api-level is lower than min API supported', () => {
const func = () => {
validator.checkApiLevel('20');
validator.checkApiLevel('14');
};
expect(func).toThrowError(`Minimum API level supported is ${validator.MIN_API_LEVEL}.`);
});

it('Validates successfully with valid api-level', () => {
const func1 = () => {
validator.checkApiLevel('21');
validator.checkApiLevel('15');
};
expect(func1).not.toThrow();

Expand Down
2 changes: 1 addition & 1 deletion lib/input-validator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MIN_API_LEVEL = 21;
exports.MIN_API_LEVEL = 15;
exports.VALID_TARGETS = ['default', 'google_apis'];
exports.VALID_ARCHS = ['x86', 'x86_64'];
function checkApiLevel(apiLevel) {
Expand Down
2 changes: 1 addition & 1 deletion src/input-validator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const MIN_API_LEVEL = 21;
export const MIN_API_LEVEL = 15;
export const VALID_TARGETS: Array<string> = ['default', 'google_apis'];
export const VALID_ARCHS: Array<string> = ['x86', 'x86_64'];

Expand Down

0 comments on commit ede514c

Please sign in to comment.