Article by:
Date Published:
Last Modified:


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

The Gradle logo.

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:

apply plugin: 'java'

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

src/main/javaProduction Java source
src/main/resourcesProduction resources
src/test/javaTest Java source
src/test/resourcesTest resources
src/_`sourceSet`_/javaJava source for the given source set
src/_`sourceSet`_/resourcesResources 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).


Geoffrey Hunter

Dude making stuff.

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License .

Related Content

No related content found.


    comments powered by Disqus