Skip to content

Commit

Permalink
Merge pull request #2940 from mapfish/Gradle-Fix-Deprecated
Browse files Browse the repository at this point in the history
Upgrade to Gradle 8.1.1
  • Loading branch information
sebr72 authored May 30, 2023
2 parents c3e7c31 + f2a2c35 commit c283ec9
Show file tree
Hide file tree
Showing 15 changed files with 151 additions and 115 deletions.
5 changes: 5 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@
groupName: 'batik',
automerge: true,
},
{
matchPackageNames: ['checkstyle', 'spotbugs'],
matchUpdateTypes: ['major', 'minor'],
enabled: false,
},
/** Accept only the patch on the stabilization branches */
{
matchBaseBranches: ['/3\\..*/'],
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
if: always()
- run: docker cp builder:/src/core/build/ core/build/ || true
if: always()
- run: ls -l core/build/libs core/build/distributions
- run: ls -l core/build/distributions
if: always()

- run: docker cp mapfish-print_tests_1:/src/examples/build/ examples/build/ || true
Expand Down
17 changes: 1 addition & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
/*/bin
/.classpath
/*/.classpath
/.gradle/
/.project
/*/.project
/.settings
/*/.settings/
/examples/*.jasper

/reports/
/build/
/*/build/

/examples/geoserver-data/.updatepassword.lock
/examples/geoserver-data/controlflow.properties
/examples/geoserver-data/gwc-gs.xml
/examples/geoserver-data/security/geoserver.jceks
/examples/geoserver-data/security/version.properties
/examples/geoserver-data/workspaces/default.xml
/examples/geoserver-data/wps.xml

/CI.asc
/.github/changelog-generator-cache
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM gradle:6.9.4-jdk11 AS builder
FROM gradle:8.1.1-jdk11 AS builder

RUN --mount=type=cache,target=/var/cache,sharing=locked \
--mount=type=cache,target=/root/.cache \
Expand Down
35 changes: 22 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import se.bjurr.violations.gradle.plugin.ViolationsTask

buildscript {
repositories {
mavenCentral()
Expand All @@ -13,7 +15,7 @@ buildscript {
defaultTasks 'build'

wrapper {
gradleVersion = '6.9.4'
gradleVersion = '7.6.1'
distributionType = Wrapper.DistributionType.ALL
}

Expand All @@ -22,7 +24,7 @@ allprojects {
version = version
}

configurations.all {
configurations.configureEach {
resolutionStrategy {
force 'xml-apis:xml-apis:2.0.2'
}
Expand All @@ -40,7 +42,7 @@ configure(subprojects.findAll { ['core', 'examples'].contains(it.name) }) {
jar.dependsOn(checkstyleMain)

checkstyle {
toolVersion = "10.10.0" // com.puppycrawl.tools:checkstyle
toolVersion = "6.19" // com.puppycrawl.tools:checkstyle
configFile = file("$rootProject.rootDir/checkstyle_checks.xml")
configProperties = ['basedir': project.rootDir.path]
ignoreFailures = true
Expand All @@ -49,22 +51,22 @@ configure(subprojects.findAll { ['core', 'examples'].contains(it.name) }) {
checkstyleTest.enabled = false

spotbugs {
toolVersion = "4.7.3" // com.github.spotbugs:spotbugs-annotations
toolVersion = "4.4.2" // com.github.spotbugs:spotbugs-annotations
ignoreFailures = true
reportsDir = file("$project.buildDir/reports/spotbugsReports")
effort = "max"
reportLevel = "high"
}
spotbugsTest.enabled = false
spotbugsTest.enabled = true

task violations(type: se.bjurr.violations.gradle.plugin.ViolationsTask) {
tasks.register('violations', ViolationsTask) {
minSeverity = 'INFO'
detailLevel = 'VERBOSE' // PER_FILE_COMPACT, COMPACT or VERBOSE
maxViolations = 0
maxViolations = 1070
printViolations = true
violations = [
["FINDBUGS", ".", ".*/reports/spotbugsReports/.*\\.xml", "Spotbugs"],
["CHECKSTYLE", ".", ".*/reports/checkstyleReports/.*\\.xml", "Checkstyle"]
["FINDBUGS", ".", ".*/reports/spotbugsReports/.*\\.xml", "Spotbugs"],
["CHECKSTYLE", ".", ".*/reports/checkstyleReports/.*\\.xml", "Checkstyle"]
]
}
check.finalizedBy violations
Expand All @@ -75,7 +77,7 @@ configure(subprojects.findAll { ['core', 'examples'].contains(it.name) }) {
compileJava.options.compilerArgs = ['-Xlint:deprecation', '-Xlint:unchecked']

dependencies {
testCompile(
testImplementation(
"junit:junit:4.13.2",
'org.mockito:mockito-core:5.3.1',
)
Expand All @@ -90,10 +92,17 @@ configure(subprojects.findAll { ['core', 'examples'].contains(it.name) }) {
}
}

tasks.withType(JavaCompile) {
tasks.withType(JavaCompile).configureEach {
options.encoding = 'utf-8'
}
tasks.withType(Javadoc) {
options.encoding = 'utf-8'
tasks.withType(Javadoc).tap {
configureEach {
options.encoding = 'utf-8'
}
}
}

tasks.register('docs') {
enabled = false
}

14 changes: 7 additions & 7 deletions checkstyle_checks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="UpperEll"/>
<module name="SuppressionCommentFilter"/>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CSOFF\:\s*([\w\|]+)"/>
<property name="onCommentFormat" value="CSON\:\s*([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
<module name="LineLength">
<property name="max" value="110"/>
</module>
</module>
<module name="LineLength">
<property name="max" value="110"/>
<module name="SuppressionCommentFilter"/>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CSOFF\:\s*([\w\|]+)"/>
<property name="onCommentFormat" value="CSON\:\s*([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>
<module name="NewlineAtEndOfFile"/>
<module name="JavadocPackage"/>
Expand Down
Loading

0 comments on commit c283ec9

Please sign in to comment.