Skip to content

Commit b096a6a

Browse files
committed
update docss
1 parent 8196158 commit b096a6a

File tree

10 files changed

+73
-7
lines changed

10 files changed

+73
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
### 4.8.0 (2022-07-02)
12
* Update checkstyle 9.1 -> 10.3.1
23
IMPORTANT: Checkstyle 10 requires java 11, but plugin will automatically switch to
34
[backports](https://checkstyle.org/#Backport) for lower jre.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015-2020 Vyacheslav Rusakov
3+
Copyright (c) 2015-2022 Vyacheslav Rusakov
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ NOTE: when updating plugin version in your project don't forget to call `clean`
4646

4747
```groovy
4848
plugins {
49-
id 'ru.vyarus.quality' version '4.7.0'
49+
id 'ru.vyarus.quality' version '4.8.0'
5050
}
5151
```
5252

@@ -59,7 +59,7 @@ buildscript {
5959
gradlePluginPortal()
6060
}
6161
dependencies {
62-
classpath 'ru.vyarus:gradle-quality-plugin:4.7.0'
62+
classpath 'ru.vyarus:gradle-quality-plugin:4.8.0'
6363
}
6464
}
6565
apply plugin: 'ru.vyarus.quality'
@@ -73,7 +73,7 @@ Plugin compiled for java 8, compatible with java 11
7373

7474
Gradle | Version
7575
--------|-------
76-
5.6 | 4.7.0
76+
5.6 | 4.8.0
7777
5.1 | [4.2.2](http://xvik.github.io/gradle-quality-plugin/4.2.2)
7878
4.1 | [3.4.0](http://xvik.github.io/gradle-quality-plugin/3.4.0)
7979
older | [2.4.0](http://xvik.github.io/gradle-quality-plugin/2.4.0)

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ext {
2424
animalsnifferVersion = '1.5.4'
2525
cpdVersion = '3.3'
2626
spotbugsPluginVersion = '4.8.0'
27-
docVersion = '4.7.0'
27+
docVersion = '4.8.0'
2828
}
2929

3030
repositories { mavenLocal(); mavenCentral(); gradlePluginPortal() }

src/doc/docs/about/compatibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Plugin compiled for java 8, compatible with java 11
44

55
Gradle | Version
66
--------|-------
7-
5.6 | 4.7.0
7+
5.6 | 4.8.0
88
5.1 | [4.2.2](http://xvik.github.io/gradle-quality-plugin/4.2.2)
99
4.1 | [3.4.0](http://xvik.github.io/gradle-quality-plugin/3.4.0)
1010
older | [2.4.0](http://xvik.github.io/gradle-quality-plugin/2.4.0)

src/doc/docs/about/history.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
### [4.8.0](http://xvik.github.io/gradle-quality-plugin/4.8.0) (2022-07-02)
2+
* Update checkstyle 9.1 -> 10.3.1
3+
IMPORTANT: Checkstyle 10 requires java 11, but plugin will automatically switch to
4+
[backports](https://checkstyle.org/#Backport) for lower jre.
5+
Additional maven repository would be registered if required (LIMITED to checkstyle only)
6+
Warning in log would clearly indicate when backport is used
7+
* New option: quality.checkstyleBackport (by default true for jre < 11)
8+
Option might be used to force backport for java >=11 or to disable backport at all
9+
* Update checkstyle config:
10+
- Add [UnusedLocalVariable](https://checkstyle.sourceforge.io/config_coding.html#UnusedLocalVariable)
11+
- Change [MultipleStringLiterals](https://checkstyle.org/config_coding.html#MultipleStringLiterals)
12+
to react on strings more than 2 chars only and allow 2 duplicates (to avoid warning in trivial cases)
13+
* Update pmd 6.34 -> 6.47 (java 17-18 support)
14+
* Update pmd config:
15+
- Disable [AvoidAccessibilityAlteration](https://pmd.github.io/pmd-6.47.0/pmd_rules_java_errorprone.html#avoidaccessibilityalteration)
16+
- Change [CognitiveComplexity](https://pmd.github.io/pmd-6.47.0/pmd_rules_java_design.html#cognitivecomplexity) reportLevel to 21 (default 15)
17+
- Disable [ReturnEmptyArrayRatherThanNull](https://pmd.github.io/pmd-6.47.0/pmd_rules_java_errorprone.html#returnemptyarrayratherthannull) as deprecated
18+
* Update codenarc 2.2.0 -> 3.1.0 (groovy 4 support)
19+
* New option: quality.codenarcGroovy4 (by default, true)
20+
Since codenarc 3.1 separate groovy4-based codenarc jar produced (codenarc-groovy4)
21+
It would be used by default because groovy 4 has better adoption for newer JDKs
22+
(codenarc task started with its own groovy so it does not restrict gradle version)
23+
If you need to use older codenarc version then switch this option off manually
24+
* Update spotbugs 4.4.2 -> 4.7.1
25+
* Update spotbugs plugin 4.7.9 -> 4.8.0
26+
127
### [4.7.0](http://xvik.github.io/gradle-quality-plugin/4.7.0) (2021-11-10)
228
* Fix gradle 7 deprecation warnings (#30)
329
* Update spotbugs plugin 4.7.1 -> 4.7.9

src/doc/docs/about/license.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015-2021 Vyacheslav Rusakov
3+
Copyright (c) 2015-2022 Vyacheslav Rusakov
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

src/doc/docs/guide/config.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,28 @@ quality {
3838
* disable it (property is useful only for enabling it in gradle 5.6 - 6.3).
3939
*/
4040
pmdIncremental = false
41+
42+
/**
43+
* Since checkstyle 10, minimum required java is 11. Community (not checkstyle core team!) started a
44+
* backport (https://checkstyle.org/#Backport) project - maintaining java 8 compatibility.
45+
* Backport releases would be delayed relative to main checkstyle releases (see
46+
* https://rnveach.github.io/checkstyle-backport-jre8)
47+
*
48+
* NOTE: additional repository would be configured to download backport (only when backport required). But the
49+
* repository would be limited to checkstyle group only!
50+
*
51+
* This property switches between backport and normal checkstyle versions. By default backport would be enabled
52+
* on java 8-10, but you can manually enable it for all java versions if required. Or you can use false value
53+
* to prevent backport behaviour and preventing new repository registration.
54+
*/
55+
checkstyleBackport = !JavaVersion.current().java11Compatible
56+
57+
/**
58+
* Since codenarc 3.1.0 there is a separate artifact for groovy 4 (CodeNarc-Groovy4). Gradle runs codenarc
59+
* task with it's own groovy so by default groovy4 artifact is active. If you need to use earlier codenarc version
60+
* then switch this option to false.
61+
*/
62+
codenarcGroovy4 = true
4163
4264
/**
4365
* By default, cpd looks in all sources (cpd gradle plugin behaviour). When option enabled, quality plugin will

src/doc/docs/tool/checkstyle.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ By default, plugin activates if java sources available (`src/main/java`).
1212
contains all possible checks, but some of them are disabled (note that some checkstyle rules are opposite and
1313
never intended to be used together). Uncomment check to enable it.
1414

15+
!!! warning
16+
Checkstyle 10 requires java 11 or above. In order to preserve java 8 compatibility,
17+
plugin would automatically switch to [backport](https://checkstyle.org/#Backport).
18+
Such backport is loaded from *custom repository* (limited to checkstyle only!).
19+
You'll see a warning in logs about backport activation.
20+
If required, this behaviour could be disabled with `quality.checkstyleBackport` configuration option.
21+
1522
!!! note ""
1623
In case you will use a custom config: checkstyle config must describe all used rules. So when new version release with new rules,
1724
config must be manually updated to add new rules (otherwise they would not be used).
@@ -36,6 +43,8 @@ Tool config options with defaults:
3643
quality {
3744
checkstyleVersion = '{{ gradle.checkstyle }}'
3845
checkstyle = true // false to disable automatic plugin activation
46+
// true for java 8-10 by default, set to false to disable fallback to backport
47+
checkstyleBackport = !JavaVersion.current().java11Compatible
3948
}
4049
```
4150

src/doc/docs/tool/codenarc.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88

99
By default, plugin activates if groovy sources available (`src/main/groovy`).
1010

11+
!!! warning
12+
Since codenarc 3.1 there is a separate jar for groovy4 (codenarc-groovy4) and
13+
plugin use it by default. If you need to use lower codenarc version set
14+
`quality.codenarcGroovy4 = false` in order to switch to usual codenarc jar (groovy 3 based).
15+
Note that it does not relate to your project's groovy version - codenarc will use its own
16+
groovy version.
1117

1218
## Output
1319

@@ -33,6 +39,8 @@ Tool config options with defaults:
3339
quality {
3440
codenarcVersion = '{{ gradle.codenarc }}'
3541
codenarc = true // false to disable automatic plugin activation
42+
// use groovy4-based codenarc version; set to false to use groovy3-based version
43+
codenarcGroovy4 = true
3644
}
3745
```
3846

0 commit comments

Comments
 (0)