// Copyright 2017 the original author or authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

[[standard_plugins]]
== Standard Gradle plugins

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


[[sec:language_plugins]]
=== Language plugins

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

.Language plugins
[cols="a,a,a,a", options="header"]
|===
| Plugin Id
| Automatically applies
| Works with
| Description

| <<java_plugin, `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 <<tutorial_java_projects>>.

| <<groovy_plugin, `groovy` >>
| `java`, `groovy-base`
| -
| Adds support for building Groovy projects. See also <<tutorial_groovy_projects>>.

| <<scala_plugin, `scala` >>
| `java`, `scala-base`
| -
| Adds support for building Scala projects.

| <<antlr_plugin, `antlr` >>
| `java`
| -
| Adds support for generating parsers using http://www.antlr.org/[Antlr].
|===


[[sec:incubating_language_plugins]]
=== Incubating language plugins

These plugins add support for various languages:

.Language plugins
[cols="a,a,a,a", options="header"]
|===
| Plugin Id
| Automatically applies
| Works with
| Description

| <<native_software, `assembler` >>
| -
| -
| Adds native assembly language capabilities to a project.

| <<native_software, `c` >>
| -
| -
| Adds C source compilation capabilities to a project.

| <<native_software, `cpp` >>
| -
| -
| Adds C++ source compilation capabilities to a project.

| <<native_software, `objective-c` >>
| -
| -
| Adds Objective-C source compilation capabilities to a project.

| <<native_software, `objective-cpp` >>
| -
| -
| Adds Objective-C++ source compilation capabilities to a project.

| <<native_software, `windows-resources` >>
| -
| -
| Adds support for including Windows resources in native binaries.
|===


[[sec:integration_plugins]]
=== Integration plugins

These plugins provide some integration with various runtime technologies.

.Integration plugins
[cols="a,a,a,a", options="header"]
|===
| Plugin Id
| Automatically applies
| Works with
| Description

| <<application_plugin, `application` >>
| `java`, `distribution`
| -
| Adds tasks for running and bundling a Java project as a command-line application.

| <<ear_plugin, `ear` >>
| -
| `java`
| Adds support for building J2EE applications.

| <<publishing_ivy, `ivy-publish` >>
| -
| `application`, `distribution`, `java`, `war`
| Provides a new DSL to support publishing artifacts to Ivy repositories, which improves on the existing DSL.

| <<publishing_maven, `maven-publish` >>
| -
| `application`, `distribution`, `java`, `war`
| Provides a new DSL to support publishing artifacts to Maven repositories, which improves on the existing DSL.

| <<maven_plugin, `maven` >>
| -
| `java`, `war`
| Adds support for publishing artifacts to Maven repositories using the _original_ publishing mechanism available in Gradle 1.0. See also <<artifact_management>>.

| <<osgi_plugin, `osgi` >>
| `java-base`
| `java`
| Adds support for building OSGi bundles.

| <<war_plugin, `war` >>
| `java`
| -
| Adds support for assembling web application WAR files. See also <<web_project_tutorial>>.
|===


[[sec:incubating_integration_plugins]]
=== Incubating integration plugins

These plugins provide some integration with various runtime technologies.

.Incubating integration plugins
[cols="a,a,a,a", options="header"]
|===
| Plugin Id
| Automatically applies
| Works with
| Description

| <<distribution_plugin, `distribution` >>
| -
| -
| Adds support for building ZIP and TAR distributions.

| <<java_library_distribution_plugin, `java-library-distribution` >>
| `java`, `distribution`
| -
| Adds support for building ZIP and TAR distributions for a Java library.
|===


[[sec:software_development_plugins]]
=== Software development plugins

These plugins provide help with your software development process.

.Software development plugins
[cols="a,a,a,a", options="header"]
|===
| Plugin Id
| Automatically applies
| Works with
| Description

| <<announce_plugin, `announce` >>
| -
| -
| Publish messages to your favourite platforms, such as Twitter or Growl.

| <<build_announcements_plugin, `build-announcements` >>
| announce
| -
| Sends local announcements to your desktop about interesting events in the build lifecycle.

| <<checkstyle_plugin, `checkstyle` >>
| `java-base`
| -
| Performs quality checks on your project's Java source files using http://checkstyle.sourceforge.net/index.html[Checkstyle] and generates reports from these checks.

| <<codenarc_plugin, `codenarc` >>
| `groovy-base`
| -
| Performs quality checks on your project's Groovy source files using http://codenarc.sourceforge.net/index.html[CodeNarc] and generates reports from these checks.

| <<eclipse_plugin, `eclipse` >>
| -
| `java`,`groovy`, `scala`
| Generates files that are used by http://eclipse.org[Eclipse IDE], thus making it possible to import the project into Eclipse. See also <<tutorial_java_projects>>.

| <<eclipse_plugin, `eclipse-wtp` >>
| -
| `ear`, `war`
| Does the same as the eclipse plugin plus generates eclipse WTP (Web Tools Platform) configuration files. After importing to eclipse your war/ear projects should be configured to work with WTP. See also <<tutorial_java_projects>>.

| <<findbugs_plugin, `findbugs` >>
| `java-base`
| -
| Performs quality checks on your project's Java source files using http://findbugs.sourceforge.net[FindBugs] and generates reports from these checks.

| <<idea_plugin, `idea` >>
| -
| `java`
| Generates files that are used by http://www.jetbrains.com/idea/index.html[Intellij IDEA IDE], thus making it possible to import the project into IDEA.

| <<jdepend_plugin, `jdepend` >>
| `java-base`
| -
| Performs quality checks on your project's source files using http://clarkware.com/software/JDepend.html[JDepend] and generates reports from these checks.

| <<pmd_plugin, `pmd` >>
| `java-base`
| -
| Performs quality checks on your project's Java source files using http://pmd.sourceforge.net[PMD] and generates reports from these checks.

| <<project_reports_plugin, `project-report` >>
| `reporting-base`
| -
| Generates reports containing useful information about your Gradle build.

| <<signing_plugin, `signing` >>
| base
| -
| Adds the ability to digitally sign built files and artifacts.
|===


[[sec:incubating_software_development_plugins]]
=== Incubating software development plugins

These plugins provide help with your software development process.

.Software development plugins
[cols="a,a,a,a", options="header"]
|===
| Plugin Id
| Automatically applies
| Works with
| Description

| <<build_dashboard_plugin, `build-dashboard` >>
| reporting-base
| -
| Generates build dashboard report.

| <<native_software, `cunit` >>
| -
| -
| Adds support for running http://cunit.sourceforge.net[CUnit] tests.

| <<jacoco_plugin, `jacoco` >>
| reporting-base
| java
| Provides integration with the http://www.eclemma.org/jacoco/[JaCoCo] code coverage library for Java.

| <<native_software, `visual-studio` >>
| -
| native language plugins
| Adds integration with Visual Studio.

| <<java_gradle_plugin, `java-gradle-plugin` >>
| java
|
| Assists with development of Gradle plugins by providing standard plugin build configuration and validation.
|===


[[sec:base_plugins]]
=== 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.

.Base plugins
[cols="a,a", options="header"]
|===
| Plugin Id
| Description

| base
| Adds the standard lifecycle tasks and configures reasonable defaults for the archive tasks:

* adds build __ConfigurationName__ tasks. Those tasks assemble the artifacts belonging to the specified configuration.
* adds upload __ConfigurationName__ tasks. Those tasks assemble and upload the artifacts belonging to the specified configuration.
* configures reasonable default values for all archive tasks (e.g. tasks that inherit from api:org.gradle.api.tasks.bundling.AbstractArchiveTask[]). For example, the archive tasks are tasks of types: api:org.gradle.api.tasks.bundling.Jar[], api:org.gradle.api.tasks.bundling.Tar[], api:org.gradle.api.tasks.bundling.Zip[]. Specifically, `destinationDir`, `baseName` and `version` properties of the archive tasks are preconfigured with defaults. This is extremely useful because it drives consistency across projects; the consistency regarding naming conventions of archives and their location after the build completed.


| 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.
|===


[[sec:third_party_plugins]]
=== Third party plugins

You can find a list of external plugins at the http://plugins.gradle.org/[Gradle Plugins site].
