diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index 5db79fd0..a7f1b61f 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -56,7 +56,7 @@ jobs: run: cargo clippy --all-targets --features "uniffi/bindgen-tests" -- -D warnings - name: "Test" - run: CLASSPATH=./tests/jna/jna-5.8.0.jar cargo test --features uniffi/bindgen-tests + run: CLASSPATH=./tests/jna/jna-5.14.0.jar cargo test --features uniffi/bindgen-tests fmt: name: "Rust fmt" diff --git a/bdk-android/lib/build.gradle.kts b/bdk-android/lib/build.gradle.kts index 43d9c41b..80211ce3 100644 --- a/bdk-android/lib/build.gradle.kts +++ b/bdk-android/lib/build.gradle.kts @@ -19,11 +19,11 @@ repositories { } android { - compileSdk = 31 + compileSdk = 33 defaultConfig { minSdk = 21 - targetSdk = 31 + targetSdk = 33 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") } @@ -44,7 +44,7 @@ android { } dependencies { - implementation("net.java.dev.jna:jna:5.8.0@aar") + implementation("net.java.dev.jna:jna:5.14.0@aar") implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7") implementation("androidx.appcompat:appcompat:1.4.0") implementation("androidx.core:core-ktx:1.7.0") diff --git a/bdk-android/plugins/src/main/kotlin/org/bitcoindevkit/plugins/UniFfiAndroidPlugin.kt b/bdk-android/plugins/src/main/kotlin/org/bitcoindevkit/plugins/UniFfiAndroidPlugin.kt index 186dd939..56f4d1d1 100644 --- a/bdk-android/plugins/src/main/kotlin/org/bitcoindevkit/plugins/UniFfiAndroidPlugin.kt +++ b/bdk-android/plugins/src/main/kotlin/org/bitcoindevkit/plugins/UniFfiAndroidPlugin.kt @@ -144,7 +144,7 @@ internal class UniFfiAndroidPlugin : Plugin { // 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 = listOf("run", "--bin", "uniffi-bindgen", "generate", "src/bdk.udl", "--language", "kotlin", "--out-dir", "../bdk-android/lib/src/main/kotlin", "--no-format") + val cargoArgs: List = listOf("run", "--bin", "uniffi-bindgen", "generate", "src/bdk.udl", "--language", "kotlin", "--config", "uniffi-android.toml", "--out-dir", "../bdk-android/lib/src/main/kotlin", "--no-format") executable("cargo") args(cargoArgs) diff --git a/bdk-ffi/Cargo.lock b/bdk-ffi/Cargo.lock index adf4fb3b..cc63fba3 100644 --- a/bdk-ffi/Cargo.lock +++ b/bdk-ffi/Cargo.lock @@ -668,50 +668,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "regex" -version = "1.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.5", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - [[package]] name = "ring" version = "0.17.7" diff --git a/bdk-ffi/tests/README.md b/bdk-ffi/tests/README.md index 9d7c154d..65b6decc 100644 --- a/bdk-ffi/tests/README.md +++ b/bdk-ffi/tests/README.md @@ -5,7 +5,7 @@ supported bindings languages. To skip integration tests and only run unit tests use `cargo test --lib`. -To run all tests including integration tests use `CLASSPATH=./tests/jna/jna-5.8.0.jar cargo test`. +To run all tests including integration tests use `CLASSPATH=./tests/jna/jna-5.14.0.jar cargo test`. Before running integration tests you must install the following development tools: diff --git a/bdk-ffi/tests/jna/jna-5.14.0.jar b/bdk-ffi/tests/jna/jna-5.14.0.jar new file mode 100644 index 00000000..e27f9c54 Binary files /dev/null and b/bdk-ffi/tests/jna/jna-5.14.0.jar differ diff --git a/bdk-ffi/tests/jna/jna-5.8.0.jar b/bdk-ffi/tests/jna/jna-5.8.0.jar deleted file mode 100644 index c3d534c1..00000000 Binary files a/bdk-ffi/tests/jna/jna-5.8.0.jar and /dev/null differ diff --git a/bdk-ffi/uniffi-android.toml b/bdk-ffi/uniffi-android.toml new file mode 100644 index 00000000..dd43a49b --- /dev/null +++ b/bdk-ffi/uniffi-android.toml @@ -0,0 +1,3 @@ +[bindings.kotlin] +android = true +android_cleaner = true \ No newline at end of file diff --git a/bdk-jvm/lib/build.gradle.kts b/bdk-jvm/lib/build.gradle.kts index 7aa2a173..859cc6c9 100644 --- a/bdk-jvm/lib/build.gradle.kts +++ b/bdk-jvm/lib/build.gradle.kts @@ -59,7 +59,7 @@ tasks.withType { dependencies { implementation(platform("org.jetbrains.kotlin:kotlin-bom")) implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7") - implementation("net.java.dev.jna:jna:5.8.0") + implementation("net.java.dev.jna:jna:5.14.0") api("org.slf4j:slf4j-api:1.7.30") testImplementation("junit:junit:4.13.2") testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.8.2")