File tree 3 files changed +29
-27
lines changed
gradle/plugins/common/src/main/kotlin
3 files changed +29
-27
lines changed Original file line number Diff line number Diff line change
1
+ plugins {
2
+ base
3
+ checkstyle
4
+ }
5
+
6
+ checkstyle {
7
+ toolVersion = requiredVersionFromLibs(" checkstyle" )
8
+ configDirectory = rootProject.layout.projectDirectory.dir(" gradle/config/checkstyle" )
9
+ }
10
+
11
+ tasks.check {
12
+ dependsOn(tasks.withType<Checkstyle >())
13
+ }
Original file line number Diff line number Diff line change 1
1
plugins {
2
- base
3
- checkstyle
4
- }
5
-
6
- checkstyle {
7
- toolVersion = requiredVersionFromLibs(" checkstyle" )
8
- configDirectory = rootProject.layout.projectDirectory.dir(" gradle/config/checkstyle" )
2
+ id(" junitbuild.checkstyle-conventions" )
9
3
}
10
4
11
5
dependencies {
12
6
checkstyle(dependencyFromLibs(" nohttp-checkstyle" ))
13
7
}
14
8
15
- tasks {
16
- val checkstyleNohttp by registering(Checkstyle ::class ) {
17
- group = " verification"
18
- description = " Checks for illegal uses of http://"
19
- classpath = files(configurations.checkstyle)
20
- config = resources.text.fromFile(checkstyle.configDirectory.file(" checkstyleNohttp.xml" ))
21
- source = fileTree(layout.projectDirectory) {
22
- exclude(" .git/**" , " **/.gradle/**" )
23
- exclude(" .idea/**" , " .eclipse/**" )
24
- exclude(" **/*.class" )
25
- exclude(" **/*.hprof" )
26
- exclude(" **/*.jar" )
27
- exclude(" **/*.jpg" , " **/*.png" )
28
- exclude(" **/*.jks" )
29
- exclude(" **/build/**" )
30
- }
31
- }
32
- check {
33
- dependsOn(checkstyleNohttp)
9
+ tasks.register<Checkstyle >(" checkstyleNohttp" ) {
10
+ group = " verification"
11
+ description = " Checks for illegal uses of http://"
12
+ classpath = files(configurations.checkstyle)
13
+ config = resources.text.fromFile(checkstyle.configDirectory.file(" checkstyleNohttp.xml" ))
14
+ source = fileTree(layout.projectDirectory) {
15
+ exclude(" .git/**" , " **/.gradle/**" )
16
+ exclude(" .idea/**" , " .eclipse/**" )
17
+ exclude(" **/*.class" )
18
+ exclude(" **/*.hprof" )
19
+ exclude(" **/*.jar" )
20
+ exclude(" **/*.jpg" , " **/*.png" )
21
+ exclude(" **/*.jks" )
22
+ exclude(" **/build/**" )
34
23
}
35
24
}
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ plugins {
10
10
`java- library`
11
11
eclipse
12
12
idea
13
- checkstyle
14
13
id(" junitbuild.base-conventions" )
15
14
id(" junitbuild.build-parameters" )
15
+ id(" junitbuild.checkstyle-conventions" )
16
16
id(" junitbuild.jacoco-java-conventions" )
17
17
}
18
18
You can’t perform that action at this time.
0 commit comments