Gradle Command Line: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 19: Line 19:
Run the builds with all task actions disabled.
Run the builds with all task actions disabled.
==-i,--info==
==-i,--info==
When executed with -i, Gradle displays the tasks that are executed, in the order in which they are executed. Additionally, -m|--dry-run can be used to simulate the execution without actually performing the task actions.
When executed with -i, Gradle displays the tasks that are executed, in the order in which they are executed. Additionally, [[#-m.2C--dry-run|-m|--dry-run]] can be used to simulate the execution without actually performing the task actions.
Also see: {{Internal|Gradle Logging#Output_Configuration|Gradle Logging}}
Also see: {{Internal|Gradle Logging#Output_Configuration|Gradle Logging}}



Revision as of 22:38, 8 November 2020

Internal

Overview

In case of a multi-project, Gradle command can be executed from the root of the project or from any sub-projects.

Command Line Flags

--help

In-line help.

--q,--quiet

Only warning and error category output is displayed. The logger "quiet" category can be accessed with:

logger.quiet "will be displayed even in quiet mode"

Also see:

Gradle Logging

-m,--dry-run

Run the builds with all task actions disabled.

-i,--info

When executed with -i, Gradle displays the tasks that are executed, in the order in which they are executed. Additionally, -m|--dry-run can be used to simulate the execution without actually performing the task actions.

Also see:

Gradle Logging

-d,--debug

Also see:

Gradle Logging

-P<property-name>=<property-value> Project Properties

See:

Gradle Project Coordinates, State and Configured Properties

-D<property-name>=<property-value> System Properties

See:

Gradle System Properties

-x,--exclude-task

https://docs.gradle.org/current/userguide/command_line_interface.html#sec:excluding_tasks_from_the_command_line

Execute without the task following -x. For example, if I want to execute a build without tests:

gradle build -x test

or if I want to publish without running the javadoc task:

gradle build publish -x javadoc

--build-cache

Built-in Tasks