@@ -26,12 +26,6 @@ fun configInterop(target: org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTar
26
26
HostManager .hostIsMingw -> listOf (" -linker-options" , " -lsqlite3 -Lc:\\ msys64\\ mingw64\\ lib" )
27
27
else -> listOf (" -linker-options" , " -lsqlite3" )
28
28
}
29
- kotlinNativeCompilation.kotlinOptions.freeCompilerArgs + = listOf (
30
- " -opt-in=kotlin.experimental.ExperimentalNativeApi" ,
31
- " -opt-in=kotlinx.cinterop.ExperimentalForeignApi" ,
32
- " -opt-in=kotlinx.cinterop.BetaInteropApi" ,
33
- " -Xexpect-actual-classes" ,
34
- )
35
29
}
36
30
}
37
31
@@ -60,6 +54,13 @@ kotlin {
60
54
}
61
55
62
56
sourceSets {
57
+ all {
58
+ languageSettings.apply {
59
+ optIn(" kotlin.experimental.ExperimentalNativeApi" )
60
+ optIn(" kotlinx.cinterop.ExperimentalForeignApi" )
61
+ optIn(" kotlinx.cinterop.BetaInteropApi" )
62
+ }
63
+ }
63
64
commonMain {
64
65
dependencies {
65
66
implementation(" org.jetbrains.kotlin:kotlin-stdlib-common" )
@@ -104,11 +105,14 @@ kotlin {
104
105
target.compilations.getByName(" test" ).defaultSourceSet.dependsOn(nativeCommonTest)
105
106
}
106
107
}
107
-
108
108
}
109
109
}
110
110
}
111
111
112
+ tasks.withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompile > {
113
+ kotlinOptions.freeCompilerArgs + = " -Xexpect-actual-classes"
114
+ }
115
+
112
116
if (! HostManager .hostIsLinux) {
113
117
tasks.findByName(" linuxX64Test" )?.enabled = false
114
118
tasks.findByName(" linkDebugTestLinuxX64" )?.enabled = false
0 commit comments