Gradle

Overview

Gradle is an open-source build automation system. It is primarily targeted towards languages running on the JVM (Java Virtual Machine).

The Gradle logo.

One of it’s big advantages over Maven is it’s use of a domain-specific language (DSL) rather than XML to specify the project configuration and build steps.

The Java Plugin

The Java plugin is probably one of the most commonly used plugins. To use the plugin, add the following to your build script:

The Java plugin assumes the same traditional layout of files that Maven did:

Directory Meaning
src/main/java Production Java source
src/main/resources Production resources
src/test/java Test Java source
src/test/resources Test resources
src/sourceSet/java Java source for the given source set
src/sourceSet/resources Resources for the given source set

These default file locations can be changed if needed (however, it is recommended to use the default configuration unless you have good reason not to).

 

Posted: January 30th, 2017 at 10:00 pm
Last Updated on: January 31st, 2017 at 12:49 am