= jvmAsyncScope.future { run() }
- *
+ * fun runAsync(): CompletableFuture = jvmAsyncScope.future { run() } // New async function for Java
* ```
*
+ * This annotation allows Kotlin suspend functions to be exposed to Java code using a Future-based API.
+ * It can be applied to both individual functions and classes
+ * (in which case it applies to all suspend functions in the class).
*/
@OptIn(ExperimentalMultiplatform::class)
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
@OptionalExpectation
+@MustBeDocumented // since 0.13.2
public expect annotation class JvmAsync(
+ /**
+ * The base name of the generated asynchronous function
+ * or the current function name if empty.
+ *
+ * The final function name is: [baseName] + [suffix]
+ */
val baseName: String = "",
+
+ /**
+ * The suffix to append to the [baseName] when generating the asynchronous function name.
+ *
+ * The final function name will be constructed as: [baseName] + [suffix]
+ * Default value is "Async", resulting in names like "fooAsync".
+ */
val suffix: String = "Async",
+
/**
- * 是否转化为 property 的形式:
+ * Specifies whether to generate a property instead of a function.
+ *
+ * When set to `true`, instead of generating an async function, a property will be created:
*
* ```kotlin
* suspend fun foo(): T = ...
*
- * // Generated
+ * // Generated property (when asProperty = true)
* val fooAsync: Future get() = runInAsync { foo() }
* ```
*
@@ -134,12 +207,12 @@ public expect annotation class JvmAsync(
* For example:
*
* ```Kotlin
- * @JvmBlocking(markName = "markName_foo")
+ * @JvmAsync(markName = "markName_foo")
* suspend fun foo(): String = "..."
*
* // The generated fun:
* @JvmName(name = "markName_foo")
- * fun fooBlocking(): String = runBlocking { foo() }
+ * fun fooAsync(): Future = jvmAsyncScope.future { foo() }
* ```
*
* Note: In the JVM, adding `@JvmName` to a non-final function is usually not allowed by the compiler.
@@ -149,25 +222,61 @@ public expect annotation class JvmAsync(
)
+/**
+ * Generate a Promise-based variant function for Java interoperability based on the current suspend function.
+ *
+ * When applied to a suspend function like:
+ * ```kotlin
+ * @JsPromise
+ * suspend fun run(): String
+ * ```
+ *
+ * It generates:
+ * ```kotlin
+ * @JvmSynthetic
+ * suspend fun run(): String // Original suspend function
+ *
+ * @Api4Js
+ * fun runAsync(): Promise = runAsync { run() } // New Promise-based function for JavaScript
+ * ```
+ *
+ * This annotation allows Kotlin suspend functions to be exposed to JavaScript code using JavaScript Promises.
+ * It can be applied to both individual functions and classes (in which case it applies to all suspend functions in the class).
+ */
@OptIn(ExperimentalMultiplatform::class)
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
@OptionalExpectation
+@MustBeDocumented // since 0.13.2
public expect annotation class JsPromise(
+ /**
+ * The base name of the generated Promise-based function
+ * or the current function name if empty.
+ *
+ * The final function name is: [baseName] + [suffix]
+ */
val baseName: String = "",
+
+ /**
+ * The suffix to append to the [baseName] when generating the Promise-based function name.
+ *
+ * The final function name will be constructed as: [baseName] + [suffix]
+ * Default value is "Async", resulting in names like "fooAsync".
+ */
val suffix: String = "Async",
/**
- * 是否转化为 property 的形式:
+ * Specifies whether to generate a property instead of a function.
+ *
+ * When set to `true`, instead of generating a Promise-based function, a property will be created:
*
* ```kotlin
* suspend fun foo(): T = ...
*
- * // Generated
+ * // Generated property (when asProperty = true)
* val fooAsync: Promise get() = runInAsync { foo() }
* ```
*
* Note: If [asProperty] == `true`, the function cannot have parameters.
- *
*/
val asProperty: Boolean = false,
@@ -188,7 +297,8 @@ public expect annotation class JsPromise(
* fun fooAsync(): Promise = runAsync { foo() }
* ```
*
- *
+ * This helps control the JavaScript function name when using the Kotlin/JS compiler.
+ *
* @since 0.13.0
*/
val markName: String = "",
diff --git a/runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/TargetMarker.kt b/runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/TargetMarker.kt
index 37648d5a..e8f82ae2 100644
--- a/runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/TargetMarker.kt
+++ b/runtime/suspend-transform-annotation/src/commonMain/kotlin/love/forte/plugin/suspendtrans/annotation/TargetMarker.kt
@@ -1,3 +1,25 @@
+/*
+ * Copyright (c) 2022-2025 Forte Scarlet
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package love.forte.plugin.suspendtrans.annotation
/**
diff --git a/runtime/suspend-transform-annotation/src/jsMain/kotlin/love.forte.plugin.suspendtrans/annotation/SuspendTransformAnnotationJs.kt b/runtime/suspend-transform-annotation/src/jsMain/kotlin/love.forte.plugin.suspendtrans/annotation/SuspendTransformAnnotationJs.kt
index 705b7dec..d6854426 100644
--- a/runtime/suspend-transform-annotation/src/jsMain/kotlin/love.forte.plugin.suspendtrans/annotation/SuspendTransformAnnotationJs.kt
+++ b/runtime/suspend-transform-annotation/src/jsMain/kotlin/love.forte.plugin.suspendtrans/annotation/SuspendTransformAnnotationJs.kt
@@ -1,18 +1,101 @@
+/*
+ * Copyright (c) 2022-2025 Forte Scarlet
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package love.forte.plugin.suspendtrans.annotation
+/**
+ * Marks an API that is specifically designed for JavaScript interoperability.
+ *
+ * This annotation is used to indicate that the annotated element is part of a JavaScript-specific API
+ * and should primarily be used by JavaScript consumers rather than Kotlin code.
+ *
+ * When this annotation is applied to methods generated from suspend functions,
+ * it signifies that these methods were created or generated specifically to provide a JavaScript-friendly
+ * alternative to Kotlin's coroutine-based APIs, typically using JavaScript Promises.
+ */
@RequiresOptIn(message = "Api should be used by JavaScript", level = RequiresOptIn.Level.WARNING)
@Retention(AnnotationRetention.BINARY)
+@MustBeDocumented
public actual annotation class Api4Js
@RequiresOptIn(message = "Experimental javascript api", level = RequiresOptIn.Level.WARNING)
@Retention(AnnotationRetention.BINARY)
public annotation class ExperimentalJsApi
+/**
+ * Generate a Promise-based variant function for Java interoperability based on the current suspend function.
+ *
+ * When applied to a suspend function like:
+ * ```kotlin
+ * @JsPromise
+ * suspend fun run(): String
+ * ```
+ *
+ * It generates:
+ * ```kotlin
+ * @JvmSynthetic
+ * suspend fun run(): String // Original suspend function
+ *
+ * @Api4Js
+ * fun runAsync(): Promise = runAsync { run() } // New Promise-based function for JavaScript
+ * ```
+ *
+ * This annotation allows Kotlin suspend functions to be exposed to JavaScript code using JavaScript Promises.
+ * It can be applied to both individual functions and classes (in which case it applies to all suspend functions in the class).
+ */
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
+@MustBeDocumented // since 0.13.2
public actual annotation class JsPromise(
+ /**
+ * The base name of the generated Promise-based function
+ * or the current function name if empty.
+ *
+ * The final function name is: [baseName] + [suffix]
+ */
actual val baseName: String,
+
+ /**
+ * The suffix to append to the [baseName] when generating the Promise-based function name.
+ *
+ * The final function name will be constructed as: [baseName] + [suffix]
+ * Default value is "Async", resulting in names like "fooAsync".
+ */
actual val suffix: String,
+
+ /**
+ * Specifies whether to generate a property instead of a function.
+ *
+ * When set to `true`, instead of generating a Promise-based function, a property will be created:
+ *
+ * ```kotlin
+ * suspend fun foo(): T = ...
+ *
+ * // Generated property (when asProperty = true)
+ * val fooAsync: Promise get() = runInAsync { foo() }
+ * ```
+ *
+ * Note: If [asProperty] == `true`, the function cannot have parameters.
+ */
actual val asProperty: Boolean,
/**
@@ -32,6 +115,7 @@ public actual annotation class JsPromise(
* fun fooAsync(): Promise = runAsync { foo() }
* ```
*
+ * This helps control the JavaScript function name when using the Kotlin/JS compiler.
*
* @since 0.13.0
*/
diff --git a/runtime/suspend-transform-annotation/src/jvmMain/kotlin/love.forte.plugin.suspendtrans/annotation/SuspendTransformAnnotationJvm.kt b/runtime/suspend-transform-annotation/src/jvmMain/kotlin/love.forte.plugin.suspendtrans/annotation/SuspendTransformAnnotationJvm.kt
index 3d7ed247..63965090 100644
--- a/runtime/suspend-transform-annotation/src/jvmMain/kotlin/love.forte.plugin.suspendtrans/annotation/SuspendTransformAnnotationJvm.kt
+++ b/runtime/suspend-transform-annotation/src/jvmMain/kotlin/love.forte.plugin.suspendtrans/annotation/SuspendTransformAnnotationJvm.kt
@@ -1,8 +1,41 @@
+/*
+ * Copyright (c) 2022-2025 Forte Scarlet
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package love.forte.plugin.suspendtrans.annotation
+/**
+ * Marks an API that is specifically designed for Java interoperability.
+ *
+ * This annotation is used to indicate that the annotated element is part of a Java-specific API
+ * and should primarily be used by Java consumers rather than Kotlin code.
+ *
+ * When this annotation is applied to methods generated from suspend functions,
+ * it signifies that these methods were created or generated specifically to provide a Java-friendly
+ * alternative to Kotlin's coroutine-based APIs.
+ */
@RequiresOptIn(message = "Api should be used by Java", level = RequiresOptIn.Level.WARNING)
@Retention(AnnotationRetention.BINARY)
+@MustBeDocumented // since 0.13.2
public actual annotation class Api4J
@@ -11,48 +44,59 @@ public actual annotation class Api4J
public annotation class ExperimentalJvmApi
/**
+ * Generate a blocking function for Java interoperability based on the current suspend function.
*
+ * When applied to a suspend function like:
* ```kotlin
* @JvmBlocking
* suspend fun foo(): T = ...
* ```
- * transform to:
*
+ * It generates:
* ```kotlin
* @JvmSynthetic
- * suspend fun foo(): T = ...
+ * suspend fun foo(): T = ... // Original function is hidden from Java
*
* @Api4J
- * fun fooBlocking(): T = runInBlocking { foo() }
+ * fun fooBlocking(): T = runInBlocking { foo() } // New blocking function for Java
* ```
*
+ * This annotation can be applied to both individual functions and classes
+ * (in which case it applies to all suspend functions in the class).
*/
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
+@MustBeDocumented // since 0.13.2
public actual annotation class JvmBlocking(
/**
- * 生成函数的基础名称,如果为空则为当前函数名。
- * 最终生成的函数名为 [baseName] + [suffix]。
+ * The base name of synthetic function
+ * or the current function name if empty.
+ *
+ * The final function name is: [baseName] + [suffix]
*/
actual val baseName: String,
-
+
/**
- * [baseName] 名称基础上追加的名称后缀。
+ * The suffix to append to the [baseName] when generating the blocking function name.
+ *
+ * The final function name will be constructed as: [baseName] + [suffix]
+ * Default value is "Blocking", resulting in names like "fooBlocking".
*/
actual val suffix: String,
-
+
/**
- * 是否转化为 property 的形式:
+ * Specifies whether to generate a property instead of a function.
+ *
+ * When set to `true`, instead of generating a blocking function, a property will be created:
*
* ```kotlin
* suspend fun foo(): T = ...
*
- * // Generated
+ * // Generated property (when asProperty = true)
* val fooBlocking: T get() = runInBlocking { foo() }
* ```
*
- * 只有函数没有参数时有效。
- *
+ * Note: If [asProperty] == `true`, the function cannot have parameters.
*/
actual val asProperty: Boolean,
@@ -60,6 +104,19 @@ public actual annotation class JvmBlocking(
* The name of `@JvmName`.
* Valid when not empty.
*
+ * If [markName] is valid, [kotlin.jvm.JvmName] will be annotated on the generated function.
+ *
+ * For example:
+ *
+ * ```Kotlin
+ * @JvmBlocking(markName = "markName_foo")
+ * suspend fun foo(): String = "..."
+ *
+ * // The generated fun:
+ * @JvmName(name = "markName_foo")
+ * fun fooBlocking(): String = runBlocking { foo() }
+ * ```
+ *
* Note: In the JVM, adding `@JvmName` to a non-final function is usually not allowed by the compiler.
* @since 0.13.0
*/
@@ -67,33 +124,80 @@ public actual annotation class JvmBlocking(
)
/**
+ * Generate a Future-based async function for Java interoperability based on the current suspend function.
+ *
+ * When applied to a suspend function like:
* ```kotlin
+ * @JvmAsync
* suspend fun run(): Int
* ```
*
- * to
- *
+ * It generates:
* ```kotlin
* @JvmSynthetic
- * suspend fun run(): Int
+ * suspend fun run(): Int // Original function is hidden from Java
*
* @Api4J
- * fun runAsync(): Future = jvmAsyncScope.future { run() }
- *
+ * fun runAsync(): CompletableFuture = jvmAsyncScope.future { run() } // New async function for Java
* ```
*
+ * This annotation allows Kotlin suspend functions to be exposed to Java code using a Future-based API.
+ * It can be applied to both individual functions and classes
+ * (in which case it applies to all suspend functions in the class).
*/
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
+@MustBeDocumented // since 0.13.2
public actual annotation class JvmAsync(
+ /**
+ * The base name of the generated asynchronous function
+ * or the current function name if empty.
+ *
+ * The final function name is: [baseName] + [suffix]
+ */
actual val baseName: String,
+
+ /**
+ * The suffix to append to the [baseName] when generating the asynchronous function name.
+ *
+ * The final function name will be constructed as: [baseName] + [suffix]
+ * Default value is "Async", resulting in names like "fooAsync".
+ */
actual val suffix: String,
+
+ /**
+ * Specifies whether to generate a property instead of a function.
+ *
+ * When set to `true`, instead of generating an async function, a property will be created:
+ *
+ * ```kotlin
+ * suspend fun foo(): T = ...
+ *
+ * // Generated property (when asProperty = true)
+ * val fooAsync: Future get() = runInAsync { foo() }
+ * ```
+ *
+ * Note: If [asProperty] == `true`, the function cannot have parameters.
+ */
actual val asProperty: Boolean,
/**
- * The name of `@JvmName`.
+ * The name of [@JvmName][kotlin.jvm.JvmName].
* Valid when not empty.
*
+ * If [markName] is valid, [@JvmName][kotlin.jvm.JvmName] will be annotated on the generated function.
+ *
+ * For example:
+ *
+ * ```Kotlin
+ * @JvmAsync(markName = "markName_foo")
+ * suspend fun foo(): String = "..."
+ *
+ * // The generated fun:
+ * @JvmName(name = "markName_foo")
+ * fun fooAsync(): Future = jvmAsyncScope.future { foo() }
+ * ```
+ *
* Note: In the JVM, adding `@JvmName` to a non-final function is usually not allowed by the compiler.
* @since 0.13.0
*/
diff --git a/runtime/suspend-transform-runtime/src/commonMain/kotlin/love/forte/plugin/suspendtrans/runtime/RunInSuspend.kt b/runtime/suspend-transform-runtime/src/commonMain/kotlin/love/forte/plugin/suspendtrans/runtime/RunInSuspend.kt
index 63cc84d7..b2f936a9 100644
--- a/runtime/suspend-transform-runtime/src/commonMain/kotlin/love/forte/plugin/suspendtrans/runtime/RunInSuspend.kt
+++ b/runtime/suspend-transform-runtime/src/commonMain/kotlin/love/forte/plugin/suspendtrans/runtime/RunInSuspend.kt
@@ -1,3 +1,25 @@
+/*
+ * Copyright (c) 2022-2025 Forte Scarlet
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package love.forte.plugin.suspendtrans.runtime
/*
diff --git a/runtime/suspend-transform-runtime/src/jsMain/kotlin/love.forte.plugin.suspendtrans/runtime/RunInSuspendJs.kt b/runtime/suspend-transform-runtime/src/jsMain/kotlin/love.forte.plugin.suspendtrans/runtime/RunInSuspendJs.kt
index 37415c94..5e9cdf98 100644
--- a/runtime/suspend-transform-runtime/src/jsMain/kotlin/love.forte.plugin.suspendtrans/runtime/RunInSuspendJs.kt
+++ b/runtime/suspend-transform-runtime/src/jsMain/kotlin/love.forte.plugin.suspendtrans/runtime/RunInSuspendJs.kt
@@ -1,11 +1,33 @@
+/*
+ * Copyright (c) 2022-2025 Forte Scarlet
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
package love.forte.plugin.suspendtrans.runtime
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.promise
import kotlin.coroutines.CoroutineContext
import kotlin.js.Promise
-import kotlinx.coroutines.SupervisorJob
private val CoroutineContext4Js: CoroutineContext = Dispatchers.Default + SupervisorJob()
diff --git a/runtime/suspend-transform-runtime/src/jvmMain/kotlin/love/forte/plugin/suspendtrans/runtime/RunInSuspendJvm.kt b/runtime/suspend-transform-runtime/src/jvmMain/kotlin/love/forte/plugin/suspendtrans/runtime/RunInSuspendJvm.kt
index 0f5f5d7c..1a5b313f 100644
--- a/runtime/suspend-transform-runtime/src/jvmMain/kotlin/love/forte/plugin/suspendtrans/runtime/RunInSuspendJvm.kt
+++ b/runtime/suspend-transform-runtime/src/jvmMain/kotlin/love/forte/plugin/suspendtrans/runtime/RunInSuspendJvm.kt
@@ -1,3 +1,25 @@
+/*
+ * Copyright (c) 2022-2025 Forte Scarlet
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
@file:JvmName("RunInSuspendJvmKt")
package love.forte.plugin.suspendtrans.runtime