Gradle Project Properties TODEPLETE: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 23: Line 23:
=Property List=
=Property List=


==properties==
====properties====


The property map.
The property map.
====name====
A String containing the name of the project directory. It automatically becomes the project's [[Gradle_Project_and_Build_Script#Project_Name.2C_artifactId|name]] coordinate. See [[Gradle_Project_and_Build_Script#Project_Coordinates|Gradle Project Coordinates]].
===group===
See [[Gradle_Project_and_Build_Script#Group.2C_groupId|Gradle Project Coordinates - Group]].
===version===
See [[Gradle_Project_and_Build_Script#Version|Gradle Project Coordinates - Version]].
===parent===
==Other Properties==
===project===
The Project instance.
===projectDir===
The File instance corresponding to the directory containing the build script.
===path===
A String containing the absolute path of the project. The path of the root project is ":"
===description===
A String containing the description for the project.
===displayName===
===buildDir===
A File representing <''projectDir''>/build.
===buildFile===
===rootDir===
===rootProject===
====rootProject.name====
===state===
===status===

Revision as of 18:47, 4 June 2018

Internal

Overview

The current project properties can be displayed with:

task displayProjectProperties {

    doLast() {

        for(Map.Entry p: project.getProperties()) {
            
            println p;
        }
    }
}

Property List

properties

The property map.


name

A String containing the name of the project directory. It automatically becomes the project's name coordinate. See Gradle Project Coordinates.

group

See Gradle Project Coordinates - Group.

version

See Gradle Project Coordinates - Version.

parent

Other Properties

project

The Project instance.

projectDir

The File instance corresponding to the directory containing the build script.

path

A String containing the absolute path of the project. The path of the root project is ":"

description

A String containing the description for the project.

displayName

buildDir

A File representing <projectDir>/build.

buildFile

rootDir

rootProject

rootProject.name

state

status