[Gradle] Implement MppSharedNativeCompileIT for KT-57944
... covering shared native compilation for a simple Gradle project
This commit is contained in:
committed by
Space Team
parent
3b96ab195f
commit
6c271eb24a
+14
@@ -46,4 +46,18 @@ class MppSharedNativeCompileIT : KGPBaseTest() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@GradleTest
|
||||||
|
fun `test - K2 - shared native compilation - assemble`(gradleVersion: GradleVersion) {
|
||||||
|
project("kt-57944-k2-native-compilation", gradleVersion, buildOptions = defaultBuildOptions.copy(languageVersion = "2.0")) {
|
||||||
|
build("assemble") {
|
||||||
|
assertTasksExecuted(":compileCommonMainKotlinMetadata")
|
||||||
|
assertTasksExecuted(":compileNativeMainKotlinMetadata")
|
||||||
|
assertTasksExecuted(":compileKotlinLinuxX64")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
plugins {
|
||||||
|
id("org.jetbrains.kotlin.multiplatform")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenLocal()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvm()
|
||||||
|
linuxX64()
|
||||||
|
linuxArm64()
|
||||||
|
|
||||||
|
targetHierarchy.default()
|
||||||
|
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
rootProject.name = "test-project"
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
object CommonMain {
|
||||||
|
fun invoke() = CommonMain
|
||||||
|
}
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
object LinuxX64Main {
|
||||||
|
fun invoke() = apply {
|
||||||
|
NativeMain.invoke()
|
||||||
|
CommonMain.invoke()
|
||||||
|
}
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
object NativeMain {
|
||||||
|
fun invoke() = apply {
|
||||||
|
CommonMain.invoke()
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user