Minor: add test on importing platform of commonMain in single-backend project
This commit is contained in:
committed by
Yaroslav Chernyshev
parent
c3f5d57d3b
commit
1143865e88
+21
@@ -578,6 +578,27 @@ class HierarchicalMultiplatformProjectImportingTest : MultiplePluginVersionGradl
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@PluginTargetVersions(gradleVersionForLatestPlugin = mppImportTestMinVersionForMaster)
|
||||
fun testCommonMainIsSingleBackend() {
|
||||
configureByFiles()
|
||||
importProject()
|
||||
|
||||
val macosX64 = NativePlatforms.nativePlatformBySingleTarget(KonanTarget.MACOS_X64)
|
||||
val linuxX64 = NativePlatforms.nativePlatformBySingleTarget(KonanTarget.LINUX_X64)
|
||||
|
||||
checkProjectStructure(exhaustiveModuleList = false, exhaustiveSourceSourceRootList = false, exhaustiveDependencyList = false) {
|
||||
module("my-app.commonMain") { targetPlatform(macosX64, linuxX64) }
|
||||
module("my-app.commonTest") { targetPlatform(macosX64, linuxX64) }
|
||||
|
||||
module("my-app.linuxX64Main") { targetPlatform(linuxX64) }
|
||||
module("my-app.linuxX64Test") { targetPlatform(linuxX64) }
|
||||
|
||||
module("my-app.macosX64Test") { targetPlatform(macosX64) }
|
||||
module("my-app.macosX64Main") { targetPlatform(macosX64) }
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkProjectStructure(
|
||||
exhaustiveModuleList: Boolean = true,
|
||||
exhaustiveSourceSourceRootList: Boolean = true,
|
||||
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform").version("{{kotlin_plugin_version}}")
|
||||
}
|
||||
|
||||
group = "project"
|
||||
version = "1.0"
|
||||
|
||||
kotlin {
|
||||
linuxX64()
|
||||
macosX64()
|
||||
}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
kotlin.mpp.enableGranularSourceSetsMetadata=true
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "my-app"
|
||||
|
||||
enableFeaturePreview("GRADLE_METADATA")
|
||||
Reference in New Issue
Block a user