From eb7d67c2f5914c357e9590163707bf70fcc0ac8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Mon, 25 Nov 2024 11:28:46 +0100 Subject: [PATCH] Try detecting the NDK version automatically --- .github/workflows/android.yml | 12 ++++++++++-- platforms/android/library/build.gradle | 5 ++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index c3b09557f..e634d12cb 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -31,6 +31,14 @@ jobs: matrix: api-level: [29] steps: + - name: Check env vars + env: + ANDROID_NDK_TOOLCHAIN_DIR: ${{ ANDROID_NDK_HOME }}/toolchains + run: | + echo $ANDROID_NDK_TOOLCHAIN_DIR + ls $ANDROID_NDK_HOME + ls $ANDROID_NDK_TOOLCHAIN_DIR + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -50,8 +58,6 @@ jobs: - name: Setup Gradle & Build test cases uses: gradle/gradle-build-action@v3 - env: - ANDROID_NDK_TOOLCHAIN_DIR: ${{ env.ANDROID_NDK_HOME }}/toolchains with: build-root-directory: platforms/android cache-read-only: false @@ -64,6 +70,8 @@ jobs: - name: Run all tests with coverage uses: reactivecircus/android-emulator-runner@v2 + env: + ANDROID_NDK_TOOLCHAIN_DIR: ${{ env.ANDROID_NDK_HOME }}/toolchains with: working-directory: platforms/android api-level: ${{ matrix.api-level }} diff --git a/platforms/android/library/build.gradle b/platforms/android/library/build.gradle index 4fdec2966..361d30e85 100644 --- a/platforms/android/library/build.gradle +++ b/platforms/android/library/build.gradle @@ -20,6 +20,7 @@ cargo { targets = ["arm", "x86", "x86_64", "arm64"] targetIncludes = ["libuniffi_wysiwyg_composer.so"] targetDirectory = '../../../target' + prebuiltToolchain = true } android { @@ -68,9 +69,7 @@ android { testCoverage { jacocoVersion = "0.8.8" } - - ndkVersion = "27.1.12297006" - + packagingOptions { resources.excludes += 'META-INF/LICENSE.md' resources.excludes += 'META-INF/LICENSE-notice.md'