From ddd573b832b574eaef4985e2b23eaf8eb9b9dad3 Mon Sep 17 00:00:00 2001 From: Vyacheslav Rusakov Date: Thu, 1 Feb 2024 15:53:12 +0700 Subject: [PATCH] update docs --- CHANGELOG.md | 1 + LICENSE | 2 +- README.md | 11 +++++++---- build.gradle | 2 +- src/doc/docs/about/compatibility.md | 3 ++- src/doc/docs/about/history.md | 15 +++++++++++++++ src/doc/docs/about/license.md | 2 +- src/doc/docs/index.md | 2 ++ src/doc/docs/tool/spotbugs.md | 17 +++++++++-------- src/doc/mkdocs.yml | 2 +- 10 files changed, 40 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ec37d6b..7012fe24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +### 5.0.0 (2024-02-01) * (BREAKING) Drop gradle 5 and 6 support * Update spotbugs plugin to 5.2.5 (#94) - Remove spotbugsShowStackTraces option because it's not used by spotbugs anymore diff --git a/LICENSE b/LICENSE index c107fdf7..3a7497cc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015-2022 Vyacheslav Rusakov +Copyright (c) 2015-2024 Vyacheslav Rusakov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 64580c2d..674ef816 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,8 @@ Features: * Html and xml reports for all plugins (custom xsl used for findbugs html report because it can't generate both xml and html reports) * Grouping tasks to run registered quality plugins for exact source set (e.g. checkQualityMain) +NOTE: the plugin is **not compatible** with the gradle [configuration cache](https://docs.gradle.org/current/userguide/configuration_cache.html) + ##### Summary * Configuration: `quality` @@ -46,7 +48,7 @@ NOTE: when updating plugin version in your project don't forget to call `clean` ```groovy plugins { - id 'ru.vyarus.quality' version '4.9.0' + id 'ru.vyarus.quality' version '5.0.0' } ``` @@ -59,7 +61,7 @@ buildscript { gradlePluginPortal() } dependencies { - classpath 'ru.vyarus:gradle-quality-plugin:4.9.0' + classpath 'ru.vyarus:gradle-quality-plugin:5.0.0' } } apply plugin: 'ru.vyarus.quality' @@ -69,11 +71,12 @@ Minimal requirements: java 8, gradle 5.6 #### Compatibility -Plugin compiled for java 8, compatible with java 11 +Plugin compiled for java 8, compatible with java 11 (and above) Gradle | Version --------|------- -5.6-8 | 4.9.0 +7-8 | 5.0.0 +5.6-6 | [4.9.0](https://xvik.github.io/gradle-quality-plugin/4.9.0/) 5.1 | [4.2.2](http://xvik.github.io/gradle-quality-plugin/4.2.2) 4.1 | [3.4.0](http://xvik.github.io/gradle-quality-plugin/3.4.0) older | [2.4.0](http://xvik.github.io/gradle-quality-plugin/2.4.0) diff --git a/build.gradle b/build.gradle index 48176669..bdeaec8a 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ ext { animalsnifferVersion = '1.7.1' cpdVersion = '3.3' spotbugsPluginVersion = '5.2.5' - docVersion = '4.9.0' + docVersion = '5.0.0' } repositories { mavenLocal(); mavenCentral(); gradlePluginPortal() } diff --git a/src/doc/docs/about/compatibility.md b/src/doc/docs/about/compatibility.md index 2a93501a..fb089bc6 100644 --- a/src/doc/docs/about/compatibility.md +++ b/src/doc/docs/about/compatibility.md @@ -4,7 +4,8 @@ Plugin compiled for java 8, compatible with java 11 Gradle | Version --------|------- -5.6-8 | 4.9.0 +7-8 | 5.0.0 +5.6-6 | [4.9.0](https://xvik.github.io/gradle-quality-plugin/4.9.0/) 5.1 | [4.2.2](http://xvik.github.io/gradle-quality-plugin/4.2.2) 4.1 | [3.4.0](http://xvik.github.io/gradle-quality-plugin/3.4.0) older | [2.4.0](http://xvik.github.io/gradle-quality-plugin/2.4.0) diff --git a/src/doc/docs/about/history.md b/src/doc/docs/about/history.md index 46ed9a2b..3d284410 100644 --- a/src/doc/docs/about/history.md +++ b/src/doc/docs/about/history.md @@ -1,3 +1,18 @@ +### [5.0.0](http://xvik.github.io/gradle-quality-plugin/5.0.0) (2024-02-01) +* (BREAKING) Drop gradle 5 and 6 support +* Update spotbugs plugin to 5.2.5 (#94) + - Remove spotbugsShowStackTraces option because it's not used by spotbugs anymore + - Custom xsl file is not used for html report - native html report generation used instead + - Add spotbugs-annotations dependency automatically with compileOnly (to simplify @SuppressFBWarnings usage) + Could be disabled with quality.spotbugsAnnotations = false configuration +* Update checkstyle 10.6.0 -> 10.12.7 (gradle metadata fix applied) + - Fix links to checkstyle site (site structure changed) +* Update spotbugs 4.7.3 -> 4.8.3 +* Update pmd 6.54 -> 6.55 (java 20 support) +* Update codenarc 3.2.0 -> 3.4.0 +* Remove deprecated gradle apis usage + - The plugin is still NOT compatible with configuration cache + ### [4.9.0](http://xvik.github.io/gradle-quality-plugin/4.9.0) (2023-02-18) * Gradle 8 support (#77) * Update checkstyle 10.3.1 -> 10.6.0 diff --git a/src/doc/docs/about/license.md b/src/doc/docs/about/license.md index c107fdf7..3a7497cc 100644 --- a/src/doc/docs/about/license.md +++ b/src/doc/docs/about/license.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015-2022 Vyacheslav Rusakov +Copyright (c) 2015-2024 Vyacheslav Rusakov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/doc/docs/index.md b/src/doc/docs/index.md index 90663cb2..bcbb50a2 100644 --- a/src/doc/docs/index.md +++ b/src/doc/docs/index.md @@ -26,6 +26,8 @@ * Html and xml reports for all plugins (custom xsl used for findbugs html report because it can't generate both xml and html reports) * Grouping tasks to run registered quality plugins for exact source set (e.g. checkQualityMain) +!!! note + The plugin is **not compatible** with the gradle [configuration cache](https://docs.gradle.org/current/userguide/configuration_cache.html) ## How to use docs diff --git a/src/doc/docs/tool/spotbugs.md b/src/doc/docs/tool/spotbugs.md index 2c591e17..487a1d2e 100644 --- a/src/doc/docs/tool/spotbugs.md +++ b/src/doc/docs/tool/spotbugs.md @@ -23,11 +23,6 @@ it uses [efforts level](http://spotbugs.readthedocs.io/en/latest/effort.html). D Default settings (`max` effort and `medium` level) are perfect for most cases. Some checks were disabled in the default [filter file](https://github.com/xvik/gradle-quality-plugin/blob/master/src/main/resources/ru/vyarus/quality/config/spotbugs/exclude.xml) -!!! note - Special [xsl file](https://github.com/xvik/gradle-quality-plugin/blob/master/src/main/resources/ru/vyarus/quality/config/spotbugs/html-report-style.xsl) - used for manual html report generation. Spotbugs plugin can generate both xml and html reports, but - this ability is not used (for more stable and legacy-compatible behaviour). - ## Output ``` @@ -58,11 +53,11 @@ Tool config options with defaults: quality { spotbugsVersion = '{{ gradle.spotbugs }}' spotbugs = true // false to disable automatic plugin activation - spotbugsShowStackTraces = false // changes default for spotbugs.showStackTraces spotbugsEffort = 'max' // min, less, more or max spotbugsLevel = 'medium' // low, medium, high spotbugsMaxRank = 20 // 1-4 scariest, 5-9 scary, 10-14 troubling, 15-20 of concern spotbugsMaxHeapSize = '1g' + spotbugsAnnotations = true // false to not register spotbugs-annotations } ``` @@ -81,8 +76,8 @@ quality { To suppress violations you can use [filter file](http://spotbugs.readthedocs.io/en/latest/filter.html). In this case you need to override [default filter file](https://github.com/xvik/gradle-quality-plugin/blob/master/src/main/resources/ru/vyarus/quality/config/spotbugs/exclude.xml). -Or you can use annotations. SpotBugs use custom annotations and so you need to add -`com.github.spotbugs:spotbugs-annotations:3.1.2` dependency (with provided scope if possible) and use: +Plugin applies `com.github.spotbugs:spotbugs-annotations:{{ gradle.spotbugs }}` dependency automatically +in `compileOnly` scope in order to use special suppressing annotation: ```java @SuppressFBWarnings("URF_UNREAD_FIELD") @@ -92,6 +87,12 @@ Or you can use annotations. SpotBugs use custom annotations and so you need to a Spotbugs can't use default `@SuppressWarnings` annotation because it's a source annotation and not available in bytecode. +!!! note + To disable automatic annotations dependency applying: + ```java + quality.spotbugsAnnotations = false + ``` + ## Excludes Spotbugs is the only quality tool which works on classes rather than on sources. By default, diff --git a/src/doc/mkdocs.yml b/src/doc/mkdocs.yml index 445feb84..2c561c7f 100644 --- a/src/doc/mkdocs.yml +++ b/src/doc/mkdocs.yml @@ -11,7 +11,7 @@ repo_url: http://github.com/xvik/gradle-quality-plugin edit_uri: edit/master/src/doc/docs/ #Copyright (shown at the footer) -copyright: 'Copyright © 2015-2021 Vyacheslav Rusakov' +copyright: 'Copyright © 2015-2024 Vyacheslav Rusakov' plugins: - search