api / org.gradle.api.initialization.dsl / ScriptHandler / getSourceFile

getSourceFile

abstract fun getSourceFile(): File

Returns the file containing the source for the script, if any.

Return
The source file. Returns null if the script source is not a file.