mirror of
https://github.com/reactivecircus/android-emulator-runner.git
synced 2026-09-03 10:59:32 +00:00
Support API 30 system images and add API 30 to workflow. Update build tools to 30.0.0. Update test projec’s compileSdk and targetSdk to API 30.
This commit is contained in:
@@ -17,7 +17,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const exec = __importStar(require("@actions/exec"));
|
||||
const BUILD_TOOLS_VERSION = '29.0.3';
|
||||
const BUILD_TOOLS_VERSION = '30.0.0';
|
||||
const CMDLINE_TOOLS_URL_MAC = 'https://dl.google.com/android/repository/commandlinetools-mac-6514223_latest.zip';
|
||||
const CMDLINE_TOOLS_URL_LINUX = 'https://dl.google.com/android/repository/commandlinetools-linux-6514223_latest.zip';
|
||||
/**
|
||||
@@ -37,9 +37,13 @@ function installAndroidSdk(apiLevel, target, arch, emulatorBuild, ndkVersion, cm
|
||||
core.addPath(`${process.env.ANDROID_HOME}/cmdline-tools/tools:${process.env.ANDROID_HOME}/cmdline-tools/tools/bin:${process.env.ANDROID_HOME}/platform-tools`);
|
||||
// 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 \\"sudo chown $USER:$USER ${process.env.ANDROID_HOME} -R`);
|
||||
yield exec.exec(`sh -c \\"echo -e '\n84831b9409646a918e30573bab4c9c91346d8abd' > ${process.env.ANDROID_HOME}/licenses/android-sdk-preview-license"`);
|
||||
}
|
||||
// license required for API 30 system images
|
||||
if (apiLevel == 30) {
|
||||
yield exec.exec(`sh -c \\"echo -e '\n859f317696f67ef3d7f30a50a5560e7834b43903' > ${process.env.ANDROID_HOME}/licenses/android-sdk-arm-dbt-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) {
|
||||
|
||||
Reference in New Issue
Block a user