[mpp] Remove usage of deprecated pre-HMPP properties from tests
#KT-59304 In Progress
This commit is contained in:
committed by
teamcity
parent
a3eb472e5f
commit
cfcb0690d7
+1
-3
@@ -129,13 +129,11 @@ internal class CompilerOptionsIT : KGPBaseTest() {
|
|||||||
"""
|
"""
|
||||||
|
|
|
|
||||||
|kotlin.options.suppressFreeCompilerArgsModificationWarning=true
|
|kotlin.options.suppressFreeCompilerArgsModificationWarning=true
|
||||||
|# to enable the :compileKotlinMetadata task
|
|
||||||
|kotlin.mpp.enableCompatibilityMetadataVariant=true
|
|
||||||
""".trimMargin()
|
""".trimMargin()
|
||||||
)
|
)
|
||||||
|
|
||||||
val compileTasks = listOf(
|
val compileTasks = listOf(
|
||||||
"compileKotlinMetadata",
|
"compileCommonMainKotlinMetadata",
|
||||||
"compileKotlinJvmWithoutJava",
|
"compileKotlinJvmWithoutJava",
|
||||||
"compileKotlinJs",
|
"compileKotlinJs",
|
||||||
// we do not allow modifying free args for K/N at execution time
|
// we do not allow modifying free args for K/N at execution time
|
||||||
|
|||||||
+3
-3
@@ -137,10 +137,10 @@ class TryK2IT : KGPBaseTest() {
|
|||||||
) {
|
) {
|
||||||
enableTryK2()
|
enableTryK2()
|
||||||
|
|
||||||
build(":compileKotlinMetadata") {
|
build(":compileCommonMainKotlinMetadata") {
|
||||||
assertTasksExecuted(":compileKotlinMetadata")
|
assertTasksExecuted(":compileCommonMainKotlinMetadata")
|
||||||
|
|
||||||
assertCompilerArgument(":compileKotlinMetadata", "-language-version 2.0")
|
assertCompilerArgument(":compileCommonMainKotlinMetadata", "-language-version 2.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
build(":compileKotlinJvm") {
|
build(":compileKotlinJvm") {
|
||||||
|
|||||||
-1
@@ -1 +0,0 @@
|
|||||||
kotlin.mpp.enableCompatibilityMetadataVariant=true
|
|
||||||
-1
@@ -1,3 +1,2 @@
|
|||||||
kotlin.mpp.enableCInteropCommonization=true
|
kotlin.mpp.enableCInteropCommonization=true
|
||||||
kotlin.mpp.enableIntransitiveMetadataConfiguration=true
|
kotlin.mpp.enableIntransitiveMetadataConfiguration=true
|
||||||
kotlin.mpp.enableCompatibilityMetadataVariant=false
|
|
||||||
-1
@@ -1,3 +1,2 @@
|
|||||||
kotlin.mpp.enableCInteropCommonization=true
|
kotlin.mpp.enableCInteropCommonization=true
|
||||||
kotlin.mpp.enableCompatibilityMetadataVariant=false
|
|
||||||
kotlin.mpp.enableIntransitiveMetadataConfiguration=true
|
kotlin.mpp.enableIntransitiveMetadataConfiguration=true
|
||||||
|
|||||||
-1
@@ -1,3 +1,2 @@
|
|||||||
kotlin.mpp.enableCInteropCommonization=true
|
kotlin.mpp.enableCInteropCommonization=true
|
||||||
kotlin.mpp.enableCompatibilityMetadataVariant=false
|
|
||||||
kotlin.mpp.enableIntransitiveMetadataConfiguration=true
|
kotlin.mpp.enableIntransitiveMetadataConfiguration=true
|
||||||
|
|||||||
-1
@@ -1,4 +1,3 @@
|
|||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
kotlin.mpp.enableCInteropCommonization=true
|
kotlin.mpp.enableCInteropCommonization=true
|
||||||
kotlin.mpp.enableIntransitiveMetadataConfiguration=true
|
kotlin.mpp.enableIntransitiveMetadataConfiguration=true
|
||||||
kotlin.mpp.enableCompatibilityMetadataVariant=false
|
|
||||||
|
|||||||
-1
@@ -1 +0,0 @@
|
|||||||
kotlin.mpp.enableCompatibilityMetadataVariant=true
|
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
kotlin.mpp.enableCompatibilityMetadataVariant=true
|
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
kotlin.mpp.enableCompatibilityMetadataVariant=true
|
|
||||||
-2
@@ -1,3 +1 @@
|
|||||||
kotlin.mpp.enableGranularSourceSetsMetadata=true
|
|
||||||
kotlin.native.enableDependencyPropagation=false
|
|
||||||
kotlin.mpp.enableCInteropCommonization=true
|
kotlin.mpp.enableCInteropCommonization=true
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
kotlin.mpp.enableCompatibilityMetadataVariant=true
|
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
kotlin.mpp.enableCompatibilityMetadataVariant=true
|
|
||||||
-1
@@ -31,7 +31,6 @@ class JvmAndAndroidIntermediateSourceSetTest {
|
|||||||
fun setup() {
|
fun setup() {
|
||||||
project = ProjectBuilder.builder().build() as ProjectInternal
|
project = ProjectBuilder.builder().build() as ProjectInternal
|
||||||
addBuildEventsListenerRegistryMock(project)
|
addBuildEventsListenerRegistryMock(project)
|
||||||
project.extensions.getByType(ExtraPropertiesExtension::class.java).set("kotlin.mpp.enableGranularSourceSetsMetadata", "true")
|
|
||||||
|
|
||||||
project.plugins.apply("kotlin-multiplatform")
|
project.plugins.apply("kotlin-multiplatform")
|
||||||
project.plugins.apply("android-library")
|
project.plugins.apply("android-library")
|
||||||
|
|||||||
-5
@@ -13,11 +13,6 @@ import kotlin.test.Test
|
|||||||
|
|
||||||
class KT46273JvmTargetAndOrphanTestSourceSetTest : MultiplatformExtensionTest() {
|
class KT46273JvmTargetAndOrphanTestSourceSetTest : MultiplatformExtensionTest() {
|
||||||
|
|
||||||
override fun setup() {
|
|
||||||
enableGranularSourceSetsMetadata()
|
|
||||||
super.setup()
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `test KT-46273`() {
|
fun `test KT-46273`() {
|
||||||
kotlin.jvm()
|
kotlin.jvm()
|
||||||
|
|||||||
-1
@@ -32,7 +32,6 @@ class CInteropCommonizerTaskTest : MultiplatformExtensionTest() {
|
|||||||
|
|
||||||
@BeforeTest
|
@BeforeTest
|
||||||
override fun setup() {
|
override fun setup() {
|
||||||
enableGranularSourceSetsMetadata()
|
|
||||||
enableCInteropCommonization()
|
enableCInteropCommonization()
|
||||||
super.setup()
|
super.setup()
|
||||||
}
|
}
|
||||||
|
|||||||
-1
@@ -25,7 +25,6 @@ internal class CompilationSpecificPluginPath {
|
|||||||
class NativeSpecificPlugin : FakeSubPlugin("common", "native", { true })
|
class NativeSpecificPlugin : FakeSubPlugin("common", "native", { true })
|
||||||
|
|
||||||
val project = buildProject {
|
val project = buildProject {
|
||||||
extensions.getByType(ExtraPropertiesExtension::class.java).set("kotlin.mpp.enableGranularSourceSetsMetadata", "true")
|
|
||||||
project.plugins.apply("kotlin-multiplatform")
|
project.plugins.apply("kotlin-multiplatform")
|
||||||
|
|
||||||
plugins.apply(NativeSpecificPlugin::class.java)
|
plugins.apply(NativeSpecificPlugin::class.java)
|
||||||
|
|||||||
-13
@@ -16,7 +16,6 @@ import org.jetbrains.kotlin.gradle.plugin.diagnostics.kotlinToolingDiagnosticsCo
|
|||||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
||||||
import org.jetbrains.kotlin.gradle.util.applyMultiplatformPlugin
|
import org.jetbrains.kotlin.gradle.util.applyMultiplatformPlugin
|
||||||
import org.jetbrains.kotlin.gradle.util.enableCInteropCommonization
|
import org.jetbrains.kotlin.gradle.util.enableCInteropCommonization
|
||||||
import org.jetbrains.kotlin.gradle.util.enableHierarchicalStructureByDefault
|
|
||||||
import org.jetbrains.kotlin.gradle.util.propertiesExtension
|
import org.jetbrains.kotlin.gradle.util.propertiesExtension
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
@@ -79,18 +78,6 @@ class DisabledCInteropCommonizationWarningTest {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `test warning is not shown when hierarchical structure is disabled`() {
|
|
||||||
project.enableCInteropCommonization(false)
|
|
||||||
project.enableHierarchicalStructureByDefault(false)
|
|
||||||
project.setupNativeTargetsWithCInterops()
|
|
||||||
project.evaluate()
|
|
||||||
assertNull(
|
|
||||||
project.getWarningMessage(),
|
|
||||||
"Expected no error message shown when hmpp is disabled"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `test warning is not shown when no cinterops are defined`() {
|
fun `test warning is not shown when no cinterops are defined`() {
|
||||||
project.enableCInteropCommonization(false)
|
project.enableCInteropCommonization(false)
|
||||||
|
|||||||
-1
@@ -34,7 +34,6 @@ class SourceSetCommonizerTargetTest {
|
|||||||
fun setup() {
|
fun setup() {
|
||||||
project = buildProject()
|
project = buildProject()
|
||||||
addBuildEventsListenerRegistryMock(project)
|
addBuildEventsListenerRegistryMock(project)
|
||||||
project.extensions.getByType(ExtraPropertiesExtension::class.java).set("kotlin.mpp.enableCompatibilityMetadataVariant", "false")
|
|
||||||
project.plugins.apply("kotlin-multiplatform")
|
project.plugins.apply("kotlin-multiplatform")
|
||||||
kotlin = project.extensions.getByName("kotlin") as KotlinMultiplatformExtension
|
kotlin = project.extensions.getByName("kotlin") as KotlinMultiplatformExtension
|
||||||
}
|
}
|
||||||
|
|||||||
-4
@@ -33,10 +33,6 @@ abstract class MultiplatformExtensionTest {
|
|||||||
kotlin = project.applyMultiplatformPlugin()
|
kotlin = project.applyMultiplatformPlugin()
|
||||||
}
|
}
|
||||||
|
|
||||||
protected fun enableGranularSourceSetsMetadata() {
|
|
||||||
project.enableGranularSourceSetsMetadata()
|
|
||||||
}
|
|
||||||
|
|
||||||
protected fun enableCInteropCommonization() {
|
protected fun enableCInteropCommonization() {
|
||||||
project.enableCInteropCommonization()
|
project.enableCInteropCommonization()
|
||||||
}
|
}
|
||||||
|
|||||||
-8
@@ -112,18 +112,10 @@ fun Project.applyCocoapodsPlugin(): CocoapodsExtension {
|
|||||||
val Project.propertiesExtension: ExtraPropertiesExtension
|
val Project.propertiesExtension: ExtraPropertiesExtension
|
||||||
get() = extensions.getByType(ExtraPropertiesExtension::class.java)
|
get() = extensions.getByType(ExtraPropertiesExtension::class.java)
|
||||||
|
|
||||||
fun Project.enableGranularSourceSetsMetadata() {
|
|
||||||
propertiesExtension.set("kotlin.mpp.enableGranularSourceSetsMetadata", "true")
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Project.enableCInteropCommonization(enabled: Boolean = true) {
|
fun Project.enableCInteropCommonization(enabled: Boolean = true) {
|
||||||
propertiesExtension.set(PropertiesProvider.PropertyNames.KOTLIN_MPP_ENABLE_CINTEROP_COMMONIZATION, enabled.toString())
|
propertiesExtension.set(PropertiesProvider.PropertyNames.KOTLIN_MPP_ENABLE_CINTEROP_COMMONIZATION, enabled.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Project.enableHierarchicalStructureByDefault(enabled: Boolean = true) {
|
|
||||||
propertiesExtension.set(PropertiesProvider.PropertyNames.KOTLIN_MPP_HIERARCHICAL_STRUCTURE_BY_DEFAULT, enabled.toString())
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Project.enableIntransitiveMetadataConfiguration(enabled: Boolean = true) {
|
fun Project.enableIntransitiveMetadataConfiguration(enabled: Boolean = true) {
|
||||||
propertiesExtension.set(KOTLIN_MPP_ENABLE_INTRANSITIVE_METADATA_CONFIGURATION, enabled.toString())
|
propertiesExtension.set(KOTLIN_MPP_ENABLE_INTRANSITIVE_METADATA_CONFIGURATION, enabled.toString())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user