Files
kotlin-fork/kotlin-native/backend.native/tests/samples/build.gradle.kts
T
Svyatoslav Scherbina 05d38c8297 Native: don't build tests/samples/echoServer on Windows
Because of KT-50547, this test doesn't work on Windows with HMPP
enabled.

Previously, because of that HMPP was disabled for all samples.
But now disabling HMPP is no longer possible, so ce9a45b enables HMPP
for samples.

Disable echoServer sample on Windows to workaround ^KT-50547
2023-08-09 16:22:14 +00:00

69 lines
1.8 KiB
Kotlin

buildscript {
repositories {
mavenCentral()
val kotlinCompilerRepo: String? by rootProject
kotlinCompilerRepo?.let { maven(it) }
}
val kotlin_version: String by rootProject
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
}
}
allprojects {
repositories {
mavenCentral()
val kotlinCompilerRepo: String? by rootProject
kotlinCompilerRepo?.let { maven(it) }
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile>().configureEach {
compilerOptions.freeCompilerArgs.addAll(
"-XXLanguage:+ImplicitSignedToUnsignedIntegerConversion",
"-opt-in=kotlinx.cinterop.ExperimentalForeignApi",
"-opt-in=kotlin.experimental.ExperimentalNativeApi"
)
}
}
val hostOs = System.getProperty("os.name")
val isMacos = hostOs == "Mac OS X"
val isLinux = hostOs == "Linux"
val isWindows = hostOs.startsWith("Windows")
val localRepo = rootProject.file("build/.m2-local")
val clean by tasks.creating(Delete::class) {
delete(localRepo)
}
val buildSamplesWithPlatformLibs by tasks.creating {
dependsOn(":csvparser:assemble")
if (!isWindows) {
dependsOn(":curl:assemble")
}
dependsOn(":globalState:assemble")
dependsOn(":workers:assemble")
if (isMacos || isLinux) {
dependsOn(":echoServer:assemble") // https://youtrack.jetbrains.com/issue/KT-50547
dependsOn(":nonBlockingEchoServer:assemble")
dependsOn(":tensorflow:assemble")
}
if (isMacos) {
dependsOn(":objc:assemble")
dependsOn(":opengl:assemble")
dependsOn(":uikit:assemble")
dependsOn(":coverage:assemble")
dependsOn(":watchos:assemble")
}
if (isWindows) {
dependsOn(":win32:assemble")
}
}