Gradle Concepts

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

External

Internal

Overview

Gradle is a general-purpose build tool, which can build pretty much anything its configuration scripts declare. It is primarily used to build Java and Groovy, but it can build other languages as well.

Configuration Scripts

  • Build script structure: statements, blocks. A statement is .... A block is a method which takes a closure as an argument. Configuration closure. It configures the associated delegate object as it executes. There is a relatively low number of top-level blocks:
    • allprojects{}
    • artifacts{}
  • Gradle Concepts Build Lifecycle. Configuration scripts and their delegate object.
  • A build consists of executing a series of tasks in succession.
  • Extensions, as in publishing extension.
  • Go through the lifecycle without plugins. Understand. Then introduce essential plugins.
  • Most of Gradle's power comes from external plugins
  • Java plugin.
  • Maven publishing plugin.