1
0
Fork 0
happy-cat/build.gradle.kts

53 lines
1.5 KiB
Plaintext
Raw Normal View History

2022-02-12 09:28:46 -05:00
plugins {
kotlin("multiplatform") version "1.6.10"
kotlin("plugin.serialization") version "1.6.10"
2022-02-12 09:28:46 -05:00
}
group = "fi.schro"
version = "0.0.1"
repositories {
mavenCentral()
}
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 = "fi.schro.main"
}
}
}
2022-02-14 15:38:34 -05:00
targets.withType<org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget> {
binaries.all {
freeCompilerArgs += "-Xdisable-phases=EscapeAnalysis"
}
}
2022-02-12 09:28:46 -05:00
sourceSets {
val nativeMain by getting {
dependencies {
implementation("io.insert-koin:koin-core:3.1.5")
implementation("com.github.ajalt.clikt:clikt:3.4.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
2022-02-19 11:37:09 -05:00
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.3.2")
implementation("io.ktor:ktor-client-core:1.6.7")
implementation("io.ktor:ktor-client-cio:1.6.7")
2022-02-14 15:38:34 -05:00
implementation("io.ktor:ktor-client-serialization:1.6.7")
2022-02-12 09:28:46 -05:00
}
}
val nativeTest by getting
}
}