Add ScriptExpectedLocations annotation to script-runtime.
It describes where script file can be found.
This commit is contained in:
@@ -25,6 +25,7 @@ import org.jetbrains.kotlin.parsing.KotlinParserDefinition
|
||||
import org.jetbrains.kotlin.psi.KtScript
|
||||
import kotlin.reflect.KClass
|
||||
import kotlin.script.experimental.dependencies.DependenciesResolver
|
||||
import kotlin.script.experimental.location.ScriptExpectedLocation
|
||||
import kotlin.script.templates.standard.ScriptTemplateWithArgs
|
||||
|
||||
open class KotlinScriptDefinition(val template: KClass<out Any>) : UserDataHolderBase() {
|
||||
@@ -49,6 +50,9 @@ open class KotlinScriptDefinition(val template: KClass<out Any>) : UserDataHolde
|
||||
|
||||
@Deprecated("temporary workaround for missing functionality, will be replaced by the new API soon")
|
||||
open val additionalCompilerArguments: Iterable<String>? = null
|
||||
|
||||
open val scriptExpectedLocations: List<ScriptExpectedLocation> =
|
||||
listOf(ScriptExpectedLocation.SourcesOnly, ScriptExpectedLocation.TestsOnly)
|
||||
}
|
||||
|
||||
object StandardScriptDefinition : KotlinScriptDefinition(ScriptTemplateWithArgs::class)
|
||||
|
||||
Reference in New Issue
Block a user