diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/ConfigurationCacheIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/ConfigurationCacheIT.kt index caa9dc59cea..ccdf1ada684 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/ConfigurationCacheIT.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/ConfigurationCacheIT.kt @@ -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 diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/NewMultiplatformIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/NewMultiplatformIT.kt index e8e7632e2ff..21a043377d3 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/NewMultiplatformIT.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/NewMultiplatformIT.kt @@ -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( diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/native/GeneralNativeIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/native/GeneralNativeIT.kt index 6c287546bd3..55b12c8541c 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/native/GeneralNativeIT.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/native/GeneralNativeIT.kt @@ -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") } diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/hierarchical-mpp-multi-modules/bottom-mpp/build.gradle b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/hierarchical-mpp-multi-modules/bottom-mpp/build.gradle index 6da24091176..821a795fad3 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/hierarchical-mpp-multi-modules/bottom-mpp/build.gradle +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/hierarchical-mpp-multi-modules/bottom-mpp/build.gradle @@ -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() diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/build.gradle b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/build.gradle index 3c1ad07e981..26bc6e4b4dd 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/build.gradle +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/build.gradle @@ -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" diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/linuxMipsel32Main/kotlin/Main.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/linuxMipsel32Main/kotlin/Main.kt deleted file mode 100644 index ad8b9d82c23..00000000000 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/linuxMipsel32Main/kotlin/Main.kt +++ /dev/null @@ -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) -} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/linuxMipsel32Main/resources/linuxMipsel32MainResource.txt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/linuxMipsel32Main/resources/linuxMipsel32MainResource.txt deleted file mode 100644 index d2c4f080510..00000000000 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/linuxMipsel32Main/resources/linuxMipsel32MainResource.txt +++ /dev/null @@ -1 +0,0 @@ -resource \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/mingw86Main/kotlin/Main.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/mingw86Main/kotlin/Main.kt deleted file mode 100644 index ad8b9d82c23..00000000000 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/mingw86Main/kotlin/Main.kt +++ /dev/null @@ -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) -} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/mingw86Main/resources/mingw86MainResource.txt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/mingw86Main/resources/mingw86MainResource.txt deleted file mode 100644 index d2c4f080510..00000000000 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/mingw86Main/resources/mingw86MainResource.txt +++ /dev/null @@ -1 +0,0 @@ -resource \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/wasm32Main/kotlin/Main.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/wasm32Main/kotlin/Main.kt deleted file mode 100644 index ad8b9d82c23..00000000000 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/wasm32Main/kotlin/Main.kt +++ /dev/null @@ -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) -} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/wasm32Main/resources/wasm32MainResource.txt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/wasm32Main/resources/wasm32MainResource.txt deleted file mode 100644 index d2c4f080510..00000000000 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/new-mpp-lib-and-app/sample-lib/src/wasm32Main/resources/wasm32MainResource.txt +++ /dev/null @@ -1 +0,0 @@ -resource \ No newline at end of file