diff --git a/build.gradle b/build.gradle
index 358d6b779..5a3c738b2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -189,11 +189,11 @@ tasks.withType(Checkstyle) {
}
checkstyle {
- toolVersion "8.7"
+ toolVersion = libs.versions.checkstyle.get()
configFile = file("${rootProject.projectDir}/config/checkstyle/checkstyle.xml")
configProperties = [
- "checkstyle.config.path": file("${projectDir}/config/checkstyle")
+ "org.checkstyle.google.suppressionfilter.config": file("${rootProject.projectDir}/config/checkstyle/checkstyle-suppressions.xml"),
]
ignoreFailures = false
- maxWarnings = 0 // https://github.com/gradle/gradle/issues/881
+ maxWarnings = 0
}
diff --git a/config/checkstyle/README.md b/config/checkstyle/README.md
index efa34b9e0..403c7363c 100644
--- a/config/checkstyle/README.md
+++ b/config/checkstyle/README.md
@@ -1,12 +1,11 @@
Checkstyle for the Embulk project
==================================
-* google_check.xml: Downloaded from: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
- * Commit: 60f41e3c16e6c94b0bf8c2e5e4b4accf4ad394ab
+* google_check.xml: Downloaded from: https://github.com/checkstyle/checkstyle/blob/checkstyle-9.3/src/main/resources/google_checks.xml
+ * Commit: 5c1903792f8432243cc8ae5cd79a03a004d3c09c
* checkstyle.xml: Customized from google_check.xml.
- * To enable suppressions through suppressions.xml.
+ * To enable suppressions through checkstyle-suppressions.xml.
* To enable suppressions with @SuppressWarnings.
- * To accept package names with underscores.
* To indent with 4-column spaces.
- * To limit columns to 180 characters, which will be shortened later.
+ * To limit columns to 180 characters.
* To reject unused imports.
diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/checkstyle-suppressions.xml
similarity index 89%
rename from config/checkstyle/suppressions.xml
rename to config/checkstyle/checkstyle-suppressions.xml
index 087253ac6..aefd4d6b2 100644
--- a/config/checkstyle/suppressions.xml
+++ b/config/checkstyle/checkstyle-suppressions.xml
@@ -8,6 +8,7 @@
+
diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml
index e31da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+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/config/checkstyle/google_checks.xml b/config/checkstyle/google_checks.xml
index a6fc40b5f..515a844ac 100644
--- a/config/checkstyle/google_checks.xml
+++ b/config/checkstyle/google_checks.xml
@@ -1,237 +1,364 @@
+ "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
+ "https://checkstyle.org/dtds/configuration_1_3.dtd">
-
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
-
-
-
-
+
+
+
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/embulk-guess-bzip2/build.gradle b/embulk-guess-bzip2/build.gradle
index 860cdf6e8..37405830f 100644
--- a/embulk-guess-bzip2/build.gradle
+++ b/embulk-guess-bzip2/build.gradle
@@ -20,7 +20,7 @@ configurations {
}
tasks.withType(JavaCompile) {
- options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
+ options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
options.encoding = "UTF-8"
}
@@ -67,6 +67,19 @@ javadocJar {
}
}
+// A safer and strict alternative to: "dependencies" (and "dependencies --write-locks")
+//
+// This task fails explicitly when the specified dependency is not available.
+// In contrast, "dependencies (--write-locks)" does not fail even when a part the dependencies are unavailable.
+//
+// https://docs.gradle.org/8.7/userguide/dependency_locking.html#generating_and_updating_dependency_locks
+task checkDependencies {
+ notCompatibleWithConfigurationCache("The task \"checkDependencies\" filters configurations at execution time.")
+ doLast {
+ configurations.findAll { it.canBeResolved }.each { it.resolve() }
+ }
+}
+
publishing {
publications {
maven(MavenPublication) {
@@ -154,11 +167,11 @@ tasks.withType(Checkstyle) {
}
checkstyle {
- toolVersion "8.7"
+ toolVersion = libs.versions.checkstyle.get()
configFile = file("${rootProject.projectDir}/config/checkstyle/checkstyle.xml")
configProperties = [
- "checkstyle.config.path": file("${rootProject.projectDir}/config/checkstyle")
+ "org.checkstyle.google.suppressionfilter.config": file("${rootProject.projectDir}/config/checkstyle/checkstyle-suppressions.xml"),
]
ignoreFailures = false
- maxWarnings = 0 // https://github.com/gradle/gradle/issues/881
+ maxWarnings = 0
}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index d7356dccb..5da447e59 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -20,6 +20,8 @@ commons-codec = "1.16.1"
commons-io = "2.16.1"
commons-lang3 = "3.14.0"
+checkstyle = "9.3"
+
[libraries]
embulk-spi = { group = "org.embulk", name = "embulk-spi", version.ref = "embulk-spi" }