Skip to content

Commit 25ef57e

Browse files
committed
Start using Gradle version catalog
1 parent 320031d commit 25ef57e

File tree

3 files changed

+69
-5
lines changed

3 files changed

+69
-5
lines changed

build.gradle

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id "java"
33
id "maven-publish"
44
id "signing"
5-
id "org.embulk.embulk-plugins" version "0.5.5"
5+
alias(libs.plugins.gradle.embulk.plugins)
66
id "checkstyle"
77
}
88

@@ -34,11 +34,16 @@ java {
3434
}
3535

3636
dependencies {
37-
compileOnly "org.embulk:embulk-spi:0.11"
37+
compileOnly libs.embulk.spi
38+
compileOnly libs.slf4j
3839

39-
implementation "org.embulk:embulk-util-config:0.3.4"
40-
implementation "org.embulk:embulk-util-file:0.1.5"
41-
implementation "org.apache.commons:commons-compress:1.10"
40+
implementation libs.embulk.util.config
41+
implementation libs.validation
42+
implementation libs.bundles.jackson
43+
44+
implementation libs.embulk.util.file
45+
46+
implementation libs.commons.compress
4247
}
4348

4449
embulkPlugin {
@@ -65,6 +70,19 @@ javadocJar {
6570
}
6671
}
6772

73+
// A safer and strict alternative to: "dependencies" (and "dependencies --write-locks")
74+
//
75+
// This task fails explicitly when the specified dependency is not available.
76+
// In contrast, "dependencies (--write-locks)" does not fail even when a part the dependencies are unavailable.
77+
//
78+
// https://docs.gradle.org/8.7/userguide/dependency_locking.html#generating_and_updating_dependency_locks
79+
task checkDependencies {
80+
notCompatibleWithConfigurationCache("The task \"checkDependencies\" filters configurations at execution time.")
81+
doLast {
82+
configurations.findAll { it.canBeResolved }.each { it.resolve() }
83+
}
84+
}
85+
6886
publishing {
6987
publications {
7088
maven(MavenPublication) {

gradle/libs.versions.toml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[versions]
2+
3+
gradle-embulk-plugins = "0.7.0"
4+
5+
embulk-spi = "0.11"
6+
slf4j-api = "2.0.7"
7+
8+
embulk-util-config = "0.3.4"
9+
validation-api = "1.1.0.Final"
10+
11+
jackson = "2.6.7"
12+
jackson-databind = "2.6.7.5"
13+
14+
embulk-util-file = "0.1.5"
15+
16+
commons-compress = "1.10"
17+
18+
[libraries]
19+
20+
embulk-spi = { group = "org.embulk", name = "embulk-spi", version.ref = "embulk-spi" }
21+
slf4j = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j-api" }
22+
embulk-util-config = { group = "org.embulk", name = "embulk-util-config", version.ref = "embulk-util-config" }
23+
embulk-util-file = { group = "org.embulk", name = "embulk-util-file", version.ref = "embulk-util-file" }
24+
validation = { group = "javax.validation", name = "validation-api", version.ref = "validation-api" }
25+
jackson-annotations = { group = "com.fasterxml.jackson.core", name = "jackson-annotations", version.ref = "jackson" }
26+
jackson-core = { group = "com.fasterxml.jackson.core", name = "jackson-core", version.ref = "jackson" }
27+
jackson-databind = { group = "com.fasterxml.jackson.core", name = "jackson-databind", version.ref = "jackson-databind" }
28+
jackson-datatype-jdk8 = { group = "com.fasterxml.jackson.datatype", name = "jackson-datatype-jdk8", version.ref = "jackson" }
29+
commons-compress = { group = "org.apache.commons", name = "commons-compress", version.ref = "commons-compress" }
30+
31+
[bundles]
32+
33+
jackson = [
34+
"jackson-annotations",
35+
"jackson-core",
36+
"jackson-databind",
37+
"jackson-datatype-jdk8",
38+
]
39+
40+
[plugins]
41+
42+
gradle-embulk-plugins = { id = "org.embulk.embulk-plugins", version.ref = "gradle-embulk-plugins" }

settings-gradle.lockfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# This is a Gradle generated file for dependency locking.
2+
# Manual edits can break the build and are not advised.
3+
# This file is expected to be part of source control.
4+
empty=incomingCatalogForLibs0

0 commit comments

Comments
 (0)