Gradle quality plugin for Java and Groovy
DOCUMENTATION http://xvik.github.io/gradle-quality-plugin
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 not compatible with the gradle configuration cache
quality
initQualityConfig
- copy default configs for customizationcheckQuality[Main]
- run quality tasks for main (or any other) source setNOTE: when updating plugin version in your project don't forget to call clean
task to remove cached configs from previous plugin version
plugins {
id 'ru.vyarus.quality' version '5.0.0'
}
OR
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath 'ru.vyarus:gradle-quality-plugin:5.0.0'
}
}
apply plugin: 'ru.vyarus.quality'
Minimal requirements: java 8, gradle 7
Plugin compiled for java 8, compatible with java 11 (and above)
Gradle | Version |
---|---|
7-8 | 5.0.0 |
5.6-6 | 4.9.0 |
5.1 | 4.2.2 |
4.1 | 3.4.0 |
older | 2.4.0 |
Java tools require sourceCompatibility=1.8
(or above).
Version 3.3.0 is the latest supporting sourceCompatibility=1.6
Commits
section and click Get it
on commit you want to use (you may need to wait while version builds if no one requested it before)
or use master-SNAPSHOT
to use the most recent snapshotFor gradle before 6.0 use buildscript
block with required commit hash as version:
buildscript {
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'ru.vyarus:gradle-quality-plugin:b9474cab84'
}
}
apply plugin: 'ru.vyarus.quality'
For gradle 6.0 and above:
Add to settings.gradle
(top most!) with required commit hash as version:
pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.namespace == 'ru.vyarus.quality') {
useModule('ru.vyarus:gradle-quality-plugin:b9474cab84')
}
}
}
repositories {
maven { url 'https://jitpack.io' }
gradlePluginPortal()
}
}
Use plugin without declaring version:
plugins {
id 'ru.vyarus.quality'
}
Read documentation