Introduce unspecifiedJvmPlatform for clients without jvmTarget

Previously, a lot of clients used JvmPlatform as platform-marker,
without thinking about jvmTarget.

For the sake of migration, this commits introduced so-called
UnspecifiedJvmPlatform, which can be used for a time being, but
generally, all usages should be removed in  future.
This commit is contained in:
Dmitry Savvinov
2019-05-23 18:31:42 +03:00
parent ef39e2a68f
commit 8997fa52df
41 changed files with 57 additions and 57 deletions
@@ -68,7 +68,7 @@ class KotlinJavaMavenConfigurator : KotlinMavenConfigurator(
}
override val targetPlatform: TargetPlatform
get() = JvmPlatforms.defaultJvmPlatform
get() = JvmPlatforms.unspecifiedJvmPlatform
@Suppress("DEPRECATION_ERROR")
override fun getTargetPlatform() = JvmPlatforms.CompatJvmPlatform
@@ -2529,7 +2529,7 @@ class KotlinMavenImporterTest : MavenImportingTestCase() {
}
with(facetSettings("my-jvm-module")) {
Assert.assertEquals(JvmPlatforms.defaultJvmPlatform, platform)
Assert.assertEquals(JvmPlatforms.jvm16, platform)
Assert.assertEquals(listOf("my-common-module1", "my-common-module2"), implementedModuleNames)
}
@@ -2974,8 +2974,8 @@ class KotlinMavenImporterTest : MavenImportingTestCase() {
assertImporterStatePresent()
checkStableModuleName("project", "project", JvmPlatforms.defaultJvmPlatform, isProduction = true)
checkStableModuleName("project", "project", JvmPlatforms.defaultJvmPlatform, isProduction = false)
checkStableModuleName("project", "project", JvmPlatforms.unspecifiedJvmPlatform, isProduction = true)
checkStableModuleName("project", "project", JvmPlatforms.unspecifiedJvmPlatform, isProduction = false)
}
fun testStableModuleNameWhileUsngMaven_JS() {