Refactor compiler arguments to configuration conversion:
extract into independent functions, rearrange logic
This commit is contained in:
+1
-1
@@ -97,7 +97,7 @@ private fun getLanguageSettingsForScripts(project: Project, scriptDefinition: Ko
|
||||
val compilerArguments = K2JVMCompilerArguments()
|
||||
parseCommandLineArguments(args.toList(), compilerArguments)
|
||||
// TODO: reporting
|
||||
val verSettings = compilerArguments.configureLanguageVersionSettings(MessageCollector.NONE)
|
||||
val verSettings = compilerArguments.toLanguageVersionSettings(MessageCollector.NONE)
|
||||
val jvmTarget = compilerArguments.jvmTarget?.let { JvmTarget.fromString(it) } ?: TargetPlatformVersion.NoVersion
|
||||
ScriptLanguageSettings(verSettings, jvmTarget)
|
||||
}.also { scriptDefinition.putUserData(SCRIPT_LANGUAGE_SETTINGS, it) }
|
||||
|
||||
Reference in New Issue
Block a user