Skip to content

Commit a6bb286

Browse files
committedApr 26, 2024·
Start using Gradle version catalog
1 parent e23f5e0 commit a6bb286

File tree

3 files changed

+62
-3
lines changed

3 files changed

+62
-3
lines changed
 

‎build.gradle

+19-3
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,9 +34,12 @@ 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 libs.embulk.util.config
41+
implementation libs.validation
42+
implementation libs.bundles.jackson
4043
}
4144

4245
embulkPlugin {
@@ -63,6 +66,19 @@ javadocJar {
6366
}
6467
}
6568

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

‎gradle/libs.versions.toml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
[libraries]
17+
18+
embulk-spi = { group = "org.embulk", name = "embulk-spi", version.ref = "embulk-spi" }
19+
slf4j = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j-api" }
20+
embulk-util-config = { group = "org.embulk", name = "embulk-util-config", version.ref = "embulk-util-config" }
21+
embulk-util-file = { group = "org.embulk", name = "embulk-util-file", version.ref = "embulk-util-file" }
22+
validation = { group = "javax.validation", name = "validation-api", version.ref = "validation-api" }
23+
jackson-annotations = { group = "com.fasterxml.jackson.core", name = "jackson-annotations", version.ref = "jackson" }
24+
jackson-core = { group = "com.fasterxml.jackson.core", name = "jackson-core", version.ref = "jackson" }
25+
jackson-databind = { group = "com.fasterxml.jackson.core", name = "jackson-databind", version.ref = "jackson-databind" }
26+
jackson-datatype-jdk8 = { group = "com.fasterxml.jackson.datatype", name = "jackson-datatype-jdk8", version.ref = "jackson" }
27+
28+
[bundles]
29+
30+
jackson = [
31+
"jackson-annotations",
32+
"jackson-core",
33+
"jackson-databind",
34+
"jackson-datatype-jdk8",
35+
]
36+
37+
[plugins]
38+
39+
gradle-embulk-plugins = { id = "org.embulk.embulk-plugins", version.ref = "gradle-embulk-plugins" }

‎settings-gradle.lockfile

+4
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)
Please sign in to comment.