Add documentation for plugin

This commit is contained in:
thunderbiscuit 2022-03-22 14:01:39 -04:00
parent 06d3f96706
commit 35f097542b
No known key found for this signature in database
GPG Key ID: 88253696EB836462

16
buildSrc/README.md Normal file
View File

@ -0,0 +1,16 @@
# Readme
The purpose of this directory is to host a Gradle plugin that adds tasks for building the native binaries required by bdk-jvm/ bdk-android and building the language bindings files.
The plugin is applied to the specific `build.gradle.kts` files in `bdk-jvm` and `bdk-android` through the `plugins` block:
```kotlin
plugins {
id("org.bitcoindevkit.plugin.generate-bdk-bindings")
}
```
It adds a series of tasks (`buildJvmBinary`, `moveNativeJvmLib`, `generateJvmBindings`) which are then brought together into an aggregate task called `buildJvmLib`.
This task:
1. Builds the native JVM library (on your given platform) using `bdk-ffi`
2. Places it in the correct resource directory
3. Builds the bindings file