From 205fbe1b318941d3705cdfdc9fb368de9ba63ca3 Mon Sep 17 00:00:00 2001 From: Yang Date: Wed, 13 Jan 2021 15:47:58 +1100 Subject: [PATCH] Always add path for cmdline-tools to support macos-11.0. --- .github/workflows/workflow.yml | 2 +- lib/sdk-installer.js | 4 ++-- src/sdk-installer.ts | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 00e497187..a677231f3 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -30,7 +30,7 @@ jobs: - target: google_apis api-level: 29 include: - - os: macos-latest + - os: macos-11.0 api-level: 30 target: google_apis - os: macos-latest diff --git a/lib/sdk-installer.js b/lib/sdk-installer.js index ecaeec09a..746438fba 100644 --- a/lib/sdk-installer.js +++ b/lib/sdk-installer.js @@ -54,9 +54,9 @@ function installAndroidSdk(apiLevel, target, arch, emulatorBuild, ndkVersion, cm const downloadPath = yield tc.downloadTool(sdkUrl); yield tc.extractZip(downloadPath, cmdlineToolsPath); yield io.mv(`${cmdlineToolsPath}/cmdline-tools`, `${cmdlineToolsPath}/latest`); - // add paths for commandline-tools and platform-tools - core.addPath(`${cmdlineToolsPath}/latest:${cmdlineToolsPath}/latest/bin:${process.env.ANDROID_SDK_ROOT}/platform-tools`); } + // add paths for commandline-tools and platform-tools + core.addPath(`${cmdlineToolsPath}/latest:${cmdlineToolsPath}/latest/bin:${process.env.ANDROID_SDK_ROOT}/platform-tools`); // additional permission and license requirements for Linux const sdkPreviewLicensePath = `${process.env.ANDROID_SDK_ROOT}/licenses/android-sdk-preview-license`; if (!isOnMac && !fs.existsSync(sdkPreviewLicensePath)) { diff --git a/src/sdk-installer.ts b/src/sdk-installer.ts index ca1d36c31..d00c229de 100644 --- a/src/sdk-installer.ts +++ b/src/sdk-installer.ts @@ -26,10 +26,11 @@ export async function installAndroidSdk(apiLevel: number, target: string, arch: const downloadPath = await tc.downloadTool(sdkUrl); await tc.extractZip(downloadPath, cmdlineToolsPath); await io.mv(`${cmdlineToolsPath}/cmdline-tools`, `${cmdlineToolsPath}/latest`); - // add paths for commandline-tools and platform-tools - core.addPath(`${cmdlineToolsPath}/latest:${cmdlineToolsPath}/latest/bin:${process.env.ANDROID_SDK_ROOT}/platform-tools`); } + // add paths for commandline-tools and platform-tools + core.addPath(`${cmdlineToolsPath}/latest:${cmdlineToolsPath}/latest/bin:${process.env.ANDROID_SDK_ROOT}/platform-tools`); + // additional permission and license requirements for Linux const sdkPreviewLicensePath = `${process.env.ANDROID_SDK_ROOT}/licenses/android-sdk-preview-license`; if (!isOnMac && !fs.existsSync(sdkPreviewLicensePath)) {