Files
kotlin-fork/kotlin-native/backend.native/tests/samples/workers/build.gradle.kts
T
2022-08-31 16:10:04 +00:00

24 lines
620 B
Kotlin

plugins {
kotlin("multiplatform")
}
kotlin {
// Determine host preset.
val hostOs = System.getProperty("os.name")
// Create target for the host platform.
val hostTarget = when {
hostOs == "Mac OS X" -> macosX64("workers")
hostOs == "Linux" -> linuxX64("workers")
hostOs.startsWith("Windows") -> mingwX64("workers")
else -> throw GradleException("Host OS '$hostOs' is not supported in Kotlin/Native $project.")
}
hostTarget.apply {
binaries {
executable {
entryPoint = "sample.workers.main"
}
}
}
}