4e91f1c607
Needed for support latest syntax of Gradle dsl for js
39 lines
953 B
Groovy
Vendored
39 lines
953 B
Groovy
Vendored
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithTests
|
|
|
|
plugins {
|
|
id 'org.jetbrains.kotlin.multiplatform' version 'KOTLIN_VERSION'
|
|
}
|
|
group = 'me.user'
|
|
version = '1.0-SNAPSHOT'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
url 'https://dl.bintray.com/kotlin/kotlin-dev'
|
|
}
|
|
}
|
|
kotlin {
|
|
def hostOs = System.getProperty("os.name")
|
|
def isMingwX64 = hostOs.startsWith("Windows")
|
|
KotlinNativeTargetWithTests nativeTarget
|
|
if (hostOs == "Mac OS X") nativeTarget = macosX64('native')
|
|
else if (hostOs == "Linux") nativeTarget = linuxX64("native")
|
|
else if (isMingwX64) nativeTarget = mingwX64("native")
|
|
else throw new GradleException("Host OS is not supported in Kotlin/Native.")
|
|
|
|
nativeTarget.with {
|
|
binaries {
|
|
executable {
|
|
entryPoint = 'main'
|
|
}
|
|
}
|
|
}
|
|
sourceSets {
|
|
nativeMain {
|
|
|
|
}
|
|
nativeTest {
|
|
|
|
}
|
|
}
|
|
} |