5a95d919c7
Add more opt-ins in Samples, tests and Benchmarks. This is a follow-up to KT-MR-9788 Merge-request: KT-MR-9997 Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
34 lines
1.2 KiB
Kotlin
34 lines
1.2 KiB
Kotlin
/*
|
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
|
* that can be found in the LICENSE file.
|
|
*/
|
|
|
|
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
|
import org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType
|
|
|
|
plugins {
|
|
id("benchmarking")
|
|
}
|
|
|
|
benchmark {
|
|
applicationName = "Cinterop"
|
|
commonSrcDirs = listOf("../../tools/benchmarks/shared/src/main/kotlin/report", "src/main/kotlin", "../shared/src/main/kotlin")
|
|
jvmSrcDirs = listOf("src/main/kotlin-jvm", "../shared/src/main/kotlin-jvm")
|
|
nativeSrcDirs = listOf("src/main/kotlin-native", "../shared/src/main/kotlin-native/common")
|
|
mingwSrcDirs = listOf("src/main/kotlin-native", "../shared/src/main/kotlin-native/mingw")
|
|
posixSrcDirs = listOf("src/main/kotlin-native", "../shared/src/main/kotlin-native/posix")
|
|
}
|
|
|
|
val native = kotlin.targets.getByName("native") as KotlinNativeTarget
|
|
native.compilations["main"].apply {
|
|
cinterops {
|
|
create("macros")
|
|
create("struct")
|
|
create("types")
|
|
}
|
|
compilerOptions
|
|
.options
|
|
.freeCompilerArgs
|
|
.add("-opt-in=kotlinx.cinterop.ExperimentalForeignApi")
|
|
}
|