Kotlin Facet: Do not auto-advance version in imported projects
#KT-21879 Fixed
This commit is contained in:
@@ -207,6 +207,7 @@ class KotlinMavenImporter : MavenImporter(KOTLIN_PLUGIN_GROUP_ID, KOTLIN_PLUGIN_
|
||||
}
|
||||
MavenProjectImportHandler.getInstances(module.project).forEach { it(kotlinFacet, mavenProject) }
|
||||
setImplementedModuleName(kotlinFacet, mavenProject, module)
|
||||
kotlinFacet.noVersionAutoAdvance()
|
||||
}
|
||||
|
||||
private fun detectPlatform(mavenProject: MavenProject) = detectPlatformByExecutions(mavenProject) ?:
|
||||
|
||||
@@ -460,6 +460,8 @@ class KotlinMavenImporterTest : MavenImportingTestCase() {
|
||||
Assert.assertEquals("1.1", compilerArguments!!.languageVersion)
|
||||
Assert.assertEquals("1.0", apiLevel!!.versionString)
|
||||
Assert.assertEquals("1.0", compilerArguments!!.apiVersion)
|
||||
Assert.assertFalse(compilerArguments!!.autoAdvanceLanguageVersion)
|
||||
Assert.assertFalse(compilerArguments!!.autoAdvanceApiVersion)
|
||||
Assert.assertEquals(true, compilerArguments!!.suppressWarnings)
|
||||
Assert.assertEquals(LanguageFeature.State.ENABLED, coroutineSupport)
|
||||
Assert.assertEquals("JVM 1.8", targetPlatformKind!!.description)
|
||||
@@ -586,6 +588,8 @@ class KotlinMavenImporterTest : MavenImportingTestCase() {
|
||||
Assert.assertEquals("1.1", compilerArguments!!.languageVersion)
|
||||
Assert.assertEquals("1.0", apiLevel!!.versionString)
|
||||
Assert.assertEquals("1.0", compilerArguments!!.apiVersion)
|
||||
Assert.assertFalse(compilerArguments!!.autoAdvanceLanguageVersion)
|
||||
Assert.assertFalse(compilerArguments!!.autoAdvanceApiVersion)
|
||||
Assert.assertEquals(true, compilerArguments!!.suppressWarnings)
|
||||
Assert.assertEquals(LanguageFeature.State.ENABLED, coroutineSupport)
|
||||
Assert.assertTrue(targetPlatformKind is TargetPlatformKind.JavaScript)
|
||||
|
||||
Reference in New Issue
Block a user