Java Clean Architecture Masterclass

Java Clean Architecture MasterclassNov 20-21

Join

Gradle quality plugin

License CI Appveyor build status codecov

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

Version 6.0 brings a few breaking changes: see migration guide

About

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

For example, in IntelliJ Idea it would look like:

Features:

NOTE: the plugin is compatible with the gradle configuration cache

Summary

Setup

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

Maven Central Gradle Plugin Portal

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

OR

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

IMPORTANT: if spotbugs is required, spotbugs plugin must be applied manually:

plugins {
    id 'com.github.spotbugs' version '6.2.6' apply false
}

On multi-module projects it would be enough to declare spotbugs in the root project: quality plugin will detect its presence in build classpath and apply in modules automatically.

Compatibility

Plugin compiled for java 8, compatible with java 11 and above.

Supported gradle 7.1 - 9.

Gradle Version
7.1-9 6.0.1
7.0 5.0.0
5.6-6 4.9.0
5.1 4.2.2
4.1 3.4.0
older 2.4.0

Java requirements for quality tools:

Tool Default version Java version
Checkstyle 11.0.1 17
PMD 7.16.0 8
SpotBugs 4.9.4 11
CodeNarc 3.6.0 8

Incompatible tools will not be enabled: for example, on java 11 Checkstyle will not be enabled.

See details about configuration for exact java versions

Snapshots

Snapshots may be used through JitPack

Usage

Read documentation

Might also like


gradle plugin generator

Join libs.tech

...and unlock some superpowers

GitHub

We won't share your data with anyone else.