Files
2020-10-15 21:47:00 +03:00

34 lines
780 B
Kotlin
Vendored

plugins {
kotlin("multiplatform") version "KOTLIN_VERSION"
}
group = "me.user"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven { url = uri("KOTLIN_REPO") }
}
kotlin {
val hostOs = System.getProperty("os.name")
val isMingwX64 = hostOs.startsWith("Windows")
val nativeTarget = when {
hostOs == "Mac OS X" -> macosX64("native")
hostOs == "Linux" -> linuxX64("native")
isMingwX64 -> mingwX64("native")
else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
}
nativeTarget.apply {
binaries {
executable {
entryPoint = "main"
}
}
}
sourceSets {
val nativeMain by getting
val nativeTest by getting
}
}