From 61c4fb9fe3fc8e4e29acf632e504bc716c5373b5 Mon Sep 17 00:00:00 2001 From: Dai MIKURUBE Date: Tue, 23 Apr 2024 17:34:28 +0900 Subject: [PATCH] Upgrade Apache Commons Compress to 1.26.1 --- build.gradle | 23 +++++++++++++++++++++++ gradle.lockfile | 5 ++++- gradle/libs.versions.toml | 8 +++++++- 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 4fba2729..358d6b77 100644 --- a/build.gradle +++ b/build.gradle @@ -44,7 +44,17 @@ dependencies { implementation libs.embulk.util.file + // Apache Commons Compress (commons-compress) has been depending on commons-codec, commons-io, and commons-lang3 since 1.26.0. + // + // It had had some internal utility classes, like Charsets and IOUtils, until 1.25.0, which were duplicated + // with commons-codec and commons-io. Apache Commons Compress started to reuse the original ones from 1.26.0. + // + // See: https://commons.apache.org/proper/commons-compress/changes-report.html#a1.26.0 implementation libs.commons.compress + + implementation libs.commons.codec + implementation libs.commons.io + implementation libs.commons.lang3 } embulkPlugin { @@ -71,6 +81,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) { diff --git a/gradle.lockfile b/gradle.lockfile index 51e6df69..db662cec 100644 --- a/gradle.lockfile +++ b/gradle.lockfile @@ -6,8 +6,11 @@ com.fasterxml.jackson.core:jackson-core:2.16.2=compileClasspath,runtimeClasspath com.fasterxml.jackson.core:jackson-databind:2.16.2=compileClasspath,runtimeClasspath com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.16.2=compileClasspath,runtimeClasspath com.fasterxml.jackson:jackson-bom:2.16.2=compileClasspath,runtimeClasspath +commons-codec:commons-codec:1.16.1=compileClasspath,runtimeClasspath +commons-io:commons-io:2.16.1=compileClasspath,runtimeClasspath javax.validation:validation-api:2.0.1.Final=compileClasspath,runtimeClasspath -org.apache.commons:commons-compress:1.10=compileClasspath,runtimeClasspath +org.apache.commons:commons-compress:1.26.1=compileClasspath,runtimeClasspath +org.apache.commons:commons-lang3:3.14.0=compileClasspath,runtimeClasspath org.embulk:embulk-spi:0.11=compileClasspath org.embulk:embulk-util-config:0.5.0=compileClasspath,runtimeClasspath org.embulk:embulk-util-file:0.2.0=compileClasspath,runtimeClasspath diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b2ed0868..d7356dcc 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -15,7 +15,10 @@ jackson = "2.16.2" embulk-util-file = "0.2.0" -commons-compress = "1.10" +commons-compress = "1.26.1" +commons-codec = "1.16.1" +commons-io = "2.16.1" +commons-lang3 = "3.14.0" [libraries] @@ -30,6 +33,9 @@ jackson-core = { group = "com.fasterxml.jackson.core", name = "jackson-core" } jackson-databind = { group = "com.fasterxml.jackson.core", name = "jackson-databind" } jackson-datatype-jdk8 = { group = "com.fasterxml.jackson.datatype", name = "jackson-datatype-jdk8" } commons-compress = { group = "org.apache.commons", name = "commons-compress", version.ref = "commons-compress" } +commons-codec = { group = "commons-codec", name = "commons-codec", version.ref = "commons-codec" } +commons-io = { group = "commons-io", name = "commons-io", version.ref = "commons-io" } +commons-lang3 = { group = "org.apache.commons", name = "commons-lang3", version.ref = "commons-lang3" } [bundles]