gradle-quality-plugin

Additional

Language
Groovy
Version
3.2.0 (Sep 12, 2018)
Created
Nov 19, 2015
Updated
Sep 26, 2018
Owner
Vyacheslav Rusakov (xvik)
Contributor
Vyacheslav Rusakov (xvik)
1
Activity
Badge
Generate
Download
Source code

Announcement

Gradle quality plugin

DOCUMENTATION http://xvik.github.io/gradle-quality-plugin

About

Static code analysis for Java and Groovy projects using Checkstyle, PMD, SpotBugs (FindBugs) and CodeNarc. Plugin implements unified console output for all quality plugins which greatly simplifies developer workflow: only console is required for working with violations and makes it feel the same as java compiler errors.

Features:

  • Adds extra javac lint options to see more warnings
  • Complete console output for all quality plugins
  • Html and xml reports for all plugins (custom xsl used for findbugs html report because it can't generate both xml and html reports)
  • Zero configuration by default: provided opinionated configs will make it work out of the box
  • Task to copy default configs for customization
  • Grouping tasks to run registered quality plugins for exact source set (e.g. checkQualityMain)
Summary
  • Configuration: quality
  • Tasks:
    • initQualityConfig - copy default configs for customization
    • checkQuality[Main] - run quality tasks for main (or any other) source set
  • Enable plugins: Checkstyle, PMD, SpotBugs, FindBugs, CodeNarc

Setup

NOTE: when updating plugin version in your project don't forget to call clean task to remove cached configs from previous plugin version

Releases are published to bintray jcenter, maven central and gradle plugins portal.

buildscript {
    repositories {
        jcenter()
        gradlePluginPortal()
    }
    dependencies {
        classpath 'ru.vyarus:gradle-quality-plugin:3.2.0'
    }
}
apply plugin: 'ru.vyarus.quality'

OR

plugins {
    id 'ru.vyarus.quality' version '3.2.0'
}

Plugin must be applied after java or groovy plugins. Otherwise it will do nothing.

IMPORTANT Plugin itself is compiled for java 7, but java quality tools require java 8 so, by default, you will need java 8 for java projects. Groovy project will work on java 7.

If you are using lower java versions use previous plugin releases.

Usage

Read documentation

Might also like