File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
jps-plugin/src/org/jetbrains/kotlin/jps/model Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 16
16
17
17
package org.jetbrains.kotlin.jps.model
18
18
19
+ import com.intellij.util.text.VersionComparatorUtil
19
20
import com.intellij.util.xmlb.XmlSerializer
20
21
import org.jdom.Element
21
- import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments
22
22
import org.jetbrains.jps.model.JpsProject
23
23
import org.jetbrains.jps.model.serialization.JpsProjectExtensionSerializer
24
- import org.jetbrains.kotlin.jps.JpsKotlinCompilerSettings
25
-
24
+ import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments
26
25
import org.jetbrains.kotlin.config.SettingConstants.KOTLIN_COMMON_COMPILER_ARGUMENTS_SECTION
27
26
import org.jetbrains.kotlin.config.SettingConstants.KOTLIN_COMPILER_SETTINGS_FILE
27
+ import org.jetbrains.kotlin.jps.JpsKotlinCompilerSettings
28
28
29
29
internal class KotlinCommonCompilerArgumentsSerializer : JpsProjectExtensionSerializer (KOTLIN_COMPILER_SETTINGS_FILE ,
30
30
KOTLIN_COMMON_COMPILER_ARGUMENTS_SECTION ) {
31
31
32
32
override fun loadExtension (project : JpsProject , componentTag : Element ) {
33
33
val settings = XmlSerializer .deserialize(componentTag, CommonCompilerArguments .DummyImpl ::class .java)
34
34
? : CommonCompilerArguments .DummyImpl ()
35
+ if (VersionComparatorUtil .compare(settings.languageVersion, settings.apiVersion) < 0 ) {
36
+ settings.apiVersion = settings.languageVersion
37
+ }
35
38
JpsKotlinCompilerSettings .setCommonCompilerArguments(project, settings)
36
39
}
37
40
You can’t perform that action at this time.
0 commit comments