Join us from October 8-10 in New York City to learn the latest tips, trends, and news about GraphQL Federation and API platform engineering.Join us for GraphQL Summit 2024 in NYC
Docs
Start for Free

Kotlin native


is built for multiplatform and therefore supports iOS, MacOS, and other Darwin targets.

Since version 3.5.0, the library requires executables to use the new Kotlin Native Memory Manager. To configure it on your project you can use the following snippet:

build.gradle.kts
kotlin.targets.withType(KotlinNativeTarget::class.java) {
binaries.all {
binaryOptions["memoryModel"] = "experimental"
}
}

More information is available on the migration guide.

Multithreaded coroutines

By default when using the x.y.z-native-mt branch of coroutines, Gradle replaces the -native-mt version with the non-mt version as outlined here. To prevent this, add the following to your root build.gradle.kts:

allprojects {
configurations {
all {
resolutionStrategy {
force("org.jetbrains.kotlinx:kotlinx-coroutines-core:x.y.z-native-mt")
}
}
}
}

This ensures that the same version is used everywhere, and that Gradle doesn't fail because -native-mt is a pre-release version (1.5.1-native-mt < 1.5.1).

Previous
RxJava support
Next
Apollo AST
Rate articleRateEdit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc., d/b/a Apollo GraphQL.

Privacy Policy

Company