From 5dd5828e8893615336f344f3077f7de110e4b78b Mon Sep 17 00:00:00 2001 From: thunderbiscuit Date: Wed, 30 Nov 2022 12:20:48 -0500 Subject: [PATCH] Add documentation on how to use snapshot versions of libraries --- README.md | 2 ++ bdk-android/README.md | 25 +++++++++++++++++++------ bdk-jvm/README.md | 28 +++++++++++++++++++++------- 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index d1df959..e239151 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,8 @@ dependencies { } ``` +_Note:_ We also publish snapshot versions of bdk-jvm and bdk-android. See the specific readmes for instructions on how to use those. + ### bdk-python ```shell pip3 install bdkpython diff --git a/bdk-android/README.md b/bdk-android/README.md index d75c75b..2acf720 100644 --- a/bdk-android/README.md +++ b/bdk-android/README.md @@ -1,9 +1,9 @@ # bdk-android -This project builds an .aar package for the `android` platform that provide [Kotlin] language bindings for the [`bdk`] library. The Kotlin language bindings are created by the [`bdk-ffi`] project which is included in the root of this repository. +This project builds an .aar package for the Android platform that provide Kotlin language bindings for the [`bdk`] library. The Kotlin language bindings are created by the [`bdk-ffi`] project which is included in the root of this repository. ## How to Use -To use the Kotlin language bindings for [`bdk`] in your `android` project add the following to your gradle dependencies: -```groovy +To use the Kotlin language bindings for [`bdk`] in your Android project add the following to your gradle dependencies: +```kotlin repositories { mavenCentral() } @@ -32,6 +32,18 @@ val wallet = Wallet(externalDescriptor, internalDescriptor, Network.TESTNET, dat val newAddress = wallet.getNewAddress() ``` +### Snapshot releases +To use a snapshot release, specify the snapshot repository url in the `repositories` block and use the snapshot version in the `dependencies` block: +```kotlin +repositories { + maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") +} + +dependencies { + implementation("org.bitcoindevkit:bdk-android:") +} +``` + ### Example Projects * [Devkit Wallet](https://github.com/thunderbiscuit/devkit-wallet) * [Padawan Wallet](https://github.com/thunderbiscuit/padawan-wallet) @@ -67,10 +79,8 @@ git clone https://github.com/bitcoindevkit/bdk-ffi ./gradlew connectedAndroidTest ``` -## How to publish -### Publish to your local maven repo +## How to publish to your local Maven repo ```shell -# bdk-android cd bdk-android ./gradlew publishToMavenLocal --exclude-task signMavenPublication ``` @@ -85,3 +95,6 @@ and use the `publishToMavenLocal` task without excluding the signing task: ```shell ./gradlew publishToMavenLocal ``` + +[`bdk`]: https://github.com/bitcoindevkit/bdk +[`bdk-ffi`]: https://github.com/bitcoindevkit/bdk-ffi diff --git a/bdk-jvm/README.md b/bdk-jvm/README.md index a6bf20e..0759c06 100644 --- a/bdk-jvm/README.md +++ b/bdk-jvm/README.md @@ -1,8 +1,8 @@ # bdk-android -This project builds a .jar package for the `jvm` platform that provide [Kotlin] language bindings for the [`bdk`] library. The Kotlin language bindings are created by the [`bdk-ffi`] project which is included in the root of this repository. +This project builds a .jar package for the JVM platform that provide Kotlin language bindings for the [`bdk`] library. The Kotlin language bindings are created by the `bdk-ffi` project which is included in the root of this repository. ## How to Use -To use the Kotlin language bindings for [`bdk`] in your `jvm` project add the following to your gradle dependencies: +To use the Kotlin language bindings for [`bdk`] in your JVM project add the following to your gradle dependencies: ```kotlin repositories { mavenCentral() @@ -32,10 +32,23 @@ val wallet = Wallet(externalDescriptor, internalDescriptor, Network.TESTNET, dat val newAddress = wallet.getNewAddress() ``` -### Example Projects +### Snapshot releases +To use a snapshot release, specify the snapshot repository url in the `repositories` block and use the snapshot version in the `dependencies` block: +```kotlin +repositories { + maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") +} + +dependencies { + implementation("org.bitcoindevkit:bdk-jvm:") +} +``` + + +## Example Projects * [Tatooine Faucet](https://github.com/thunderbiscuit/tatooine) -### How to build +## How to build _Note that Kotlin version `1.6.10` or later is required to build the library._ 1. Clone this repository. @@ -53,10 +66,8 @@ rustup target add x86_64-apple-darwin aarch64-apple-darwin ./gradlew buildJvmLib ``` -## How to publish -### Publish to your local maven repo +## How to publish to your local Maven repo ```shell -# bdk-jvm cd bdk-jvm ./gradlew publishToMavenLocal --exclude-task signMavenPublication ``` @@ -71,3 +82,6 @@ and use the `publishToMavenLocal` task without excluding the signing task: ```shell ./gradlew publishToMavenLocal ``` + +[`bdk`]: https://github.com/bitcoindevkit/bdk +[`bdk-ffi`]: https://github.com/bitcoindevkit/bdk-ffi