diff --git a/build/.tasks.yml b/build/.tasks.yml index e272fb03c..957941323 100644 --- a/build/.tasks.yml +++ b/build/.tasks.yml @@ -18,9 +18,15 @@ tasks: vars: OS_NAME: sh: uname | tr '[:upper:]' '[:lower:]' + # gobley 0.3.7 misreads u8/u16 return values on 32-bit ARM Android, which fails the UniFFI + # checksum check once the app is AOT-compiled (https://github.com/gobley/gobley/issues/252). + # This revision carries the fix proposed upstream in https://github.com/gobley/gobley/pull/297. + GOBLEY_GIT: https://github.com/angelix/gobley + GOBLEY_REV: 40cef27c59829ca97a71945928028f9ab4880305 + GOBLEY_ROOT: target/gobley cmds: - - cargo install --bin gobley-uniffi-bindgen gobley-uniffi-bindgen@0.3.7 - - gobley-uniffi-bindgen --config ./libs/gl-sdk/uniffi.kotlin-multiplatform.toml --library ./target/aarch64-linux-android/debug/libglsdk.a --out-dir target/release/kotlin-multiplatform + - cargo install --locked --git {{.GOBLEY_GIT}} --rev {{.GOBLEY_REV}} --root {{.GOBLEY_ROOT}} --bin gobley-uniffi-bindgen gobley-uniffi-bindgen + - "{{.GOBLEY_ROOT}}/bin/gobley-uniffi-bindgen --config ./libs/gl-sdk/uniffi.kotlin-multiplatform.toml --library ./target/aarch64-linux-android/debug/libglsdk.a --out-dir target/release/kotlin-multiplatform" - cp -a ./target/release/kotlin-multiplatform/* libs/gl-sdk-android/lib/src/ - mkdir -p libs/gl-sdk-android/lib/src/lib/ios-arm64 - mkdir -p libs/gl-sdk-android/lib/src/lib/ios-simulator-arm64 diff --git a/libs/gl-sdk/CHANGELOG.md b/libs/gl-sdk/CHANGELOG.md index 27a9ee84d..4e6d3e589 100644 --- a/libs/gl-sdk/CHANGELOG.md +++ b/libs/gl-sdk/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## Unreleased +### Fixed + +- Kotlin: `UniFFI API checksum mismatch` on 32-bit ARM Android once the app is AOT-compiled. The bindings are generated with a gobley build that reads `u8`/`u16` return values correctly ([gobley#252](https://github.com/gobley/gobley/issues/252)). + ### Added - `Scheduler.lightning_available(node_id)` — asks whether the Lightning account backed by `node_id` may be surfaced to the user. Intended as a feature gate for applications that offer Lightning alongside other account types. Callable before `register()` and without credentials, since the decision has to be made before a node exists. The answer is monotonic: once the node is registered it is reported as available and stays that way, whatever the node's status or the provider's capacity. Before registration the answer is advisory; treat an error as "unknown" rather than as a negative answer. Greenlight currently reports every unregistered account as unavailable while the backing Lightning Service Provider integration is being built.