Engineering

Gradle Commands

Learning a build automation system or at least understanding the concept behind them is a mandatory skill set for any software engineering.

Similar to Apache Ant and Apache Maven, Gradle is an open source build automation system that comes as an improvement of established concepts.

It can handle large multi-project software systems, it is designed to be IDE agnostic and it can also be used by continues integration tools such as Jenkins.

Gradle Commands

Test the Gradle installation:

$ gradle

 

To see a list of available tasks:

$ gradle tasks

 

List of available tasks and their dependencies

$ gradle tasks --all

 

To run a task:

$ gradle name_of_task

 

To install in local Maven repository (prerequisite: apply plugin: ‘maven’)

$ gradle install

 

Enabling the Gradle Daemon (a long-lived background process that executes your builds much more quickly)

$ gradle --daemon

or

touch ~/.gradle/gradle.properties && echo "org.gradle.daemon=true" >> ~/.gradle/gradle.properties

 

Disabling the Gradle Daemon

$ gradle --stop

 

To be continued…

Spread the knowledge