SuspendTransforms

添加至 gradle 项目的 buildSrc 中,并在需要配置 suspendTransform 的地方:

suspendTransform {
includeRuntime = false
includeAnnotation = false

addJvmTransformers(
// @JvmBlocking
SuspendTransforms.jvmBlockingTransformer,
// @JvmAsync
SuspendTransforms.jvmAsyncTransformer,

// @JvmSuspendTrans
SuspendTransforms.suspendTransTransformerForJvmBlocking,
SuspendTransforms.suspendTransTransformerForJvmAsync,
SuspendTransforms.suspendTransTransformerForJvmReserve,

// @JvmSuspendTransProperty
SuspendTransforms.jvmSuspendTransPropTransformerForBlocking,
SuspendTransforms.jvmSuspendTransPropTransformerForAsync,
SuspendTransforms.jvmSuspendTransPropTransformerForReserve,
)
}

Properties

Link copied to clipboard
val jsPromiseTransformer: Transformer

JsPromise

Link copied to clipboard
val jvmAsyncTransformer: Transformer

JvmAsync

Link copied to clipboard
val jvmBlockingTransformer: Transformer

JvmBlocking

Link copied to clipboard
val jvmReserveTransformer: Transformer

JvmReserve