abstract class SettingsScriptApi : Settings
Standard implementation of the API exposed to all types of Settings scripts, precompiled and otherwise.
SettingsScriptApi(settings: Settings)
Standard implementation of the API exposed to all types of Settings scripts, precompiled and otherwise. |
abstract val fileOperations: <ERROR CLASS> |
|
val logger: Logger
Logger for settings. You can use this in your settings file to write log messages. |
|
val logging: <ERROR CLASS>
The LoggingManager which can be used to receive logging and to control the standard output/error capture for
this script. By default, |
|
val resources: ResourceHandler
Provides access to resource-specific utility methods, for example factory methods that create various resources. |
open fun apply(configuration: ObjectConfigurationAction.() -> Unit): Unit
Applies zero or more plugins or scripts. |
|
open fun buildscript(block: ScriptHandlerScope.() -> Unit): Unit
Configures the build script classpath for settings. |
|
fun copy(configuration: CopySpec.() -> Unit): WorkResult
Copies the specified files. |
|
fun copySpec(): CopySpec fun copySpec(configuration: CopySpec.() -> Unit): CopySpec
Creates a {@link CopySpec} which can later be used to copy files or create an archive. |
|
fun delete(vararg paths: Any): Boolean
Deletes files and directories. fun delete(configuration: DeleteSpec.() -> Unit): WorkResult
Deletes the specified files. |
|
fun exec(configuration: ExecSpec.() -> Unit): ExecResult
Executes an external command. |
|
fun file(path: Any): File fun file(path: Any, validation: PathValidation): File
Resolves a file path relative to this script's target base directory. |
|
fun fileTree(baseDir: Any): ConfigurableFileTree fun fileTree(baseDir: Any, configuration: ConfigurableFileTree.() -> Unit): ConfigurableFileTree
Creates a new ConfigurableFileTree using the given base directory. |
|
fun files(vararg paths: Any): ConfigurableFileCollection fun files(paths: Any, configuration: ConfigurableFileCollection.() -> Unit): ConfigurableFileCollection
Creates a ConfigurableFileCollection containing the given files. |
|
fun javaexec(configuration: JavaExecSpec.() -> Unit): ExecResult
Executes an external Java process. |
|
fun mkdir(path: Any): File
Creates a directory and returns a file pointing to it. |
|
fun relativePath(path: Any): String
Returns the relative path from this script's target base directory to the given path. |
|
fun tarTree(tarPath: Any): FileTree
Creates a new FileTree which contains the contents of the given TAR file. |
|
fun uri(path: Any): URI
Resolves a file path to a URI, relative to this script's target base directory. |
|
fun zipTree(zipPath: Any): FileTree
Creates a new FileTree which contains the contents of the given ZIP file. |
fun PluginAware.apply(from: Any? = null, plugin: String? = null, to: Any? = null): Unit
Applies the given plugin or script. fun <T : Plugin<*>> PluginAware.apply(to: Any): Unit
Applies the plugin of the given type T to the specified object. Does nothing if the plugin has already been applied. |
|
fun <T> Any.closureOf(action: T.() -> Unit): Closure<Any?>
Adapts a Kotlin function to a single argument Groovy Closure. |
|
fun <T> Any.delegateClosureOf(action: T.() -> Unit): Closure<Unit>
Adapts a Kotlin function to a Groovy Closure that operates on the configured Closure delegate. |
|
operator fun Settings.provideDelegate(any: Any?, property: KProperty<*>): PropertyDelegate
Locates a property on Settings. |
|
fun <ConventionType : Any, ReturnType> Any.withConvention(conventionType: KClass<ConventionType>, function: ConventionType.() -> ReturnType): ReturnType
Evaluates the given function against the convention plugin of the given conventionType. |
|
fun <T> Any.withGroovyBuilder(builder: GroovyBuilderScope.() -> T): T
Executes the given builder against this object's GroovyBuilderScope. |
abstract class KotlinSettingsScript : SettingsScriptApi
Base class for Kotlin settings scripts. |