# PrecompiledSettingsScript

open class PrecompiledSettingsScript(target: Settings) : SettingsScriptApi(source)

### Deprecated

Kept for compatibility with precompiled script plugins published with Gradle versions prior to 6.0

Legacy script template definition for precompiled Kotlin script targeting Settings instances.

#### See also

PrecompiledProjectScript

## Constructors

PrecompiledSettingsScript
Link copied to clipboard
constructor(target: Settings)

## Properties

delegate
Link copied to clipboard
open val delegate: Settings
extra
Link copied to clipboard
val ExtensionAware.extra: ExtraPropertiesExtension

The extra properties extension in this object's extension container.

logger
Link copied to clipboard
val logger: Logger

Logger for settings. You can use this in your settings file to write log messages.

logging
Link copied to clipboard
val logging: LoggingManager

The LoggingManager which can be used to receive logging and to control the standard output/error capture for this script. By default, `System.out` is redirected to the Gradle logging system at the `QUIET` log level, and `System.err` is redirected at the `ERROR` log level.

resources
Link copied to clipboard
val resources: ResourceHandler

Provides access to resource-specific utility methods, for example factory methods that create various resources.

## Functions

apply
Link copied to clipboard
open override fun apply(closure: Closure<Any>)
open override fun apply(options: Map<String, *>)
open override fun apply(action: Action<in ObjectConfigurationAction>)
apply
Link copied to clipboard
inline fun <T : Plugin<Settings>> Settings.apply()
inline fun <T : Plugin<*>> PluginAware.apply()

Applies the plugin of the given type T. Does nothing if the plugin has already been applied.

inline fun PluginAware.apply(vararg options: Pair<String, Any?>)

Kotlin extension function for org.gradle.api.plugins.PluginAware.apply.

fun PluginAware.apply(from: Any? = null, plugin: String? = null, to: Any? = null)

Applies the given plugin or script.

applyTo
Link copied to clipboard
inline fun <T : Plugin<*>> PluginAware.applyTo(vararg targets: Any)

Applies the plugin of the given type T to the specified object. Does nothing if the plugin has already been applied.

buildCache
Link copied to clipboard
open override fun buildCache(action: Action<in BuildCacheConfiguration>)
buildscript
Link copied to clipboard
open fun buildscript(block: ScriptHandlerScope.() -> Unit)

Configures the build script classpath for settings.

caches
Link copied to clipboard
open override fun caches(cacheConfigurations: Action<in CacheConfigurations>)
configure
Link copied to clipboard
inline fun <T : Any> ExtensionAware.configure(noinline configuration: T.() -> Unit)

Executes the given configuration block against the extension of the specified type.

copy
Link copied to clipboard
fun copy(configuration: CopySpec.() -> Unit): WorkResult

Copies the specified files.

copySpec
Link copied to clipboard
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.

defaults
Link copied to clipboard
open override fun defaults(action: Action<in SharedModelDefaults>)
delete
Link copied to clipboard
fun delete(vararg paths: Any): Boolean

Deletes files and directories.

fun delete(configuration: DeleteSpec.() -> Unit): WorkResult

Deletes the specified files.

dependencyResolutionManagement
Link copied to clipboard
open override fun dependencyResolutionManagement(dependencyResolutionConfiguration: Action<in DependencyResolutionManagement>)
enableFeaturePreview
Link copied to clipboard
open override fun enableFeaturePreview(name: String)
exec
Link copied to clipboard
fun exec(configuration: ExecSpec.() -> Unit): ExecResult

Executes an external command.

file
Link copied to clipboard
fun file(path: Any): File
fun file(path: Any, validation: PathValidation): File

Resolves a file path relative to this script's target base directory.

files
Link copied to clipboard
fun files(vararg paths: Any): ConfigurableFileCollection
fun files(paths: Any, configuration: ConfigurableFileCollection.() -> Unit): ConfigurableFileCollection

Creates a ConfigurableFileCollection containing the given files.

fileTree
Link copied to clipboard
fun fileTree(baseDir: Any): ConfigurableFileTree
fun fileTree(baseDir: Any, configuration: ConfigurableFileTree.() -> Unit): ConfigurableFileTree

Creates a new ConfigurableFileTree using the given base directory.

findProject
Link copied to clipboard
open override fun findProject(projectDir: File): ProjectDescriptor?
open override fun findProject(path: String): ProjectDescriptor?
getBuildCache
Link copied to clipboard
open override fun getBuildCache(): BuildCacheConfiguration
getBuildscript
Link copied to clipboard
open override fun getBuildscript(): ScriptHandler
getCaches
Link copied to clipboard
open override fun getCaches(): CacheConfigurations
getDefaults
Link copied to clipboard
open override fun getDefaults(): SharedModelDefaults
getDependencyResolutionManagement
Link copied to clipboard
open override fun getDependencyResolutionManagement(): DependencyResolutionManagement
getExtensions
Link copied to clipboard
open override fun getExtensions(): ExtensionContainer
getGradle
Link copied to clipboard
open override fun getGradle(): Gradle
getLayout
Link copied to clipboard
open override fun getLayout(): BuildLayout
getPluginManagement
Link copied to clipboard
open override fun getPluginManagement(): PluginManagementSpec
getPluginManager
Link copied to clipboard
open override fun getPluginManager(): PluginManager
getPlugins
Link copied to clipboard
open override fun getPlugins(): PluginContainer
getProviders
Link copied to clipboard
open override fun getProviders(): ProviderFactory
getRootDir
Link copied to clipboard
open override fun getRootDir(): File
getRootProject
Link copied to clipboard
open override fun getRootProject(): ProjectDescriptor
getSettings
Link copied to clipboard
open override fun getSettings(): Settings
getSettingsDir
Link copied to clipboard
open override fun getSettingsDir(): File
getSourceControl
Link copied to clipboard
open override fun getSourceControl(): SourceControl
getStartParameter
Link copied to clipboard
open override fun getStartParameter(): StartParameter
getToolchainManagement
Link copied to clipboard
open override fun getToolchainManagement(): ToolchainManagement
include
Link copied to clipboard
open fun include(vararg projectPaths: String)
open override fun include(projectPaths: Iterable<String>)
includeBuild
Link copied to clipboard
open override fun includeBuild(rootProject: Any)
open override fun includeBuild(rootProject: Any, configuration: Action<ConfigurableIncludedBuild>)
includeFlat
Link copied to clipboard
open override fun includeFlat(vararg projectNames: String?)
open override fun includeFlat(projectNames: Iterable<String>)
javaexec
Link copied to clipboard
fun javaexec(configuration: JavaExecSpec.() -> Unit): ExecResult

Executes an external Java process.

mkdir
Link copied to clipboard
fun mkdir(path: Any): File

Creates a directory and returns a file pointing to it.

pluginManagement
Link copied to clipboard
open fun pluginManagement(block: PluginManagementSpec.() -> Unit)

Configures the plugin management for the entire build.

open override fun pluginManagement(pluginManagementSpec: Action<in PluginManagementSpec>)
project
Link copied to clipboard
open override fun project(projectDir: File): ProjectDescriptor
open override fun project(path: String): ProjectDescriptor
provideDelegate
Link copied to clipboard
operator fun Settings.provideDelegate(any: Any?, property: KProperty<*>): PropertyDelegate

Locates a property on Settings.

relativePath
Link copied to clipboard
fun relativePath(path: Any): String

Returns the relative path from this script's target base directory to the given path.

sourceControl
Link copied to clipboard
open override fun sourceControl(configuration: Action<in SourceControl>)
tarTree
Link copied to clipboard
fun tarTree(tarPath: Any): FileTree

Creates a new FileTree which contains the contents of the given TAR file.

the
Link copied to clipboard
inline fun <T : Any> ExtensionAware.the(): T

Returns the extension of the specified type.

fun <T : Any> ExtensionAware.the(extensionType: KClass<T>): T

Returns the extension of the specified extensionType.

toolchainManagement
Link copied to clipboard
open override fun toolchainManagement(toolchainManagementConfiguration: Action<in ToolchainManagement>)
uri
Link copied to clipboard
fun uri(path: Any): URI

Resolves a file path to a URI, relative to this script's target base directory.

zipTree
Link copied to clipboard
fun zipTree(zipPath: Any): FileTree

Creates a new FileTree which contains the contents of the given ZIP file.