Skip to content

Commit

Permalink
Update android and jvm workflows and plugins for root rust /target
Browse files Browse the repository at this point in the history
  • Loading branch information
notmandatory committed Nov 15, 2022
1 parent 8857c85 commit 063f692
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
with:
args: --manifest-path bdk-ffi/Cargo.toml
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/publish-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
bdk-ffi/target
./target
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}

- name: Set up JDK
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-jvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
./bdk-ffi/target
./target
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}

- name: Set up JDK
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
./bdk-ffi/target
./target
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}

- name: Set up JDK
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
bdk-ffi/target
./target
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}

- name: Set up JDK
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-jvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
bdk-ffi/target
./target
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}

- name: Set up JDK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ internal class UniFfiAndroidPlugin : Plugin<Project> {
}
}

// move the native libs build by cargo from bdk-ffi/target/<architecture>/release/
// move the native libs build by cargo from target/<architecture>/release/
// to their place in the bdk-android library
// the task only copies the available binaries built using the buildAndroid<architecture>Binary tasks
val moveNativeAndroidLibs by tasks.register<Copy>("moveNativeAndroidLibs") {
Expand All @@ -124,15 +124,15 @@ internal class UniFfiAndroidPlugin : Plugin<Project> {
into("${project.projectDir}/../lib/src/main/jniLibs/")

into("arm64-v8a") {
from("${project.projectDir}/../../bdk-ffi/target/aarch64-linux-android/release-smaller/libbdkffi.so")
from("${project.projectDir}/../../target/aarch64-linux-android/release-smaller/libbdkffi.so")
}

into("x86_64") {
from("${project.projectDir}/../../bdk-ffi/target/x86_64-linux-android/release-smaller/libbdkffi.so")
from("${project.projectDir}/../../target/x86_64-linux-android/release-smaller/libbdkffi.so")
}

into("armeabi-v7a") {
from("${project.projectDir}/../../bdk-ffi/target/armv7-linux-androideabi/release-smaller/libbdkffi.so")
from("${project.projectDir}/../../target/armv7-linux-androideabi/release-smaller/libbdkffi.so")
}

doLast {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ internal class UniFfiJvmPlugin : Plugin<Project> {
}
}

// move the native libs build by cargo from bdk-ffi/target/.../release/
// move the native libs build by cargo from target/.../release/
// to their place in the bdk-jvm library
val moveNativeJvmLibs by tasks.register<DefaultTask>("moveNativeJvmLibs") {

Expand Down Expand Up @@ -76,7 +76,7 @@ internal class UniFfiJvmPlugin : Plugin<Project> {
doFirst {
copy {
with(it) {
from("${project.projectDir}/../../bdk-ffi/target/${this.targetDir}/release-smaller/libbdkffi.${this.ext}")
from("${project.projectDir}/../../target/${this.targetDir}/release-smaller/libbdkffi.${this.ext}")
into("${project.projectDir}/../../bdk-jvm/lib/src/main/resources/${this.resDir}/")
}
}
Expand Down

0 comments on commit 063f692

Please sign in to comment.