Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
/**
* An example Gradle task.
*/
open class GreetingTask : DefaultTask() {
val message = project.objects.property<String>()
@TaskAction
fun greet() = println(message.get())
}
tasks {
// `hello` is a `TaskProvider<GreetingTask>`
val hello by registering(GreetingTask::class) {
message.set("Hello!")
}
// `goodbye` is a `TaskProvider<GreetingTask>`
val goodbye by registering(GreetingTask::class)
// Every `NamedDomainObjectProvider<T>` can be lazily configured as follows
goodbye {
dependsOn(hello)
}
// Existing container elements can be lazily configured via the `String` invoke DSL
"goodbye"(GreetingTask::class) {
message.set("Goodbye!")
}
// Regular API members are also available
register("chat")
}
// ...
tasks {
// Existing container elements can be lazily brought into scope
val goodbye by existing
"chat" {
dependsOn(goodbye)
}
}
defaultTasks("chat")