phisch
11/04/2020, 1:17 PMphisch
11/04/2020, 1:20 PMbuild.gradle.kts
:
plugins {
kotlin("multiplatform") version "1.4.10"
}
group = "me.phisch"
version = "0.1-DEVELOPMENT"
repositories {
mavenCentral()
}
kotlin {
val hostOs = System.getProperty("os.name")
val nativeTarget = when {
hostOs == "Linux" -> linuxX64("native")
else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
}
nativeTarget.apply {
binaries {
executable {
entryPoint = "main"
}
}
compilations.getByName("main") {
val xcb by cinterops.creating
}
}
sourceSets {
val nativeMain by getting
val nativeTest by getting
}
}