Gradle - Property plugin

About

plugin properties are property of a plugin

Plugin

In a task

tasks.named<ShadowJar>("shadowJar") {
  // with the set
  archiveBaseName.set("test")
}

or DSL style

tasks.test {
    failFast = true;
}

or

val testTask = tasks.getByName<Test>("test")
testTask.failFast = true;

In a configure block

configure<MyExtension> {
 message = "Hi"
}

In a the

the<GreetingPluginExtension>().message = "Hi from Gradle"

Documentation / Reference





Discover More
Gradle - Property

Properties are a way to define the environment of a build. Gradle has three different property scope: - java system property - project property - plugin property extra properties ...



Share this page:
Follow us:
Task Runner