Merge pull request #12 from notmandatory/add-demo-application

Add demo application
This commit is contained in:
Sudarsan Balaji 2021-10-16 14:46:50 +05:30 committed by GitHub
commit a528a76c5d
3 changed files with 16 additions and 0 deletions

View File

@ -17,6 +17,9 @@ indent_size = 4
[*.kt]
indent_size = 4
[*.gradle]
indent_size = 4
[tests/**/*.rs]
charset = utf-8
end_of_line = unset

View File

@ -42,3 +42,14 @@ See the [UniFFI User Guide](https://mozilla.github.io/uniffi-rs/)
1. Use `build.sh` script (TODO do it all in build.rs instead)
2. Create tests in `bindings/bdk-kotlin` and/or `bindings/bdk-swift`
3. Use `test.sh` to run all bindings tests
### Run kotlin demo application
We have a kotlin demo console application which uses bdk.
It uses stdin for inputs and can be run from gradle.
```sh
cd bindings/bdk-kotlin
./gradlew :demo:run
```

View File

@ -32,11 +32,13 @@ copy_lib_kotlin() {
echo -n "darwin "
mkdir -p bindings/bdk-kotlin/jvm/src/main/resources/darwin-x86-64
cp target/debug/libuniffi_bdk.dylib bindings/bdk-kotlin/jvm/src/main/resources/darwin-x86-64
cp target/debug/libuniffi_bdk.dylib bindings/bdk-kotlin/demo/src/main/resources/darwin-x86-64
;;
"Linux")
echo -n "linux "
mkdir -p bindings/bdk-kotlin/jvm/src/main/resources/linux-x86-64
cp target/debug/libuniffi_bdk.so bindings/bdk-kotlin/jvm/src/main/resources/linux-x86-64
cp target/debug/libuniffi_bdk.so bindings/bdk-kotlin/demo/src/main/resources/linux-x86-64
;;
esac
echo "libs to kotlin sub-project"