mirror of
https://github.com/reactivecircus/android-emulator-runner.git
synced 2026-09-03 19:09:32 +00:00
Support choosing channel to download SDK components from.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
export const MIN_API_LEVEL = 15;
|
||||
export const VALID_TARGETS: Array<string> = ['default', 'google_apis', 'google_apis_playstore', 'android-wear', 'android-wear-cn', 'android-tv', 'google-tv'];
|
||||
export const VALID_ARCHS: Array<string> = ['x86', 'x86_64', 'arm64-v8a'];
|
||||
export const VALID_CHANNELS: Array<string> = ['stable', 'beta', 'dev', 'canary'];
|
||||
|
||||
export function checkApiLevel(apiLevel: string): void {
|
||||
if (isNaN(Number(apiLevel)) || !Number.isInteger(Number(apiLevel))) {
|
||||
@@ -23,6 +24,12 @@ export function checkArch(arch: string): void {
|
||||
}
|
||||
}
|
||||
|
||||
export function checkChannel(channel: string): void {
|
||||
if (!VALID_CHANNELS.includes(channel)) {
|
||||
throw new Error(`Value for input.channel '${channel}' is unknown. Supported options: ${VALID_CHANNELS}.`);
|
||||
}
|
||||
}
|
||||
|
||||
export function checkForceAvdCreation(forceAvdCreation: string): void {
|
||||
if (!isValidBoolean(forceAvdCreation)) {
|
||||
throw new Error(`Input for input.force-avd-creation should be either 'true' or 'false'.`);
|
||||
|
||||
Reference in New Issue
Block a user