Chapter 19. Standard Gradle plugins

There are a number of plugins included in the Gradle distribution. These are listed below.

19.1. Language plugins

These plugins add support for various languages which can be compiled and executed in the JVM.

Table 19.1. Language plugins

Plugin Id Automatically applies Works with Description
java java-base -

Adds Java compilation, testing and bundling capabilities to a project. It serves as the basis for many of the other Gradle plugins. See also Chapter 6, Java Quickstart.

groovy java, groovy-base -

Adds support for building Groovy projects. See also Chapter 7, Groovy Quickstart.

scala java, scala-base -

Adds support for building Scala projects.

antlr java -

Adds support for generating parsers using Antlr.

19.2. Integration plugins

These plugins provide some integration with various build and runtime technologies.

Table 19.2. Integration plugins

Plugin Id Automatically applies Works with Description
announce - -

Publish messages to your favourite platforms, such as Twitter or Growl.

jetty war -

Deploys your web application to a Jetty web container embedded in the build. See also Chapter 8, Web Application Quickstart.

maven - java, war

Adds support for deploying artifacts to Maven repositories.

osgi java-base java

Adds support for building OSGi bundles.

war java -

Adds support for assembling web application WAR files. See also Chapter 8, Web Application Quickstart.

19.3. Software development plugins

These plugins provide help with your software development process.

Table 19.3. Software development plugins

Plugin Id Automatically applies Works with Description
code-quality reporting-base java, groovy

Performs code quality checks and generate reports from these checks.

eclipse - java, groovy, scala, war

Generates files that are used by Eclipse IDE, thus making it possible to import the project into Eclipse. See also Chapter 6, Java Quickstart.

idea - java

Generates files that are used by Intellij IDEA IDE, thus making it possible to import the project into IDEA.

project-report reporting-base -

Generates reports containing useful information about your Gradle build.

19.4. Base plugins

These plugins form the basic building blocks which the other plugins are assembled from. They are available for you to use in your build files, and are listed here for completeness. However, be aware that they are not yet considered part of Gradle's public API. As such, these plugins are not documented in the user guide. You might refer to their API documentation to learn more about them.

Table 19.4. Base plugins

Plugin Id Description
base

Adds the standard lifecycle tasks to the project, plus some shared convention properties.

java-base

Adds the source sets concept to the project. Does not add any particular source sets.

groovy-base

Adds the Groovy source sets concept to the project.

scala-base

Adds the Scala source sets concept to the project.

reporting-base

Adds some shared convention properties to the project, relating to report generation.

19.5. Third party plugins

You can find a list of external plugins on the wiki.