KotlinProjectScriptTemplate

abstract class KotlinProjectScriptTemplate(host: KotlinScriptHost<ERROR CLASS: Symbol not found for Project>) : DefaultKotlinScript(source)

Base class for Gradle Kotlin DSL standalone Project scripts IDE support, aka. build scripts.

This class has the Incubating-level compatibility guarantees but is not annotated as such to avoid Unstable API warnings caused by the IDE using this class as the Kotlin DSL script template. When the IDE chooses to use this script template, there is no direct usage of an incubating API by the build author, but usages of the members, such as plugins, are still reported as unstable API usages. See: issue 34820.

Since

8.1

Constructors

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

Properties

Link copied to clipboard
open override val logger: org/gradle/api/logging/Logger

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

Link copied to clipboard
open override val logging: org/gradle/api/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
open override val resources: org/gradle/api/resources/ResourceHandler

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

Functions

Link copied to clipboard
open fun buildscript(block: ScriptHandlerScope.() -> Unit)

Configures the build script classpath for this project.

Link copied to clipboard
abstract fun copy(configuration: ERROR CLASS: Symbol not found for Action<ERROR CLASS: Symbol not found for CopySpec>): ERROR CLASS: Symbol not found for WorkResult

Copies the specified files.

open fun copy(configuration: org/gradle/api/Action<org/gradle/api/file/CopySpec>): org/gradle/api/tasks/WorkResult
Link copied to clipboard
abstract fun copySpec(configuration: ERROR CLASS: Symbol not found for Action<ERROR CLASS: Symbol not found for CopySpec>): ERROR CLASS: Symbol not found for CopySpec
open override fun copySpec(): org/gradle/api/file/CopySpec

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

open fun copySpec(configuration: org/gradle/api/Action<org/gradle/api/file/CopySpec>): org/gradle/api/file/CopySpec
Link copied to clipboard
abstract fun delete(configuration: ERROR CLASS: Symbol not found for Action<ERROR CLASS: Symbol not found for DeleteSpec>): ERROR CLASS: Symbol not found for WorkResult

Deletes the specified files.

open fun delete(configuration: org/gradle/api/Action<org/gradle/api/file/DeleteSpec>): org/gradle/api/tasks/WorkResult

open override fun delete(vararg paths: Any): Boolean

Deletes files and directories.

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

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

open fun file(path: Any, validation: org/gradle/api/PathValidation): File
Link copied to clipboard
abstract fun files(paths: Any, configuration: ERROR CLASS: Symbol not found for Action<ERROR CLASS: Symbol not found for ConfigurableFileCollection>): ERROR CLASS: Symbol not found for ConfigurableFileCollection
open override fun files(vararg paths: Any): org/gradle/api/file/ConfigurableFileCollection

Creates a ConfigurableFileCollection containing the given files.

open fun files(paths: Any, configuration: org/gradle/api/Action<org/gradle/api/file/ConfigurableFileCollection>): org/gradle/api/file/ConfigurableFileCollection
Link copied to clipboard
abstract fun fileTree(baseDir: Any, configuration: ERROR CLASS: Symbol not found for Action<ERROR CLASS: Symbol not found for ConfigurableFileTree>): ERROR CLASS: Symbol not found for ConfigurableFileTree
open override fun fileTree(baseDir: Any): org/gradle/api/file/ConfigurableFileTree

Creates a new ConfigurableFileTree using the given base directory.

open fun fileTree(baseDir: Any, configuration: org/gradle/api/Action<org/gradle/api/file/ConfigurableFileTree>): org/gradle/api/file/ConfigurableFileTree
Link copied to clipboard
fun getBuildscript(): ERROR CLASS: Symbol not found for ScriptHandler

The ScriptHandler for this script.

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

Creates a directory and returns a file pointing to it.

Link copied to clipboard

Configures the plugin dependencies for this project.

Link copied to clipboard
open override 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 tarTree(tarPath: Any): org/gradle/api/file/FileTree

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

Link copied to clipboard
open override 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 override fun zipTree(zipPath: Any): org/gradle/api/file/FileTree

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