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, but only if the project also depends on the Kotlinx Coroutines library.

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
}
}
}