KotlinInitScript

abstract class KotlinInitScript(host: KotlinScriptHost<ERROR CLASS: Symbol not found for Gradle>) : InitScriptApi(source)

Deprecated

Will be removed in Gradle 10

Legacy base class for Gradle Kotlin DSL standalone Gradle scripts IDE support, aka. init scripts.

See also

Constructors

Link copied to clipboard
constructor(host: KotlinScriptHost<ERROR CLASS: Symbol not found for Gradle>)

Properties

Link copied to clipboard
open override val delegate: ERROR CLASS: Symbol not found for Gradle
Link copied to clipboard
val initscript: ERROR CLASS: Symbol not found for ScriptHandler

The ScriptHandler for this script.

Link copied to clipboard
val logger: ERROR CLASS: Symbol not found for Logger

Logger for init scripts. You can use this in your init script to write log messages.

Link copied to clipboard
val logging: ERROR CLASS: Symbol not found for ConfigurableFileCollection

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: ERROR CLASS: Symbol not found for ResourceHandler

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

Functions

Link copied to clipboard
open fun addBuildListener(buildListener: org/gradle/BuildListener)
Link copied to clipboard
open fun addListener(listener: Any)
Link copied to clipboard
open fun addProjectEvaluationListener(listener: org/gradle/api/ProjectEvaluationListener): org/gradle/api/ProjectEvaluationListener
Link copied to clipboard
open fun afterProject(action: org/gradle/api/Action<in org/gradle/api/Project>)
open fun afterProject(closure: Closure<Any>)
Link copied to clipboard
open fun allprojects(action: org/gradle/api/Action<in org/gradle/api/Project>)
Link copied to clipboard
open override fun apply(action: ERROR CLASS: Symbol not found for Action<in ERROR CLASS: Symbol not found for ObjectConfigurationAction>): ERROR CLASS: Ambiguity: applyObjectConfigurationAction, [org/gradle/kotlin/dsl/support/KotlinScriptHost.applyObjectConfigurationAction, org/gradle/kotlin/dsl/support/KotlinScriptHost.applyObjectConfigurationAction]

Applies zero or more plugins or scripts.

open fun apply(action: org/gradle/api/Action<in org/gradle/api/plugins/ObjectConfigurationAction>)
open fun apply(closure: Closure<Any>)
open fun apply(options: Map<String, *>)
Link copied to clipboard
open fun beforeProject(action: org/gradle/api/Action<in org/gradle/api/Project>)
open fun beforeProject(closure: Closure<Any>)
Link copied to clipboard
open fun beforeSettings(action: org/gradle/api/Action<in org/gradle/api/initialization/Settings>)
open fun beforeSettings(closure: Closure<*>)
Link copied to clipboard
open fun buildFinished(action: org/gradle/api/Action<in org/gradle/BuildResult>)
open fun buildFinished(closure: Closure<Any>)
Link copied to clipboard
fun copy(configuration: ERROR CLASS: Symbol not found for CopySpec.() -> Unit): ERROR CLASS: Symbol not found for WorkResult

Copies the specified files.

Link copied to clipboard
fun copySpec(): ERROR CLASS: Symbol not found for CopySpec
fun copySpec(configuration: ERROR CLASS: Symbol not found for CopySpec.() -> Unit): ERROR CLASS: Symbol not found for CopySpec

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

Link copied to clipboard
fun delete(configuration: ERROR CLASS: Symbol not found for DeleteSpec.() -> Unit): ERROR CLASS: Symbol not found for WorkResult

Deletes the specified files.

fun delete(vararg paths: Any): Boolean

Deletes files and directories.

Link copied to clipboard
fun file(path: Any): File
fun file(path: Any, validation: ERROR CLASS: Symbol not found for PathValidation): File

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

Link copied to clipboard
fun files(vararg paths: Any): ERROR CLASS: Symbol not found for ConfigurableFileCollection
fun files(paths: Any, configuration: ERROR CLASS: Symbol not found for ConfigurableFileCollection.() -> Unit): ERROR CLASS: Symbol not found for ConfigurableFileCollection

Creates a ConfigurableFileCollection containing the given files.

Link copied to clipboard
fun fileTree(baseDir: Any): ERROR CLASS: Symbol not found for ConfigurableFileTree
fun fileTree(baseDir: Any, configuration: ERROR CLASS: Symbol not found for ConfigurableFileTree.() -> Unit): ERROR CLASS: Symbol not found for ConfigurableFileTree

Creates a new ConfigurableFileTree using the given base directory.

Link copied to clipboard
open fun getBuildPath(): String
Link copied to clipboard
open fun getExtensions(): org/gradle/api/plugins/ExtensionContainer
Link copied to clipboard
open fun getGradle(): org/gradle/api/invocation/Gradle
Link copied to clipboard
open fun getGradleHomeDir(): File?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getIncludedBuilds(): MutableCollection<org/gradle/api/initialization/IncludedBuild>
Link copied to clipboard
open fun getLifecycle(): org/gradle/api/invocation/GradleLifecycle
Link copied to clipboard
open fun getParent(): org/gradle/api/invocation/Gradle??
Link copied to clipboard
open fun getPluginManager(): org/gradle/api/plugins/PluginManager
Link copied to clipboard
open fun getPlugins(): org/gradle/api/plugins/PluginContainer
Link copied to clipboard
open fun getProviders(): org/gradle/api/provider/ProviderFactory
Link copied to clipboard
open fun getRootProject(): org/gradle/api/Project
Link copied to clipboard
open fun getSharedServices(): org/gradle/api/services/BuildServiceRegistry
Link copied to clipboard
open fun getStartParameter(): org/gradle/StartParameter
Link copied to clipboard
open fun getTaskGraph(): org/gradle/api/execution/TaskExecutionGraph
Link copied to clipboard
open fun includedBuild(name: String): org/gradle/api/initialization/IncludedBuild
Link copied to clipboard
open fun initscript(block: ScriptHandlerScope.() -> Unit)

Configures the classpath of the init script.

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 projectsEvaluated(action: org/gradle/api/Action<in org/gradle/api/invocation/Gradle>)
open fun projectsEvaluated(closure: Closure<Any>)
Link copied to clipboard
open fun projectsLoaded(action: org/gradle/api/Action<in org/gradle/api/invocation/Gradle>)
open fun projectsLoaded(closure: Closure<Any>)
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 fun removeListener(listener: Any)
Link copied to clipboard
open fun removeProjectEvaluationListener(listener: org/gradle/api/ProjectEvaluationListener)
Link copied to clipboard
open fun rootProject(action: org/gradle/api/Action<in org/gradle/api/Project>)
Link copied to clipboard
open fun settingsEvaluated(action: org/gradle/api/Action<in org/gradle/api/initialization/Settings>)
open fun settingsEvaluated(closure: Closure<Any>)
Link copied to clipboard
fun tarTree(tarPath: Any): ERROR CLASS: Symbol not found for FileTree

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

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
open fun useLogger(logger: Any)
Link copied to clipboard
fun zipTree(zipPath: Any): ERROR CLASS: Symbol not found for FileTree

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