Skip to content

Commit

Permalink
docs: fix jvm and android readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Oct 20, 2024
1 parent ed2aadf commit b25d48f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 33 deletions.
27 changes: 9 additions & 18 deletions bdk-android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,8 @@ _Note that Kotlin version `1.9.23` or later is required to build the library._
git clone https://github.com/bitcoindevkit/bdk-ffi
```
2. Follow the "General" bdk-ffi ["Getting Started (Developer)"] instructions.
3. Install Rust (note that we are currently building using Rust 1.77.1):
```shell
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default 1.77.1
```
4. Install required targets
```sh
rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi
```
5. Install Android SDK and Build-Tools for API level 30+
6. Setup `ANDROID_SDK_ROOT` and `ANDROID_NDK_ROOT` path variables which are required by the build tool. Note that currently, NDK version 25.2.9519653 or above is required. For example:
3. Install Android SDK and Build-Tools for API level 30+
4. Setup `ANDROID_SDK_ROOT` and `ANDROID_NDK_ROOT` path variables which are required by the build tool. Note that currently, NDK version 25.2.9519653 or above is required. For example:
```shell
# macOS
export ANDROID_SDK_ROOT=~/Library/Android/sdk
Expand All @@ -60,12 +51,13 @@ export ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/25.2.9519653
```

7. Build kotlin bindings
```sh
# build Android library
cd bdk-android
./gradlew buildAndroidLib
```
1. Start android emulator and run tests
```sh
# build Android library
cd bdk-android
bash ./scripts/build-<your-local-architecture>.sh
```

8. Start android emulator and run tests
```sh
./gradlew connectedAndroidTest
```
Expand Down Expand Up @@ -96,7 +88,6 @@ class file for com.sun.jna.Pointer not found
The solution is to add JNA as a dependency like so:
```kotlin
dependencies {
// ...
implementation("net.java.dev.jna:jna:5.12.1")
}
```
Expand Down
17 changes: 2 additions & 15 deletions bdk-jvm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,9 @@ curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java 17.0.2-tem
```
2. Install Rust (note that we are currently building using Rust 1.77.1):
```shell
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default 1.77.1
```
3. Clone this repository.
```shell
git clone https://github.com/bitcoindevkit/bdk-ffi
```
4. If building on macOS install required intel and m1 jvm targets
```sh
rustup target add x86_64-apple-darwin aarch64-apple-darwin
```
5. Build kotlin bindings
2. Build kotlin bindings
```sh
./gradlew buildJvmLib
bash ./scripts/build-<your-local-architecture>.sh
```

## How to publish to your local Maven repo
Expand Down

0 comments on commit b25d48f

Please sign in to comment.