Skip to content

Commit db365c0

Browse files
committed
reconfigure opt ins
1 parent ef3d00a commit db365c0

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

sqliter-driver/build.gradle.kts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ fun configInterop(target: org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTar
2626
HostManager.hostIsMingw -> listOf("-linker-options", "-lsqlite3 -Lc:\\msys64\\mingw64\\lib")
2727
else -> listOf("-linker-options", "-lsqlite3")
2828
}
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-
)
3529
}
3630
}
3731

@@ -60,6 +54,13 @@ kotlin {
6054
}
6155

6256
sourceSets {
57+
all {
58+
languageSettings.apply {
59+
optIn("kotlin.experimental.ExperimentalNativeApi")
60+
optIn("kotlinx.cinterop.ExperimentalForeignApi")
61+
optIn("kotlinx.cinterop.BetaInteropApi")
62+
}
63+
}
6364
commonMain {
6465
dependencies {
6566
implementation("org.jetbrains.kotlin:kotlin-stdlib-common")
@@ -104,11 +105,14 @@ kotlin {
104105
target.compilations.getByName("test").defaultSourceSet.dependsOn(nativeCommonTest)
105106
}
106107
}
107-
108108
}
109109
}
110110
}
111111

112+
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
113+
kotlinOptions.freeCompilerArgs += "-Xexpect-actual-classes"
114+
}
115+
112116
if(!HostManager.hostIsLinux) {
113117
tasks.findByName("linuxX64Test")?.enabled = false
114118
tasks.findByName("linkDebugTestLinuxX64")?.enabled = false

0 commit comments

Comments
 (0)