Support API levels for SDK extensions and add missing targets for automotive and desktop. (#428)

This commit is contained in:
Timothy
2025-03-28 15:04:02 +01:00
committed by GitHub
parent 50d5b10c01
commit a173d65200
14 changed files with 127 additions and 90 deletions
+8 -4
View File
@@ -1,7 +1,6 @@
import * as core from '@actions/core';
import { installAndroidSdk } from './sdk-installer';
import {
checkApiLevel,
checkTarget,
checkArch,
checkDisableAnimations,
@@ -44,9 +43,14 @@ async function run() {
// API level of the platform and system image
const apiLevel = core.getInput('api-level', { required: true });
checkApiLevel(apiLevel);
console.log(`API level: ${apiLevel}`);
let systemImageApiLevel = core.getInput('system-image-api-level');
if (!systemImageApiLevel) {
systemImageApiLevel = apiLevel;
}
console.log(`System image API level: ${systemImageApiLevel}`);
// target of the system image
const targetInput = core.getInput('target');
const target = targetInput == 'playstore' ? 'google_apis_playstore' : targetInput;
@@ -185,7 +189,7 @@ async function run() {
console.log(`::endgroup::`);
// install SDK
await installAndroidSdk(apiLevel, target, arch, channelId, emulatorBuild, ndkVersion, cmakeVersion);
await installAndroidSdk(apiLevel, systemImageApiLevel, target, arch, channelId, emulatorBuild, ndkVersion, cmakeVersion);
// execute pre emulator launch script if set
if (preEmulatorLaunchScripts !== undefined) {
@@ -206,7 +210,7 @@ async function run() {
// launch an emulator
await launchEmulator(
apiLevel,
systemImageApiLevel,
target,
arch,
profile,