Skip to content

Commit

Permalink
Merge pull request #38 from project-tsurugi/fix-ci-warnings
Browse files Browse the repository at this point in the history
Fix build warnings for incompatible with Gradle 9.0
  • Loading branch information
hishidama authored Feb 7, 2024
2 parents 4d45cac + 0706a4f commit 32eb837
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ jobs:

steps:
- name: Setup_Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Assemble
run: |
./gradlew -i tgsql:core:showTsubakuroManifest clean assemble
./gradlew -i tgsql:core:showTsubakuroManifest clean assemble --warning-mode all
- name: Check
run: |
./gradlew -i check --continue
./gradlew -i check --continue --warning-mode all
- name: Verify
uses: project-tsurugi/tsurugi-annotations-action@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ jobs:

steps:
- name: Setup_Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Create_Release
if: contains(github.ref, '/tags/')
run: |
cd modules/tgsql
../../gradlew -i distZip
../../gradlew -i distZip --warning-mode all
cd -
set -x
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ repositories {
}

dependencies {
implementation 'gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.1'
implementation 'com.github.spotbugs.snom:spotbugs-gradle-plugin:5.2.5'
}
12 changes: 9 additions & 3 deletions buildSrc/src/main/groovy/tanzawa.java-conventions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ java {
}

dependencies {
testImplementation(platform('org.junit:junit-bom:5.9.0'))
testImplementation('org.junit.jupiter:junit-jupiter')
testImplementation platform('org.junit:junit-bom:5.10.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

checkstyle {
Expand All @@ -53,7 +54,12 @@ spotbugsMain {
enabled = true
destination = file("$buildDir/reports/spotbugs/main/spotbugs.xml")
}
html {
enabled = true
destination = file("$buildDir/reports/spotbugs/main/spotbugs.html")
}
}
excludeFilter = rootProject.file('buildSrc/src/main/resources/spotbugsExclude.xml')
}

spotbugsTest.enabled = false
Expand Down Expand Up @@ -95,7 +101,7 @@ task showTsubakuroManifest {
task writeVersion(type: WriteProperties) {
description 'generate version file to META-INF/tsurugidb/{project.name}.properties'
inputs.property('Build-Revision', buildRevision)
outputFile "${project.buildDir}/generated/version/META-INF/tsurugidb/${project.qualifiedProjectName}.properties"
destinationFile = file("${project.buildDir}/generated/version/META-INF/tsurugidb/${project.qualifiedProjectName}.properties")
properties (
'Build-Timestamp': buildTimestamp,
'Build-Revision' : buildRevision,
Expand Down
16 changes: 16 additions & 0 deletions buildSrc/src/main/resources/spotbugsExclude.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<FindBugsFilter
xmlns="https://github.com/spotbugs/filter/3.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">

<Match>
<Or>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
<Bug pattern="EI_EXPOSE_REP" />
<Bug pattern="EI_EXPOSE_REP2" />
<Bug pattern="MS_EXPOSE_REP" />
</Or>
</Match>

</FindBugsFilter>
2 changes: 1 addition & 1 deletion modules/tgdump/cli/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'tanzawa.java-conventions'
id 'application'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion modules/tgsql/cli/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'tanzawa.java-conventions'
id 'application'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}

dependencies {
Expand Down

0 comments on commit 32eb837

Please sign in to comment.