Skip to content

Commit

Permalink
close spotbugs#342: add a page to describe how to use Gradle plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
KengoTODA authored and iloveeclipse committed Aug 31, 2017
1 parent e0b067f commit 8d9de56
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/gradle.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Using the SpotBugs Gradle Plugin
================================

This chapter describes how to integrate SpotBugs into a build script for Gradle.

Use SpotBugs Gradle Plugin
--------------------------

Please follow instruction found on `official Gradple Plugin page <https://plugins.gradle.org/plugin/com.github.spotbugs>`_.

Tasks introduced by this Gradle Plugin
--------------------------------------

This Gradle Plugin introduces two tasks: `spotbugsMain and `spotbugsTest.

`spotbugsMain` task runs SpotBugs for your production Java source files. This task depends on `classes` task.
`spotbugsTest` task runs SpotBugs for your test Java source files. This task depends on `testClasses` task.

SpotBugs Gradle Plugin adds task dependency from `check` to these these tasks, so you can simly run ``./gradlew check`` to run SpotBugs.

Configure Gradle Plugin
-----------------------

Current version of SpotBugs Gradle Plugin uses the same way to configure. Please check the document for `FindBugsExtension <http://gradle.monochromeroad.com/docs/dsl/org.gradle.api.plugins.quality.FindBugsExtension.html>`_.

For instance, to specify the version of SpotBugs, you can configure like below:

.. code-block:: groovy
spotbugs {
toolVersion = '3.1.0-RC5'
}
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Contents
gui
eclipse
ant
gradle
filter
analysisprops
implement-plugin
Expand Down
76 changes: 76 additions & 0 deletions docs/locale/ja/LC_MESSAGES/gradle.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2016-2017, spotbugs community
# This file is distributed under the same license as the spotbugs package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: spotbugs 3.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-25 02:42+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"

#: ../../gradle.rst:2
msgid "Using the SpotBugs Gradle Plugin"
msgstr ""

#: ../../gradle.rst:4
msgid ""
"This chapter describes how to integrate SpotBugs into a build script for "
"Gradle."
msgstr ""

#: ../../gradle.rst:7
msgid "Use SpotBugs Gradle Plugin"
msgstr ""

#: ../../gradle.rst:9
msgid ""
"Please follow instruction found on `official Gradple Plugin page "
"<https://plugins.gradle.org/plugin/com.github.spotbugs>`_."
msgstr ""

#: ../../gradle.rst:12
msgid "Tasks introduced by this Gradle Plugin"
msgstr ""

#: ../../gradle.rst:14
msgid "This Gradle Plugin introduces two tasks: `spotbugsMain and `spotbugsTest."
msgstr ""

#: ../../gradle.rst:16
msgid ""
"`spotbugsMain` task runs SpotBugs for your production Java source files. "
"This task depends on `classes` task. `spotbugsTest` task runs SpotBugs "
"for your test Java source files. This task depends on `testClasses` task."
msgstr ""

#: ../../gradle.rst:19
msgid ""
"SpotBugs Gradle Plugin adds task dependency from `check` to these these "
"tasks, so you can simly run ``./gradlew check`` to run SpotBugs."
msgstr ""

#: ../../gradle.rst:22
msgid "Configure Gradle Plugin"
msgstr ""

#: ../../gradle.rst:24
msgid ""
"Current version of SpotBugs Gradle Plugin uses the same way to configure."
" Please check the document for `FindBugsExtension "
"<http://gradle.monochromeroad.com/docs/dsl/org.gradle.api.plugins.quality.FindBugsExtension.html>`_."
msgstr ""

#: ../../gradle.rst:26
msgid ""
"For instance, to specify the version of SpotBugs, you can configure like "
"below:"
msgstr ""

0 comments on commit 8d9de56

Please sign in to comment.