From dd8dcfbab1d8aa8a408ab57cb5e934684679533d Mon Sep 17 00:00:00 2001 From: LoveSy Date: Tue, 24 May 2022 22:35:24 +0800 Subject: [PATCH] Use cmake 3.22.1 from Android SDK (#1959) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 南宫雪珊 --- .github/workflows/core.yml | 4 +--- build.gradle.kts | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 51199b54..874502d8 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -62,7 +62,7 @@ jobs: restore-keys: native-cache- - name: Install dep run: | - sudo apt-get install -y ccache ninja-build + sudo apt-get install -y ccache ccache -o max_size=1G ccache -o hash_dir=false ccache -o compiler_check='%compiler% -dumpmachine; %compiler% -dumpversion' @@ -77,8 +77,6 @@ jobs: echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties echo 'android.native.buildOutput=verbose' >> gradle.properties echo 'buildCache { local { removeUnusedEntriesAfterDays = 1 } }' >> settings.gradle.kts - ln -s $(which ninja) $(dirname $(which cmake)) # https://issuetracker.google.com/issues/206099937 - echo "cmake.dir=$(dirname $(dirname $(which cmake)))" >> local.properties ./gradlew zipAll ccache -s - name: Prepare artifact diff --git a/build.gradle.kts b/build.gradle.kts index f229efdc..13ec9838 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -79,6 +79,12 @@ fun Project.configureBaseExtension() { ndkVersion = androidCompileNdkVersion buildToolsVersion = androidBuildToolsVersion + externalNativeBuild { + cmake { + version = "3.22.1+" + } + } + defaultConfig { minSdk = androidMinSdkVersion targetSdk = androidTargetSdkVersion