From 77dfa83295d9f4be2309aa86c3a3c27c2e59bc9a Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Tue, 23 Jan 2024 21:37:54 +0100 Subject: [PATCH] Expose `next_event_async` in bindings .. which requires us to include a dependency on the `kotlinx-coroutines` package. --- bindings/kotlin/ldk-node-android/lib/build.gradle.kts | 1 + bindings/kotlin/ldk-node-jvm/lib/build.gradle.kts | 1 + bindings/ldk_node.udl | 2 ++ 3 files changed, 4 insertions(+) diff --git a/bindings/kotlin/ldk-node-android/lib/build.gradle.kts b/bindings/kotlin/ldk-node-android/lib/build.gradle.kts index 6c8d29327..5e6775cdc 100644 --- a/bindings/kotlin/ldk-node-android/lib/build.gradle.kts +++ b/bindings/kotlin/ldk-node-android/lib/build.gradle.kts @@ -43,6 +43,7 @@ android { dependencies { implementation("net.java.dev.jna:jna:5.12.0@aar") implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4") implementation("androidx.appcompat:appcompat:1.4.0") implementation("androidx.core:core-ktx:1.7.0") api("org.slf4j:slf4j-api:1.7.30") diff --git a/bindings/kotlin/ldk-node-jvm/lib/build.gradle.kts b/bindings/kotlin/ldk-node-jvm/lib/build.gradle.kts index 33953ef7b..5c9e6c47c 100644 --- a/bindings/kotlin/ldk-node-jvm/lib/build.gradle.kts +++ b/bindings/kotlin/ldk-node-jvm/lib/build.gradle.kts @@ -46,6 +46,7 @@ dependencies { // Use the Kotlin JDK 8 standard library. implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4") implementation("net.java.dev.jna:jna:5.12.0") } diff --git a/bindings/ldk_node.udl b/bindings/ldk_node.udl index c6c7f4f38..b5c459d67 100644 --- a/bindings/ldk_node.udl +++ b/bindings/ldk_node.udl @@ -43,6 +43,8 @@ interface LDKNode { void stop(); Event? next_event(); Event wait_next_event(); + [Async] + Event next_event_async(); void event_handled(); PublicKey node_id(); sequence? listening_addresses();