[MPP] Remove obsolete targets from NewMultiplatformIT and ConfigurationCacheIT
^KT-58822
This commit is contained in:
committed by
Space Team
parent
078356164b
commit
19c6622ff6
+1
-1
@@ -70,7 +70,7 @@ class ConfigurationCacheIT : AbstractConfigurationCacheIT() {
|
||||
@GradleTest
|
||||
fun testMppWithMavenPublish(gradleVersion: GradleVersion) {
|
||||
project("new-mpp-lib-and-app/sample-lib", gradleVersion) {
|
||||
val publishedTargets = listOf("kotlinMultiplatform", "jvm6", "nodeJs", "linux64", "mingw64", "mingw86")
|
||||
val publishedTargets = listOf("kotlinMultiplatform", "jvm6", "nodeJs", "linux64", "mingw64")
|
||||
testConfigurationCacheOf(
|
||||
*(publishedTargets.map { ":publish${it.replaceFirstChar { it.uppercaseChar() }}PublicationToMavenRepository" }.toTypedArray()),
|
||||
checkUpToDateOnRebuild = false
|
||||
|
||||
+13
-9
@@ -40,7 +40,6 @@ open class NewMultiplatformIT : BaseGradleIT() {
|
||||
private val gradleVersion = GradleVersionRequired.FOR_MPP_SUPPORT
|
||||
|
||||
private val nativeHostTargetName = MPPNativeTargets.current
|
||||
private val unsupportedNativeTargets = MPPNativeTargets.unsupported
|
||||
|
||||
private fun Project.targetClassesDir(targetName: String, sourceSetName: String = "main") =
|
||||
classesDir(sourceSet = "$targetName/$sourceSetName")
|
||||
@@ -48,7 +47,7 @@ open class NewMultiplatformIT : BaseGradleIT() {
|
||||
private data class HmppFlags(
|
||||
val hmppSupport: Boolean,
|
||||
val enableCompatibilityMetadataArtifact: Boolean,
|
||||
val name: String
|
||||
val name: String,
|
||||
) {
|
||||
override fun toString() = name
|
||||
}
|
||||
@@ -308,7 +307,7 @@ open class NewMultiplatformIT : BaseGradleIT() {
|
||||
private fun doTestLibAndAppJsBothCompilers(
|
||||
libProjectName: String,
|
||||
appProjectName: String,
|
||||
jsCompilerType: KotlinJsCompilerType
|
||||
jsCompilerType: KotlinJsCompilerType,
|
||||
) {
|
||||
val libProject = transformProjectWithPluginsDsl(libProjectName, directoryPrefix = "both-js-lib-and-app")
|
||||
val appProject = transformProjectWithPluginsDsl(appProjectName, directoryPrefix = "both-js-lib-and-app")
|
||||
@@ -883,7 +882,7 @@ open class NewMultiplatformIT : BaseGradleIT() {
|
||||
fun testMonotonousCheck(
|
||||
initialSetupForSourceSets: String?,
|
||||
sourceSetConfigurationChange: String,
|
||||
expectedErrorHint: String
|
||||
expectedErrorHint: String,
|
||||
) {
|
||||
if (initialSetupForSourceSets != null) {
|
||||
gradleBuildScript().appendText(
|
||||
@@ -1119,14 +1118,19 @@ open class NewMultiplatformIT : BaseGradleIT() {
|
||||
|
||||
@Test
|
||||
fun testPublishingOnlySupportedNativeTargets() = with(transformNativeTestProject("sample-lib", gradleVersion, "new-mpp-lib-and-app")) {
|
||||
val publishedVariant = nativeHostTargetName
|
||||
val nonPublishedVariant = unsupportedNativeTargets[0]
|
||||
val publishedVariants = MPPNativeTargets.supported
|
||||
val nonPublishedVariants = MPPNativeTargets.unsupported
|
||||
|
||||
build("publish") {
|
||||
assertSuccessful()
|
||||
|
||||
assertFileExists("repo/com/example/sample-lib-$publishedVariant/1.0/sample-lib-$publishedVariant-1.0.klib")
|
||||
assertNoSuchFile("repo/com/example/sample-lib-$nonPublishedVariant") // check that no artifacts are published for that variant
|
||||
assertTrue(publishedVariants.isNotEmpty())
|
||||
publishedVariants.forEach {
|
||||
assertFileExists("repo/com/example/sample-lib-$it/1.0/sample-lib-$it-1.0.klib")
|
||||
}
|
||||
nonPublishedVariants.forEach {
|
||||
assertNoSuchFile("repo/com/example/sample-lib-$it") // check that no artifacts are published for that variant
|
||||
}
|
||||
|
||||
// but check that the module metadata contains all variants:
|
||||
val gradleModuleMetadata = projectDir.resolve("repo/com/example/sample-lib/1.0/sample-lib-1.0.module").readText()
|
||||
@@ -1566,7 +1570,7 @@ open class NewMultiplatformIT : BaseGradleIT() {
|
||||
}
|
||||
|
||||
val expectedDefaultSourceSets = listOf(
|
||||
"jvm6", "nodeJs", "mingw64", "mingw86", "linux64", "macos64", "linuxMipsel32", "wasm"
|
||||
"jvm6", "nodeJs", "mingw64", "linux64", "macos64", "wasm"
|
||||
).flatMapTo(mutableSetOf()) { target ->
|
||||
listOf("main", "test").map { compilation ->
|
||||
Triple(
|
||||
|
||||
+3
-3
@@ -43,9 +43,9 @@ internal object MPPNativeTargets {
|
||||
}
|
||||
|
||||
val unsupported = when {
|
||||
HostManager.hostIsMingw -> listOf("macos64")
|
||||
HostManager.hostIsLinux -> listOf("macos64", "mingw64")
|
||||
HostManager.hostIsMac -> listOf("linuxMipsel32")
|
||||
HostManager.hostIsMingw -> setOf("macos64")
|
||||
HostManager.hostIsLinux -> setOf("macos64")
|
||||
HostManager.hostIsMac -> emptySet()
|
||||
else -> error("Unknown host")
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ kotlin {
|
||||
}
|
||||
}
|
||||
// This is for iPhone emulator
|
||||
// Switch here to iosArm64 (or iosArm32) to build library for iPhone device
|
||||
// Switch here to iosArm64 to build library for iPhone device
|
||||
iosX64("iosSimLib") {
|
||||
binaries {
|
||||
// framework()
|
||||
|
||||
-5
@@ -39,11 +39,6 @@ kotlin {
|
||||
fromPreset(presets.mingwX64, 'mingw64')
|
||||
fromPreset(presets.macosX64, 'macos64')
|
||||
|
||||
// We use this library in the cinterop test which includes a Windows x86 target.
|
||||
fromPreset(presets.mingwX86, 'mingw86')
|
||||
|
||||
fromPreset(presets.linuxMipsel32, 'linuxMipsel32')
|
||||
|
||||
// Check the DSL constructs in the Groovy DSL:
|
||||
fromPreset(presets.jvm, 'jvm6') {
|
||||
println "Configuring $targetName"
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package com.example.lib
|
||||
|
||||
actual fun expectedFun(): Unit {
|
||||
id(123)
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
resource
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package com.example.lib
|
||||
|
||||
actual fun expectedFun(): Unit {
|
||||
id(123)
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
resource
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package com.example.lib
|
||||
|
||||
actual fun expectedFun(): Unit {
|
||||
id(123)
|
||||
}
|
||||
Reference in New Issue
Block a user