11
22plugins {
3- id ' com.diffplug.spotless' version ' 5.12.1'
4- id ' com.github.spotbugs' version ' 4.7.0'
5- id " com.github.ben-manes.versions" version " 0.38.0"
3+ id ' java'
4+ id ' maven-publish'
5+ id ' signing'
6+ id ' checkstyle'
7+ id ' com.diffplug.spotless' version ' 6.22.0'
8+ id ' com.github.spotbugs' version ' 5.0.14'
9+ id ' com.github.ben-manes.versions' version ' 0.50.0'
610}
711
8- apply plugin : ' java-library'
9- apply plugin : ' maven-publish'
10- apply plugin : ' checkstyle'
11- apply plugin : ' signing'
12- apply plugin : ' com.diffplug.spotless'
13-
14- sourceCompatibility = JavaVersion . VERSION_11
15- targetCompatibility = JavaVersion . VERSION_11
16-
1712group ' com.formkiq'
18- version ' 2.3.1 '
13+ version ' 2.4.0 '
1914
15+ spotbugs {
16+ excludeFilter = file(" $rootDir /config/spotbugs/spotbugs-exclude.xml" )
17+ }
18+
2019spotless {
2120 java {
2221 googleJavaFormat()
2322 }
2423}
2524
2625spotbugsMain {
27- reports {
28- html {
29- enabled = true
30- destination = file(" $buildDir /reports/spotbugs/main/spotbugs.html" )
31- stylesheet = ' fancy-hist.xsl'
32- }
26+ reports {
27+ html {
28+ enabled = true
3329 }
34- }
30+ }
31+ }
3532
3633checkstyle {
3734 toolVersion ' 8.29'
3835 configFile file(" config/checkstyle/checkstyle.xml" )
3936 configProperties = [project_loc : " ${ projectDir} " ]
40- }
41-
42- tasks. withType(Checkstyle ). each { checkstyleTask ->
43- checkstyleTask. doLast {
44- reports. all { report ->
45- def outputFile = report. destination
46- if (outputFile. exists() && outputFile. text. contains(" <error " )) {
47- throw new GradleException (" There were checkstyle warnings! For more info check $outputFile " )
48- }
49- }
50- }
37+ ignoreFailures = false
38+ maxWarnings = 0
5139}
5240
5341checkstyleMain. dependsOn spotlessApply
@@ -63,6 +51,10 @@ check {
6351java {
6452 withJavadocJar()
6553 withSourcesJar()
54+
55+ toolchain {
56+ languageVersion. set(JavaLanguageVersion . of(17 ))
57+ }
6658}
6759
6860javadoc {
@@ -84,12 +76,12 @@ afterEvaluate {
8476
8577
8678dependencies {
87- implementation group : ' com.amazonaws' , name : ' aws-lambda-java-core' , version : ' 1.2.1 '
88- implementation group : ' com.google.code.gson' , name : ' gson' , version : ' 2.8.6 '
89- testImplementation group : ' com.amazonaws' , name : ' aws-lambda-java-events' , version : ' 3.8.0 '
79+ implementation group : ' com.amazonaws' , name : ' aws-lambda-java-core' , version : ' 1.2.3 '
80+ implementation group : ' com.google.code.gson' , name : ' gson' , version : ' 2.10.1 '
81+ testImplementation group : ' com.amazonaws' , name : ' aws-lambda-java-events' , version : ' 3.11.3 '
9082 testImplementation group : ' junit' , name : ' junit' , version :' 4.+'
91- testImplementation group : ' org.mock-server' , name : ' mockserver-netty' , version : ' 5.11.2 '
92- testImplementation group : ' org.slf4j' , name : ' slf4j-simple' , version : ' 1.7.30 '
83+ testImplementation group : ' org.mock-server' , name : ' mockserver-netty' , version : ' 5.15.0 '
84+ testImplementation group : ' org.slf4j' , name : ' slf4j-simple' , version : ' 2.0.9 '
9385}
9486
9587publishing {
@@ -140,4 +132,4 @@ signing {
140132
141133check {
142134 dependsOn(tasks. publishToMavenLocal)
143- }
135+ }
0 commit comments