bdk-ffi/buildSrc/README.md

23 lines
808 B
Markdown
Raw Normal View History

2022-03-22 14:01:39 -04:00
# Readme
The purpose of this directory is to host the Gradle plugins that add tasks for building the native binaries required by bdk-jvm and bdk-android, and building the language bindings files.
2022-03-22 14:01:39 -04:00
The plugins are applied to the specific `build.gradle.kts` files in `bdk-jvm` and `bdk-android` through the `plugins` block:
2022-03-22 14:01:39 -04:00
```kotlin
// bdk-jvm
2022-03-22 14:01:39 -04:00
plugins {
id("org.bitcoindevkit.plugin.generate-jvm-bindings")
}
// bdk-android
plugins {
id("org.bitcoindevkit.plugins.generate-android-bindings")
2022-03-22 14:01:39 -04:00
}
```
They add a series of tasks which are brought together into an aggregate task called `buildJvmLib` for `bdk-jvm` and `buildAndroidLib` for `bdk-android`.
2022-03-22 14:01:39 -04:00
This aggregate task:
1. Builds the native library(ies) using `bdk-ffi`
2022-03-22 14:01:39 -04:00
2. Places it in the correct resource directory
3. Builds the bindings file