Skip to content

Conversation

@kirillzh
Copy link
Contributor

@kirillzh kirillzh commented Apr 1, 2025

Set up Kotlin Multiplatform (KMP) bindings using Gobley plugin: https://gobley.dev. This will effectively allow to use payjoin bindings in a JVM, Android or KMP (for any supported targets) projects.

To generate bindings (currently doesn't work because of uniffi version mismatch, see below):
Run ./gradlew buildBindings. KMP bindings should be generated in build/generated directory.

TODO:

  • blocked by Gobley version update of uniffi bingen Support for UniFFI 0.29.x gobley/gobley#48. Two options here: wait/help with the release bump; or revert back payjoin-ffi to 0.28.3.
  • Add common targets
  • JVM. Current error that I'm running into locally is failed to find tool. Is aarch64-linux-gnu-gcc installed?
  • iOS
  • Add CI unit tests for generating bindings
  • Update README

… for now)

- Gradle project which configures KMP bindings generation using [Gobley](https://github.com/gobley/gobley) plugin
- Currently only Android target is supported, but other targest can be added too (JVM, iOS, Mac, WASM, etc)
@DanGould
Copy link
Contributor

DanGould commented Apr 1, 2025

Legend!

At this point, bitcoin-ffi has even updated to uniffi 0.29 so I think we'll have to wait or help with the gobley upgrade

Copy link
Contributor Author

@kirillzh kirillzh Apr 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gradle binaries and .properties file were generated using gradle init command. It's a common practice to check them in. https://docs.gradle.org/current/userguide/part1_gradle_init.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants