Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
micbakos-rdx committed Sep 23, 2024
1 parent 9325809 commit c468455
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down
7 changes: 2 additions & 5 deletions jvm/sargon-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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() }
Expand All @@ -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")
Expand Down

0 comments on commit c468455

Please sign in to comment.