Skip to main content

Coroutines

CoroutinesInterop (Boolean)

Globally enables or disables support for all coroutines interop features. This setting is only a prerequisite; features must still be individually enabled.

When this setting is true, SKIE will add a runtime dependency needed by the Coroutines features. This runtime also transitively depends on the Kotlinx Coroutines library.

tip

Set this setting to false if you do not plan to use any of the coroutines features so that SKIE does not add unnecessary runtime dependencies.

The default value is true.

Gradle configuration:

build.gradle.kts
skie {
features {
coroutinesInterop.set(true) // or false
}
}

Suspend Functions

Enabled (Boolean)

Controls if the suspend functions feature is enabled for the given function.

The default value is true.

Annotation configuration:

Kotlin
import co.touchlab.skie.configuration.annotations.SuspendInterop

@SuspendInterop.Enabled
suspend fun enabled() {
}

@SuspendInterop.Disabled
suspend fun disabled() {
}

Gradle configuration:

build.gradle.kts
import co.touchlab.skie.configuration.SuspendInterop

skie {
features {
group {
SuspendInterop.Enabled(true) // or false
}
}
}

Flows

Enabled (Boolean)

Controls if SKIE replaces all Flow types in the given function signature.

The default value is true.

Annotation configuration:

Kotlin
import co.touchlab.skie.configuration.annotations.FlowInterop

@FlowInterop.Enabled
fun enabled(): Flow<Int> = flowOf(1)

@FlowInterop.Disabled
fun disabled(): Flow<Int> = flowOf(1)

Gradle configuration:

build.gradle.kts
import co.touchlab.skie.configuration.FlowInterop

skie {
features {
group {
FlowInterop.Enabled(true) // or false
}
}
}