Fix gradle scripts detection in the sources
#KT-54325 fixed
This commit is contained in:
committed by
Space Team
parent
2036b65b78
commit
5d968bc2f4
+2
-1
@@ -157,7 +157,8 @@ private fun ScriptCompilationConfiguration.Builder.propertiesFromTemplate(
|
||||
baseClass.replaceOnlyDefault(if (templateClass == baseClassType.fromClass) baseClassType else KotlinType(templateClass))
|
||||
fileExtension.replaceOnlyDefault(mainAnnotation.fileExtension)
|
||||
// TODO: remove this exception when gradle switches to the new definitions and sets the property accordingly
|
||||
if (get(fileExtension) == "gradle.kts") {
|
||||
// possible gradle script extensions - see PrecompiledScriptTemplates.kt in the gradle repository
|
||||
if (get(fileExtension) in arrayOf("gradle.kts", "init.gradle.kts", "settings.gradle.kts")) {
|
||||
isStandalone(false)
|
||||
}
|
||||
filePathPattern.replaceOnlyDefault(mainAnnotation.filePathPattern)
|
||||
|
||||
+2
-1
@@ -37,7 +37,8 @@ class ScriptCompilationConfigurationFromDefinition(
|
||||
@Suppress("DEPRECATION")
|
||||
compilerOptions.putIfAny(scriptDefinition.additionalCompilerArguments)
|
||||
// TODO: remove this exception when gradle switches to the new definitions and sets the property accordingly
|
||||
if (scriptDefinition.fileExtension == "gradle.kts") {
|
||||
// possible gradle script extensions - see PrecompiledScriptTemplates.kt in the gradle repository
|
||||
if (get(fileExtension) in arrayOf("gradle.kts", "init.gradle.kts", "settings.gradle.kts")) {
|
||||
isStandalone(false)
|
||||
}
|
||||
ide {
|
||||
|
||||
Reference in New Issue
Block a user