[Tests] Add missing experimental cinterop optins (after KT-57728) in various Gradle IT
This commit is contained in:
committed by
Space Team
parent
dadb3673ba
commit
f659b63aef
+4
@@ -87,4 +87,8 @@ kotlin {
|
||||
header(file("libs/simple.h"))
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.all {
|
||||
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -114,4 +114,8 @@ kotlin {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.all {
|
||||
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -100,4 +100,8 @@ kotlin {
|
||||
sourceSets.commonMain.get().dependencies {
|
||||
implementation(project(":p2"))
|
||||
}
|
||||
|
||||
sourceSets.all {
|
||||
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -78,6 +78,10 @@ kotlin {
|
||||
configure(listOf(mingwX64(), mingwX86())) {
|
||||
compilations["main"].defaultSourceSet.dependsOn(windowsMain)
|
||||
}
|
||||
|
||||
all {
|
||||
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -47,4 +47,8 @@ kotlin {
|
||||
mingwX64Test.dependsOn(this)
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.all {
|
||||
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -21,4 +21,8 @@ kotlin {
|
||||
unixMain.dependsOn(commonMain)
|
||||
linuxMain.dependsOn(unixMain)
|
||||
macosMain.dependsOn(unixMain)
|
||||
|
||||
sourceSets.all {
|
||||
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -22,6 +22,7 @@ kotlin {
|
||||
|
||||
sourceSets.all {
|
||||
languageSettings.optIn("kotlin.RequiresOptIn")
|
||||
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
|
||||
}
|
||||
|
||||
targetA.compilations.getByName("main").cinterops.create("curl")
|
||||
|
||||
+1
@@ -41,6 +41,7 @@ kotlin {
|
||||
|
||||
sourceSets.all {
|
||||
languageSettings.optIn("kotlin.RequiresOptIn")
|
||||
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
|
||||
}
|
||||
|
||||
targets.withType<KotlinNativeTarget>().forEach { target ->
|
||||
|
||||
+1
-1
@@ -66,9 +66,9 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sourceSets.all {
|
||||
languageSettings.optIn("kotlin.RequiresOptIn")
|
||||
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
|
||||
}
|
||||
|
||||
targets.withType<KotlinNativeTarget>().forEach { target ->
|
||||
|
||||
+1
@@ -72,6 +72,7 @@ kotlin {
|
||||
|
||||
sourceSets.all {
|
||||
languageSettings.optIn("kotlin.RequiresOptIn")
|
||||
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
|
||||
}
|
||||
|
||||
targets.withType<KotlinNativeTarget>().forEach { target ->
|
||||
|
||||
+1
@@ -68,6 +68,7 @@ kotlin {
|
||||
|
||||
sourceSets.all {
|
||||
languageSettings.optIn("kotlin.RequiresOptIn")
|
||||
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
|
||||
}
|
||||
|
||||
targets.withType<KotlinNativeTarget>().forEach { target ->
|
||||
|
||||
+1
@@ -23,6 +23,7 @@ kotlin {
|
||||
|
||||
sourceSets.all {
|
||||
languageSettings.optIn("kotlin.RequiresOptIn")
|
||||
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
|
||||
}
|
||||
|
||||
targetA.compilations.getByName("main").cinterops.create("withPosix") {
|
||||
|
||||
+4
@@ -140,4 +140,8 @@ kotlin {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.all {
|
||||
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -22,6 +22,7 @@ kotlin {
|
||||
|
||||
sourceSets.all {
|
||||
languageSettings.optIn("kotlin.RequiresOptIn")
|
||||
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
|
||||
}
|
||||
|
||||
targetA.compilations.getByName("main").cinterops.create("sqlite")
|
||||
|
||||
+1
@@ -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
|
||||
|
||||
-10
@@ -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
|
||||
}
|
||||
}
|
||||
-16
@@ -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()
|
||||
}
|
||||
}
|
||||
-15
@@ -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
|
||||
}
|
||||
}
|
||||
+4
@@ -20,6 +20,10 @@ kotlin {
|
||||
sourceSets["jsMain"].dependencies {
|
||||
implementation(kotlin("stdlib-js"))
|
||||
}
|
||||
|
||||
sourceSets.all {
|
||||
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+4
@@ -19,4 +19,8 @@ kotlin {
|
||||
sourceSets["jsMain"].dependencies {
|
||||
implementation(kotlin("stdlib-js"))
|
||||
}
|
||||
|
||||
sourceSets.all {
|
||||
languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user