KotlinSettingsScript

abstract class KotlinSettingsScript(host: KotlinScriptHost<Settings>) : SettingsScriptApi(source)

Deprecated

Will be removed in Gradle 9.0

Legacy base class for Gradle Kotlin DSL standalone Settings scripts IDE support.

See also

Constructors

Link copied to clipboard
constructor(host: KotlinScriptHost<Settings>)

Properties

Link copied to clipboard
open val delegate: Settings
Link copied to clipboard

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

Link copied to clipboard
val logger: Logger

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

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.

Link copied to clipboard
val resources: ResourceHandler

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

Functions

Link copied to clipboard
open override fun apply(action: Action<in ObjectConfigurationAction>)
open override fun apply(closure: Closure<Any>)
open override fun apply(options: Map<String, *>)
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.

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.

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

Configures the build script classpath for settings.

Link copied to clipboard
open override fun caches(cacheConfigurations: Action<in CacheConfigurations>)
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.

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

Copies the specified files.

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

Creates a {@link CopySpec} which can later be used to copy files or create an archive.

Link copied to clipboard
fun delete(vararg paths: Any): Boolean

Deletes files and directories.

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

Deletes the specified files.

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

Executes an external command.

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.

Link copied to clipboard

Creates a ConfigurableFileCollection containing the given files.

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.

Link copied to clipboard
open override fun findProject(projectDir: File): ProjectDescriptor?
open override fun findProject(path: String): ProjectDescriptor?
Link copied to clipboard
Link copied to clipboard
open override fun getBuildscript(): ScriptHandler

The ScriptHandler for this script.

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

Executes an external Java process.

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

Creates a directory and returns a file pointing to it.

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

Configures the plugin dependencies for the project's settings.

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

Locates a property on Settings.

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

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

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

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

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.

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

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

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

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