Scripting: update scripts in source roots handling
#KT-52525 fixed related to #KT-52735
This commit is contained in:
+7
@@ -415,6 +415,9 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
@Argument(value = "-Xrender-internal-diagnostic-names", description = "Render internal names of warnings and errors")
|
||||
var renderInternalDiagnosticNames: Boolean by FreezableVar(false)
|
||||
|
||||
@Argument(value = "-Xallow-any-scripts-in-source-roots", description = "Allow to compile any scripts along with regular Kotlin sources")
|
||||
var allowAnyScriptsInSourceRoots: Boolean by FreezableVar(false)
|
||||
|
||||
@OptIn(IDEAPluginsCompatibilityAPI::class)
|
||||
open fun configureAnalysisFlags(collector: MessageCollector, languageVersion: LanguageVersion): MutableMap<AnalysisFlag<*>, Any> {
|
||||
return HashMap<AnalysisFlag<*>, Any>().apply {
|
||||
@@ -508,6 +511,10 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
}
|
||||
}
|
||||
|
||||
if (allowAnyScriptsInSourceRoots) {
|
||||
put(LanguageFeature.SkipStandaloneScriptsInSourceRoots, LanguageFeature.State.DISABLED)
|
||||
}
|
||||
|
||||
// Internal arguments should go last, because it may be useful to override
|
||||
// some feature state via -XX (even if some -X flags were passed)
|
||||
if (internalArguments.isNotEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user