KiteSsotIoWorkerExtension

The generated browser Web Worker helper, inside kiteSsot { web { ioWorker { ... } } }.

kiteSsot {
web {
ioWorker {
targets("js")
packageName = "com.acme.app.generated"
}
}
}

Opening this block turns generation on. KiteSSOT then writes a kiteSsotOffload function into each listed target's source set, so the plain js target gets it in jsMain. The function runs one JavaScript job on a throwaway worker, waits for the answer, and terminates the worker.

This is a small browser helper, not Dispatchers.IO and not a cross-platform worker runtime. It needs the browser Worker, Blob, and object-URL APIs, so Node.js-only targets and wasmJs are unsupported. You also add kotlinx-coroutines-core yourself: KiteSSOT never adds a dependency for you.

The helper executes raw JavaScript source as code. Only pass source you wrote and trust, never anything built from user-controlled data. The deployed Content Security Policy must allow Blob workers too, normally with worker-src blob:.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract val enabled: Property<Boolean>

Whether the helper is generated.

Link copied to clipboard
abstract val packageName: Property<String>

Kotlin package of the generated helper, written as dot-separated identifiers such as com.acme.app.generated.

Link copied to clipboard
abstract val projects: ListProperty<String>

Exact Gradle project paths that receive the helper, absolute, such as ":shared" or ":apps:web". Each one must apply Kotlin Multiplatform.

Link copied to clipboard
abstract val targets: ListProperty<String>

Exact Kotlin/JS target names that run in a browser.

Functions

Link copied to clipboard
fun projects(vararg paths: String)

Adds one or more project paths to projects.

Link copied to clipboard
fun targets(vararg names: String)

Adds one or more browser target names to targets.