Merge commit 'refs/pull/5/head' of github.com:bitcoindevkit/bdk-kotlin

This commit is contained in:
Steve Myers 2022-02-22 21:38:14 -08:00
commit 77a5353469
No known key found for this signature in database
GPG Key ID: 8105A46B22C2D051
5 changed files with 22 additions and 11 deletions

View File

@ -16,9 +16,9 @@ repositories {
dependencies {
// for jvm
implementation 'org.bitcoindevkit:bdk-jvm:0.2.0'
implementation 'org.bitcoindevkit:bdk-jvm:0.3.2'
// OR for android
implementation 'org.bitcoindevkit:bdk-android:0.2.0'
implementation 'org.bitcoindevkit:bdk-android:0.3.2'
}
@ -53,7 +53,7 @@ val newAddress = wallet.getNewAddress()
* [Tatooine Faucet](https://github.com/thunderbiscuit/tatooine)
## How to build
### How to build
1. Clone this repository and init and update it's [`bdk-ffi`] submodule.
```shell
@ -61,6 +61,10 @@ val newAddress = wallet.getNewAddress()
git submodule update --init
```
1. Follow the "General" bdk-ffi ["Getting Started (Developer)"] instructions.
1. If building on MacOS install required intel and m1 jvm targets
```sh
rustup target add x86_64-apple-darwin aarch64-apple-darwin
```
1. Install required targets
```sh
rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi i686-linux-android
@ -76,6 +80,10 @@ val newAddress = wallet.getNewAddress()
```sh
./build.sh
```
1. Start android emulator and run tests
```sh
./gradlew connectedAndroidTest
```
## How to publish

View File

@ -49,7 +49,7 @@ afterEvaluate {
// You can then customize attributes of the publication as shown below.
groupId = 'org.bitcoindevkit'
artifactId = 'bdk-android'
version = '0.2.2'
version = '0.3.2'
pom {
name = 'bdk-android'

@ -1 +1 @@
Subproject commit e4d53b5e4b213e484bf4b76a4bf33884dd68f086
Subproject commit 4cc183bef5eeb62e8b79a445ccca60ddf66e68d4

View File

@ -4,20 +4,23 @@ set -eo pipefail
echo "Build and test bdk-ffi library for local platform (darwin or linux)"
pushd bdk-ffi
cargo fmt
cargo build --release
cargo test
OS=$(uname)
echo -n "Copy "
case $OS in
"Darwin")
echo -n "darwin "
# x86_64 (intel)
cargo build --release --target x86_64-apple-darwin
mkdir -p ../jvm/src/main/resources/darwin-x86-64
cp target/release/libbdkffi.dylib ../jvm/src/main/resources/darwin-x86-64
cp target/x86_64-apple-darwin/release/libbdkffi.dylib ../jvm/src/main/resources/darwin-x86-64
# aarch64 (m1)
cargo build --release --target aarch64-apple-darwin
mkdir -p ../jvm/src/main/resources/darwin-aarch64
cp target/aarch64-apple-darwin/release/libbdkffi.dylib ../jvm/src/main/resources/darwin-aarch64
;;
"Linux")
echo -n "linux "
cargo build --release
mkdir -p ../jvm/src/main/resources/linux-x86-64
cp target/release/libbdkffi.so ../jvm/src/main/resources/linux-x86-64
;;

View File

@ -38,7 +38,7 @@ afterEvaluate {
groupId = 'org.bitcoindevkit'
artifactId = 'bdk-jvm'
version = '0.2.2'
version = '0.3.2'
pom {
name = 'bdk-jvm'