api / org.gradle.kotlin.dsl

Package org.gradle.kotlin.dsl

The Gradle Kotlin DSL.

Types

ClientModuleScope

class ClientModuleScope : ClientModule

Receiver for ClientModule configuration blocks.

DependencyHandlerScope

class DependencyHandlerScope : DependencyHandler

Receiver for dependencies block providing convenient utilities for configuring dependencies.

GroovyBuilderScope

interface GroovyBuilderScope : GroovyObject

Provides a dynamic dispatching DSL with Groovy semantics for better integration with plugins that rely on Groovy builders such as the core maven plugin.

InitScriptApi

abstract class InitScriptApi : Gradle

Standard implementation of the API exposed to all types of Gradle scripts, precompiled and otherwise.

InitialValueExtraPropertyDelegate

class InitialValueExtraPropertyDelegate<T>

Enables typed access to extra properties with initial value.

InitialValueExtraPropertyDelegateProvider

class InitialValueExtraPropertyDelegateProvider<T>

KotlinBuildScript

abstract class KotlinBuildScript : Project

Base class for Kotlin build scripts.

KotlinClosure0

open class KotlinClosure0<V : Any> : Closure<V?>

Adapts a parameterless Kotlin function to a parameterless Groovy Closure.

KotlinClosure1

class KotlinClosure1<in T, V : Any> : Closure<V?>

Adapts an unary Kotlin function to an unary Groovy Closure.

KotlinClosure2

class KotlinClosure2<in T, in U, V : Any> : Closure<V?>

Adapts a binary Kotlin function to a binary Groovy Closure.

KotlinInitScript

abstract class KotlinInitScript : InitScriptApi

Base class for Kotlin init scripts.

KotlinSettingsScript

abstract class KotlinSettingsScript : SettingsScriptApi

Base class for Kotlin settings scripts.

MutablePropertyDelegate

interface MutablePropertyDelegate : PropertyDelegate

Provides efficient access to a mutable dynamic property.

NamedDomainObjectCollectionDelegateProvider

class NamedDomainObjectCollectionDelegateProvider<T>

NamedDomainObjectContainerDelegateProvider

class NamedDomainObjectContainerDelegateProvider<T : Any>

A property delegate that creates elements in the given NamedDomainObjectContainer.

NamedDomainObjectContainerScope

class NamedDomainObjectContainerScope<T : Any> : NamedDomainObjectContainer<T>, PolymorphicDomainObjectContainer<T>

Receiver for NamedDomainObjectContainer configuration blocks.

PluginDependenciesSpecScope

class PluginDependenciesSpecScope : PluginDependenciesSpec

Receiver for the plugins block.

PolymorphicDomainObjectContainerDelegateProvider

class PolymorphicDomainObjectContainerDelegateProvider<T : Any, U : T>

A property delegate that creates elements of the given type with the given configuration in the given container.

PolymorphicDomainObjectContainerGettingDelegate

class PolymorphicDomainObjectContainerGettingDelegate<T : Any, U : T>

A property delegate that gets elements of the given type in the given container.

PolymorphicDomainObjectContainerGettingDelegateProvider

class PolymorphicDomainObjectContainerGettingDelegateProvider<T : Any, U : T>

A property delegate that gets elements of the given type from the given container and applies the given configuration.

PropertyDelegate

interface PropertyDelegate

Provides efficient access to a property.

ScriptHandlerScope

class ScriptHandlerScope : ScriptHandler

Receiver for the buildscript block.

SettingsScriptApi

abstract class SettingsScriptApi : Settings

Standard implementation of the API exposed to all types of Settings scripts, precompiled and otherwise.

Annotations

GradleDsl

annotation class GradleDsl

Delimits a Gradle DSL.

KotlinScriptTemplate

annotation class KotlinScriptTemplate

Temporary workaround for Kotlin 1.2.50.

Extensions for External Classes

groovy.lang.Closure

kotlin.Any

org.gradle.api.Action

org.gradle.api.DomainObjectCollection

org.gradle.api.NamedDomainObjectCollection

org.gradle.api.NamedDomainObjectContainer

org.gradle.api.PolymorphicDomainObjectContainer

org.gradle.api.Project

org.gradle.api.artifacts.Configuration

org.gradle.api.artifacts.ConfigurationContainer

org.gradle.api.artifacts.dsl.DependencyHandler

org.gradle.api.artifacts.dsl.RepositoryHandler

org.gradle.api.distribution.DistributionContainer

org.gradle.api.file.ConfigurableFileCollection

org.gradle.api.file.ContentFilterable

org.gradle.api.file.CopySpec

org.gradle.api.initialization.Settings

org.gradle.api.initialization.dsl.ScriptHandler

org.gradle.api.invocation.Gradle

org.gradle.api.model.ObjectFactory

org.gradle.api.plugins.Convention

org.gradle.api.plugins.ExtensionAware

org.gradle.api.plugins.ExtensionContainer

org.gradle.api.plugins.ExtraPropertiesExtension

org.gradle.api.plugins.ObjectConfigurationAction

org.gradle.api.plugins.PluginAware

org.gradle.api.plugins.announce.AnnouncePluginExtension

org.gradle.api.plugins.quality.CheckstyleExtension

org.gradle.api.plugins.quality.CodeNarcExtension

org.gradle.api.plugins.quality.FindBugsExtension

org.gradle.api.plugins.quality.JDependExtension

org.gradle.api.plugins.quality.PmdExtension

org.gradle.api.provider.Property

org.gradle.api.provider.PropertyState

org.gradle.api.reporting.ReportingExtension

org.gradle.api.specs.Spec

org.gradle.api.tasks.GroovyRuntime

org.gradle.api.tasks.ScalaRuntime

org.gradle.api.tasks.SourceSet

org.gradle.api.tasks.TaskContainer

org.gradle.ide.visualstudio.VisualStudioRootExtension

org.gradle.ide.xcode.XcodeRootExtension

org.gradle.nativeplatform.BuildTypeContainer

org.gradle.nativeplatform.FlavorContainer

org.gradle.nativeplatform.toolchain.NativeToolChainRegistry

org.gradle.platform.base.PlatformContainer

org.gradle.play.plugins.PlayPluginConfigurations

org.gradle.plugin.devel.GradlePluginDevelopmentExtension

org.gradle.plugin.use.PluginDependenciesSpec

org.gradle.plugin.use.PluginDependencySpec

org.gradle.plugins.ear.EarPluginConvention

org.gradle.plugins.ide.eclipse.model.EclipseModel

org.gradle.plugins.ide.idea.model.IdeaModel

org.gradle.plugins.javascript.base.JavaScriptExtension

org.gradle.plugins.javascript.coffeescript.CoffeeScriptExtension

org.gradle.plugins.javascript.envjs.EnvJsExtension

org.gradle.plugins.javascript.jshint.JsHintExtension

org.gradle.plugins.javascript.rhino.RhinoExtension

org.gradle.plugins.signing.SigningExtension

org.gradle.testing.jacoco.plugins.JacocoPluginExtension

Properties

embeddedKotlinVersion

val embeddedKotlinVersion: String

The version of the Kotlin compiler embedded in gradle-kotlin-dsl (currently 1.2.41).

ext

val <ERROR CLASS>.ext: ExtraPropertiesExtension

Retrieves the ext extension.

getting

val <T : Any, U : NamedDomainObjectCollection<in T>> U.getting: U

Idiomatic way of referring to an existing element in a collection via a delegate property.

Functions

exclude

fun <T : ModuleDependency> T.exclude(group: String? = null, module: String? = null): T

Adds an exclude rule to exclude transitive dependencies of this dependency.

ext

fun <ERROR CLASS>.ext(configure: ExtraPropertiesExtension.() -> Unit): Unit

Configures the ext extension.

getting

fun <T : Any, U : NamedDomainObjectCollection<T>> U.getting(configuration: T.() -> Unit): NamedDomainObjectCollectionDelegateProvider<T>

Idiomatic way of referring and configuring an existing element in a collection via a delegate property.

invoke

operator fun <T : Any, C : NamedDomainObjectContainer<T>> C.invoke(configuration: NamedDomainObjectContainerScope<T>.() -> Unit): C

Allows the container to be configured, creating missing objects as they are referenced.

typeOf

fun <T> typeOf(): TypeOf<T>

Creates an instance of TypeOf for the given parameterized type.