1
+ import com.github.spotbugs.snom.Confidence
2
+ import com.github.spotbugs.snom.Effort
1
3
import com.google.common.io.Files as GoogleFiles
2
4
import com.google.googlejavaformat.java.Formatter
3
5
import com.google.googlejavaformat.java.JavaFormatterOptions
@@ -15,7 +17,7 @@ import okhttp3.Request
15
17
import okhttp3.RequestBody.Companion.toRequestBody
16
18
import org.yaml.snakeyaml.Yaml
17
19
18
- val javaVersion = JavaVersion .VERSION_17
20
+ val javaVersion = JavaVersion .VERSION_21
19
21
20
22
fun String.runCommand (currentWorkingDir : File = file("./")): String {
21
23
val byteOut = ByteArrayOutputStream ()
@@ -45,11 +47,11 @@ plugins {
45
47
alias(libs.plugins.spring.boot)
46
48
alias(libs.plugins.gradle.git.properties)
47
49
id(" checkstyle" )
48
- id(" pmd" )
50
+ // id("pmd")
49
51
alias(libs.plugins.spotbugs.gradle)
50
52
id(" jacoco" )
51
53
alias(libs.plugins.versions.gradle)
52
- alias(libs.plugins.ca.cutterslade.analyze)
54
+ // alias(libs.plugins.ca.cutterslade.analyze)
53
55
alias(libs.plugins.docker.gradle)
54
56
}
55
57
@@ -74,6 +76,12 @@ val intTestImplementation: Configuration by configurations.getting {
74
76
75
77
configurations[" intTestRuntimeOnly" ].extendsFrom(configurations.runtimeOnly.get())
76
78
79
+ configurations.checkstyle {
80
+ resolutionStrategy.capabilitiesResolution.withCapability(" com.google.collections:google-collections" ) {
81
+ select(" com.google.guava:guava:0" )
82
+ }
83
+ }
84
+
77
85
// Static Analysis Plugin Configuration
78
86
79
87
checkstyle {
@@ -85,18 +93,18 @@ jacoco {
85
93
toolVersion = libs.versions.jacoco.get()
86
94
}
87
95
88
- pmd {
89
- isConsoleOutput = true
90
- isIgnoreFailures = false
91
- ruleSets = listOf ()
92
- ruleSetFiles = files(" config/pmd/pmd.xml" )
93
- toolVersion = libs.versions.pmd.get()
94
- }
96
+ // pmd {
97
+ // isConsoleOutput = true
98
+ // isIgnoreFailures = false
99
+ // ruleSets = listOf()
100
+ // ruleSetFiles = files("config/pmd/pmd.xml")
101
+ // toolVersion = libs.versions.pmd.get()
102
+ // }
95
103
96
104
spotbugs {
97
105
ignoreFailures.set(false )
98
- setEffort( " max " )
99
- setReportLevel( " low " )
106
+ effort.set( Effort . MAX )
107
+ reportLevel.set( Confidence . LOW )
100
108
showProgress.set(false )
101
109
toolVersion.set(libs.versions.spotbugs.get())
102
110
}
@@ -149,12 +157,12 @@ dependencies {
149
157
" org.springframework.boot:spring-boot-properties-migrator"
150
158
).forEach { runtimeOnly(it) }
151
159
152
- listOf (
153
- " org.springframework.boot:spring-boot-starter-actuator" ,
154
- " org.springframework.boot:spring-boot-starter-security" ,
155
- " org.springframework.boot:spring-boot-starter-thymeleaf" ,
156
- " org.springframework.boot:spring-boot-starter-web"
157
- ).forEach { permitUnusedDeclared(it) }
160
+ // listOf(
161
+ // "org.springframework.boot:spring-boot-starter-actuator",
162
+ // "org.springframework.boot:spring-boot-starter-security",
163
+ // "org.springframework.boot:spring-boot-starter-thymeleaf",
164
+ // "org.springframework.boot:spring-boot-starter-web"
165
+ // ).forEach { permitUnusedDeclared(it) }
158
166
159
167
listOf (
160
168
libs.junit.bom
@@ -392,8 +400,7 @@ tasks.register("validateYaml") {
392
400
doLast {
393
401
val input = File (project.projectDir, " src/main/resources/application.yml" )
394
402
Yaml ().loadAll(input.inputStream()).forEach { configFile ->
395
- project.logger.debug(
396
- " Section '${configFile} ' in configuration file '${input.name} ' is valid." )
403
+ project.logger.debug(" Section '{}' in configuration file '{}' is valid." , configFile, input.name)
397
404
}
398
405
project.logger.lifecycle(" File '${input.name} ' passed validation." )
399
406
}
@@ -473,10 +480,10 @@ tasks.withType<com.github.spotbugs.snom.SpotBugsTask>() {
473
480
reports.maybeCreate(" html" ).required.set(true )
474
481
}
475
482
476
- tasks.withType< ca.cutterslade.gradle.analyze.AnalyzeDependenciesTask > () {
477
- warnUsedUndeclared = true
478
- warnUnusedDeclared = true
479
- }
483
+ // tasks.withType<ca.cutterslade.gradle.analyze.AnalyzeDependenciesTask>() {
484
+ // warnUsedUndeclared = true
485
+ // warnUnusedDeclared = true
486
+ // }
480
487
481
488
// Task Dependencies
482
489
tasks.named(" buildDockerImage" ) {
0 commit comments