From c468455ebe26bc67dc283c527aec0517bdc3a2c9 Mon Sep 17 00:00:00 2001 From: micbakos-rdx Date: Mon, 23 Sep 2024 18:17:35 +0300 Subject: [PATCH] WIP --- .github/workflows/test.yml | 17 ----------------- jvm/sargon-android/build.gradle.kts | 7 ++----- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b00f2743e..684a579e5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -155,20 +155,6 @@ jobs: steps: - uses: RDXWorks-actions/checkout@main - - name: Install Rust Toolchain for aarch64-linux-android - uses: RDXWorks-actions/toolchain@master - with: - toolchain: ${{ env.RUST_TOOLCHAIN }} - components: ${{ env.RUST_COMPONENTS }} - target: aarch64-linux-android - - - name: Install Rust Toolchain for armv7-linux-androideabi - uses: RDXWorks-actions/toolchain@master - with: - toolchain: ${{ env.RUST_TOOLCHAIN }} - components: ${{ env.RUST_COMPONENTS }} - target: armv7-linux-androideabi - - name: Install Rust Toolchain for x86_64-unknown-linux-gnu uses: RDXWorks-actions/toolchain@master with: @@ -189,9 +175,6 @@ jobs: - name: Setup Android SDK uses: RDXWorks-actions/setup-android@v2 - - name: Install cargo-ndk - run: cargo install cargo-ndk - - name: Test JVM with coverage run: ./jvm/gradlew -p jvm/sargon-android koverXmlReportDebug diff --git a/jvm/sargon-android/build.gradle.kts b/jvm/sargon-android/build.gradle.kts index df63fcc74..f47b4bf77 100644 --- a/jvm/sargon-android/build.gradle.kts +++ b/jvm/sargon-android/build.gradle.kts @@ -183,8 +183,7 @@ android.libraryVariants.all { val generateBindings = tasks.register("generate${buildTypeUpper}UniFFIBindings") { group = BasePlugin.BUILD_GROUP - var binaryFile: File? = null - doFirst { + doLast { // Uniffi needs a binary library to generate the bindings // - If in a previous task an android binary is generated, we use that // (the build is intended to be used in an android device) @@ -201,7 +200,7 @@ android.libraryVariants.all { .filter { path -> path.endsWith("libsargon.so") } .map { File(it) }.toList().firstOrNull() - binaryFile = androidBinaryFile ?: Files.walk(File("${rootDir}/sargon-desktop/src/main").toPath()) + val binaryFile = androidBinaryFile ?: Files.walk(File("${rootDir}/sargon-desktop/src/main").toPath()) // Desktop binaries are searched .filter { !Files.isDirectory(it) } .map { it.toString() } @@ -213,9 +212,7 @@ android.libraryVariants.all { .find { file -> file.parentFile.name == hostTarget.jnaName } - } - doLast { val file = binaryFile ?.relativeTo(rootDir.parentFile) ?: error("Could not find library file to generate bindings")