Copy language and API version from compiler options to version info

This commit is contained in:
Dmitry Jemerov
2017-01-27 18:16:07 +01:00
parent 6ef96017e8
commit c7115e7233
@@ -188,7 +188,11 @@ fun parseCompilerArgumentsToFacet(arguments: List<String>, kotlinFacet: KotlinFa
val argumentArray = arguments.toTypedArray()
with(kotlinFacet.configuration.settings) {
// todo: merge common arguments with platform-specific ones in facet settings
parseArguments(argumentArray, compilerInfo.commonCompilerArguments!!, ignoreInvalidArguments = true)
compilerInfo.commonCompilerArguments!!.let { commonCompilerArguments ->
parseArguments(argumentArray, commonCompilerArguments, ignoreInvalidArguments = true)
versionInfo.apiLevel = LanguageVersion.fromVersionString(commonCompilerArguments.apiVersion)
versionInfo.languageLevel = LanguageVersion.fromVersionString(commonCompilerArguments.languageVersion)
}
when (versionInfo.targetPlatformKind) {
is TargetPlatformKind.Jvm -> {