Gradle - ext

Example

Kotlin

  • Set a value
ext {
  set("variable","value")
}
  • Set a function
val halloWorld= fun () {
   println("Hallo World");
}

project.ext.set("halloWorld",halloWorld)

Documentation / Reference





Discover More
Gradle - Project Property

Project property is a type property that has a project scope You can access a project property in your build script simply by using its name as you would use a variable. Example: project property...



Share this page:
Follow us:
Task Runner