Skip to content

Commit

Permalink
Temp 16: Revert back to uniffi 0.23.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Oct 5, 2023
1 parent 413ec98 commit 52935c2
Show file tree
Hide file tree
Showing 14 changed files with 277 additions and 273 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
rust:
- version: 1.72.1 # STABLE
- version: 1.67.0
clippy: true
# TODO: Should we keep this? We'll need to pin dependencies
# - version: 1.61.0 # MSRV
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.72.1"
run: rustup default 1.72.1
- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0

- name: "Install Rust Android targets"
run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish-jvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.72.1"
run: rustup default 1.72.1
- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0

- name: "Install aarch64 Rust target"
run: rustup target add aarch64-apple-darwin
Expand Down Expand Up @@ -54,8 +54,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.72.1"
run: rustup default 1.72.1
- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0

- name: "Install x86_64-pc-windows-msvc Rust target"
run: rustup target add x86_64-pc-windows-msvc
Expand Down Expand Up @@ -94,8 +94,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.72.1"
run: rustup default 1.72.1
- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0

- name: "Build bdk-jvm library"
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.72.1"
run: rustup default 1.72.1
- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0

- name: "Install Rust Android targets"
run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/test-jvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,10 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.72.1"
run: rustup default 1.72.1
- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0

- name: "Run JVM tests"
run: |
cd bdk-jvm
./gradlew buildJvmLib
./gradlew test
- name: "Print directory structure"
run: |
pwd
ls -R
4 changes: 2 additions & 2 deletions .github/workflows/test-swift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: "Set default Rust version to 1.72.1"
run: rustup default 1.72.1
- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0

- name: Install Rust targets
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,14 @@ internal class UniFfiAndroidPlugin : Plugin<Project> {
val generateAndroidBindings by tasks.register<Exec>("generateAndroidBindings") {
dependsOn(moveNativeAndroidLibs)

val libraryPath = "${project.projectDir}/../../bdk-ffi/target/aarch64-linux-android/release-smaller/libbdkffi.so"
workingDir("${project.projectDir}/../../bdk-ffi")
// val libraryPath = "${project.projectDir}/../../bdk-ffi/target/aarch64-linux-android/release-smaller/libbdkffi.so"
// workingDir("${project.projectDir}/../../bdk-ffi")
// val cargoArgs: List<String> = listOf("run", "--bin", "uniffi-bindgen", "generate", "--library", libraryPath, "--language", "kotlin", "--out-dir", "../bdk-android/lib/src/main/kotlin", "--no-format")

val cargoArgs: List<String> = listOf("run", "--bin", "uniffi-bindgen", "generate", "--library", libraryPath, "--language", "kotlin", "--out-dir", "../bdk-android/lib/src/main/kotlin", "--no-format")
// The code above worked for uniffi 0.24.3 using the --library flag
// The code below works for uniffi 0.23.0
workingDir("${project.projectDir}/../../bdk-ffi")
val cargoArgs: List<String> = listOf("run", "--bin", "uniffi-bindgen", "generate", "src/bdk.udl", "--language", "kotlin", "--out-dir", "../bdk-android/lib/src/main/kotlin", "--no-format")

executable("cargo")
args(cargoArgs)
Expand Down
Loading

0 comments on commit 52935c2

Please sign in to comment.