[K2/Native] Configure metadata compilation mode
This fixes access to internal declarations in common source sets from intermediate source sets that are compiled to metadata. #KT-58219 Fixed
This commit is contained in:
committed by
Space Team
parent
aea8670c12
commit
6d3b911dfc
+12
@@ -62,4 +62,16 @@ class CustomK2Tests : KGPBaseTest() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Disabled("disable until kotlin/native dependency is updated to include KT-58219")
|
||||
@GradleTest
|
||||
@DisplayName("Native metadata of intermediate with reference to internal in common. KT-58219")
|
||||
fun nativeMetadataOfIntermediateWithReferenceToInternalInCommon(gradleVersion: GradleVersion) {
|
||||
with(project("k2-native-intermediate-metadata", gradleVersion, buildOptions = defaultBuildOptions.copy(languageVersion = "2.0"))) {
|
||||
val taskToExecute = ":compileNativeMainKotlinMetadata"
|
||||
build(taskToExecute) {
|
||||
assertTasksExecuted(taskToExecute)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
|
||||
|
||||
group = "test"
|
||||
version = "1.0"
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
targetHierarchy.default()
|
||||
linuxX64()
|
||||
macosX64()
|
||||
macosArm64()
|
||||
mingwX64()
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompilationTask<*>>().configureEach {
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-Xrender-internal-diagnostic-names")
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
internal object Symbol
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
Symbol
|
||||
}
|
||||
Reference in New Issue
Block a user