Build.gradle: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 23: Line 23:
Declared with the "def" keyword.
Declared with the "def" keyword.


def myVariable = "something"
<syntaxhighlight lang='groovy'>
...
def myVariable = "something"
println myVariable
...
println myVariable
</syntaxhighlight>


==Extra Properties==
==Extra Properties==

Revision as of 00:26, 1 May 2018

External

Internal

Overview

The project-level configuration script that contains task configuration for the current project, written in the Gradle's DSL. The build script can contain any Groovy language element. May contain the following:

Variables

There are two kinds of variables that can be declared in a build script: local variables and extra properties:

Local Variables

Declared with the "def" keyword.

def myVariable = "something"
...
println myVariable

Extra Properties