[Tests] Add missing experimental cinterop optins (after KT-57728) in various Gradle IT

This commit is contained in:
Artem Daugel-Dauge
2023-05-08 11:08:17 +02:00
committed by Space Team
parent dadb3673ba
commit f659b63aef
20 changed files with 44 additions and 42 deletions
@@ -87,4 +87,8 @@ kotlin {
header(file("libs/simple.h"))
}
}
sourceSets.all {
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
}
@@ -114,4 +114,8 @@ kotlin {
}
}
}
sourceSets.all {
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
}
@@ -100,4 +100,8 @@ kotlin {
sourceSets.commonMain.get().dependencies {
implementation(project(":p2"))
}
sourceSets.all {
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
}
@@ -78,6 +78,10 @@ kotlin {
configure(listOf(mingwX64(), mingwX86())) {
compilations["main"].defaultSourceSet.dependsOn(windowsMain)
}
all {
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
}
}
@@ -47,4 +47,8 @@ kotlin {
mingwX64Test.dependsOn(this)
}
}
sourceSets.all {
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
}
@@ -21,4 +21,8 @@ kotlin {
unixMain.dependsOn(commonMain)
linuxMain.dependsOn(unixMain)
macosMain.dependsOn(unixMain)
sourceSets.all {
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
}
@@ -22,6 +22,7 @@ kotlin {
sourceSets.all {
languageSettings.optIn("kotlin.RequiresOptIn")
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
targetA.compilations.getByName("main").cinterops.create("curl")
@@ -41,6 +41,7 @@ kotlin {
sourceSets.all {
languageSettings.optIn("kotlin.RequiresOptIn")
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
targets.withType<KotlinNativeTarget>().forEach { target ->
@@ -66,9 +66,9 @@ kotlin {
}
}
sourceSets.all {
languageSettings.optIn("kotlin.RequiresOptIn")
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
targets.withType<KotlinNativeTarget>().forEach { target ->
@@ -72,6 +72,7 @@ kotlin {
sourceSets.all {
languageSettings.optIn("kotlin.RequiresOptIn")
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
targets.withType<KotlinNativeTarget>().forEach { target ->
@@ -68,6 +68,7 @@ kotlin {
sourceSets.all {
languageSettings.optIn("kotlin.RequiresOptIn")
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
targets.withType<KotlinNativeTarget>().forEach { target ->
@@ -23,6 +23,7 @@ kotlin {
sourceSets.all {
languageSettings.optIn("kotlin.RequiresOptIn")
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
targetA.compilations.getByName("main").cinterops.create("withPosix") {
@@ -140,4 +140,8 @@ kotlin {
}
}
}
sourceSets.all {
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
}
@@ -22,6 +22,7 @@ kotlin {
sourceSets.all {
languageSettings.optIn("kotlin.RequiresOptIn")
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
targetA.compilations.getByName("main").cinterops.create("sqlite")
@@ -2,6 +2,7 @@
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)
import kotlinx.cinterop.memScoped
import platform.posix.fopen
@@ -1,10 +0,0 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
object ConsumerACommon {
init {
ProducerACommonX
}
}
@@ -1,16 +0,0 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
import clib.myCFunction
object ConsumerALinuxX64 {
init {
ProducerACommonX
ProducerANative
ProducerALinuxX64
myCFunction()
}
}
@@ -1,15 +0,0 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
import kotlinx.cinterop.memScoped
import platform.posix.fopen
object ConsumerANative {
init {
memScoped { }
fopen("", "")
ProducerANative
}
}
@@ -20,6 +20,10 @@ kotlin {
sourceSets["jsMain"].dependencies {
implementation(kotlin("stdlib-js"))
}
sourceSets.all {
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
}
@@ -19,4 +19,8 @@ kotlin {
sourceSets["jsMain"].dependencies {
implementation(kotlin("stdlib-js"))
}
sourceSets.all {
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
}