Gradle - Block

1 - About

block in Gradle.

A block is found in a script and is a method call which takes a closure as a parameter. The closure is treated as a configuration closure which configures some delegate object as it executes.

3 - Example

The code is code sensitive. The type should be set with the value Copy with an uppercase C.

Example with the Copy block that shows two statements

task copy(type: Copy, group: "Custom", description: "Copies sources to the dest directory") { // Begin Block
    from "src" // statement 1
    into "dest" // statement 2
} // End block

Data Science
Data Analysis
Data Science
Linear Algebra Mathematics

Powered by ComboStrap