From 653773a63827474315e27d63d51dc28a1b9d6564 Mon Sep 17 00:00:00 2001 From: Sudarsan Balaji Date: Sat, 16 Oct 2021 14:45:32 +0530 Subject: [PATCH] Add demo application in kotlin --- .editorconfig | 3 +++ README.md | 11 +++++++++++ build.sh | 2 ++ 3 files changed, 16 insertions(+) diff --git a/.editorconfig b/.editorconfig index f8d19dc..4f1c5cd 100644 --- a/.editorconfig +++ b/.editorconfig @@ -17,6 +17,9 @@ indent_size = 4 [*.kt] indent_size = 4 +[*.gradle] +indent_size = 4 + [tests/**/*.rs] charset = utf-8 end_of_line = unset diff --git a/README.md b/README.md index 4ace128..f9fd29c 100644 --- a/README.md +++ b/README.md @@ -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 +``` + diff --git a/build.sh b/build.sh index eaeb2cd..b67fff0 100755 --- a/build.sh +++ b/build.sh @@ -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"