Skip to content

Commit 6fc5b48

Browse files
committed
feat: Add task for each example file
- Allows us to run from cmd using gradlew
1 parent 01d0b55 commit 6fc5b48

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ testdb
2020
.editorconfig
2121
bdk.kt
2222
.kotlin/
23+
bdk-jvm/examples/data/
2324

2425
# Swift related
2526
/.build

bdk-jvm/examples/build.gradle.kts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
22

33
plugins {
44
kotlin("jvm") version "2.1.10"
5+
application
56
}
67

78
group = "org.bitcoindevkit"
@@ -32,3 +33,20 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
3233
jvmTarget.set(JvmTarget.JVM_11)
3334
}
3435
}
36+
37+
tasks.register<JavaExec>("WalletSetupBip32") {
38+
group = "application"
39+
description = "Runs the main function in the WalletSetupBip32 example"
40+
mainClass.set("org.bitcoindevkit.WalletSetupBip32Kt")
41+
classpath = sourceSets["main"].runtimeClasspath
42+
}
43+
44+
tasks.register<JavaExec>("MultisigTransaction") {
45+
group = "application"
46+
description = "Runs the main function in the MultisigTransaction example"
47+
mainClass.set("org.bitcoindevkit.MultisigTransactionKt")
48+
classpath = sourceSets["main"].runtimeClasspath
49+
}
50+
51+
52+

0 commit comments

Comments
 (0)