Misc: Reverted 1fb90ac0fd 'Copy compiler arguments from iml even if "Use project settings" checkbox is checked' as it's rendered obsolete due to "Use project settings" being turned off by default in Gradle/Maven projects
This commit is contained in:
@@ -65,22 +65,16 @@ class JpsKotlinCompilerSettings : JpsElementBase<JpsKotlinCompilerSettings>() {
|
||||
fun getCommonCompilerArguments(module: JpsModule): CommonCompilerArguments {
|
||||
val defaultArguments = getSettings(module.project).commonCompilerArguments
|
||||
val facetSettings = module.kotlinFacetExtension?.settings ?: return defaultArguments
|
||||
if (facetSettings.useProjectSettings) return defaultArguments
|
||||
val (languageLevel, apiLevel) = facetSettings.versionInfo
|
||||
val facetArguments = facetSettings.compilerInfo.commonCompilerArguments ?: return defaultArguments
|
||||
return copyBean(facetArguments).apply {
|
||||
if (facetSettings.useProjectSettings) {
|
||||
languageVersion = defaultArguments.languageVersion
|
||||
apiVersion = defaultArguments.apiVersion
|
||||
multiPlatform = defaultArguments.multiPlatform
|
||||
}
|
||||
else {
|
||||
languageVersion = languageLevel?.description
|
||||
apiVersion = apiLevel?.description
|
||||
multiPlatform = module
|
||||
.dependenciesList
|
||||
.dependencies
|
||||
.any { (it as? JpsModuleDependency)?.module?.targetPlatform == TargetPlatformKind.Common }
|
||||
}
|
||||
languageVersion = languageLevel?.description
|
||||
apiVersion = apiLevel?.description
|
||||
multiPlatform = module
|
||||
.dependenciesList
|
||||
.dependencies
|
||||
.any { (it as? JpsModuleDependency)?.module?.targetPlatform == TargetPlatformKind.Common }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user