Ido Flax
08/23/2023, 12:43 PMtasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask::class) {
compilerOptions {
freeCompilerArgs.add("-Xjdk-release=11")
freeCompilerArgs.add("-Xcontext-receivers")
}
}
extensions.findByType(KotlinMultiplatformExtension::class)?.apply {
jvm {
jvmToolchain(11)
}
val hostOs = System.getProperty("os.name")
val arch = System.getProperty("os.arch")
val nativeTarget = when {
hostOs == "Mac OS X" && arch == "x86_64" -> macosX64("native")
hostOs == "Mac OS X" && arch == "aarch64" -> macosArm64("native")
hostOs == "Linux" -> linuxX64("native")
// Other supported targets are listed here: <https://ktor.io/docs/native-server.html#targets>
else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
}
nativeTarget.apply {
...
}
this.sourceSets.apply {
commonMain {
...
}
commonTest {
...
}
jvmTest {
...
}
}
The problem is what IJ says in the screenshots
Could anyone solve this issue?