Skip to content

Commit

Permalink
Merge pull request #20 from embulk/gradle-version-catalog
Browse files Browse the repository at this point in the history
Start using Gradle version catalog
  • Loading branch information
dmikurube authored Apr 27, 2024
2 parents 542b5eb + f36da52 commit 743da73
Show file tree
Hide file tree
Showing 5 changed files with 180 additions and 77 deletions.
71 changes: 42 additions & 29 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id "java"
id "maven-publish"
id "signing"
id "org.embulk.embulk-plugins" version "0.5.5"
alias(libs.plugins.gradle.embulk.plugins)
id "checkstyle"
}

Expand Down Expand Up @@ -34,34 +34,34 @@ java {
}

dependencies {
compileOnly "org.embulk:embulk-spi:0.11"
compileOnly "org.slf4j:slf4j-api:2.0.7"

implementation "com.fasterxml.jackson.core:jackson-annotations:2.6.7"
implementation "com.fasterxml.jackson.core:jackson-core:2.6.7"
implementation "com.fasterxml.jackson.core:jackson-databind:2.6.7.5"
implementation "org.embulk:embulk-util-csv:0.2.4"
implementation "org.embulk:embulk-util-config:0.3.4"
implementation "org.embulk:embulk-util-file:0.1.5"
implementation "org.embulk:embulk-util-json:0.3.0"
implementation "org.embulk:embulk-util-text:0.1.3"
implementation "org.embulk:embulk-util-timestamp:0.2.2"

testImplementation "junit:junit:4.13.2"
testImplementation "org.embulk:embulk-spi:0.11"
testImplementation "org.embulk:embulk-core:0.11.0"
testImplementation "org.embulk:embulk-deps:0.11.0"
testImplementation "org.embulk:embulk-junit4:0.11.0"
testImplementation "com.google.guava:guava:18.0"

testImplementation "org.embulk:embulk-formatter-csv:0.10.42"
testImplementation "org.embulk:embulk-input-file:0.10.42"
testImplementation "org.embulk:embulk-output-file:0.10.42"
testImplementation "org.embulk:embulk-parser-csv:0.10.42"
testImplementation "org.embulk:embulk-guess-bzip2:0.10.42"
testImplementation "org.embulk:embulk-guess-csv:0.10.42"
testImplementation "org.embulk:embulk-guess-gzip:0.10.42"
testImplementation "org.embulk:embulk-guess-json:0.10.42"
compileOnly libs.embulk.spi
compileOnly libs.slf4j

implementation libs.embulk.util.config
implementation libs.validation
implementation libs.bundles.jackson

implementation libs.embulk.util.csv
implementation libs.embulk.util.file
implementation libs.embulk.util.json
implementation libs.embulk.util.text
implementation libs.embulk.util.timestamp

testImplementation libs.junit4
testImplementation libs.embulk.spi
testImplementation libs.embulk.core
testImplementation libs.embulk.deps
testImplementation libs.embulk.junit4
testImplementation libs.guava

testImplementation libs.embulk.formatter.csv
testImplementation libs.embulk.input.file
testImplementation libs.embulk.output.file
testImplementation libs.embulk.parser.csv
testImplementation libs.embulk.guess.bzip2
testImplementation libs.embulk.guess.csv
testImplementation libs.embulk.guess.gzip
testImplementation libs.embulk.guess.json
}

embulkPlugin {
Expand All @@ -88,6 +88,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) {
Expand Down
52 changes: 28 additions & 24 deletions embulk-guess-csv/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id "java"
id "maven-publish"
id "signing"
id "org.embulk.embulk-plugins" version "0.5.5"
alias(libs.plugins.gradle.embulk.plugins)
id "checkstyle"
}

Expand Down Expand Up @@ -34,31 +34,35 @@ java {
}

dependencies {
compileOnly "org.embulk:embulk-spi:0.11"
compileOnly "org.slf4j:slf4j-api:2.0.7"
compileOnly libs.embulk.spi
compileOnly libs.slf4j

implementation project(":")
implementation "org.embulk:embulk-util-config:0.3.4"
implementation "org.embulk:embulk-util-csv:0.2.4"
implementation "org.embulk:embulk-util-json:0.3.0"
implementation "org.embulk:embulk-util-guess:0.3.2"
implementation "org.embulk:embulk-util-rubytime:0.3.3"
implementation "org.embulk:embulk-util-timestamp:0.2.2"

testImplementation "junit:junit:4.13.2"
testImplementation "org.embulk:embulk-spi:0.10.50"
testImplementation "org.embulk:embulk-core:0.10.50"
testImplementation "org.embulk:embulk-deps:0.10.50"
testImplementation "org.embulk:embulk-junit4:0.10.50"
testImplementation "com.google.guava:guava:18.0"

testImplementation "org.embulk:embulk-formatter-csv:0.10.42"
testImplementation "org.embulk:embulk-input-file:0.10.42"
testImplementation "org.embulk:embulk-output-file:0.10.42"
testImplementation "org.embulk:embulk-parser-csv:0.10.42"
testImplementation "org.embulk:embulk-guess-bzip2:0.10.42"
testImplementation "org.embulk:embulk-guess-gzip:0.10.42"
testImplementation "org.embulk:embulk-guess-json:0.10.42"

implementation libs.embulk.util.config
implementation libs.validation
implementation libs.bundles.jackson

implementation libs.embulk.util.csv
implementation libs.embulk.util.guess
implementation libs.embulk.util.json
implementation libs.embulk.util.rubytime
implementation libs.embulk.util.timestamp

testImplementation libs.junit4
testImplementation libs.embulk.spi
testImplementation libs.embulk.core
testImplementation libs.embulk.deps
testImplementation libs.embulk.junit4
testImplementation libs.guava

testImplementation libs.embulk.formatter.csv
testImplementation libs.embulk.input.file
testImplementation libs.embulk.output.file
testImplementation libs.embulk.parser.csv
testImplementation libs.embulk.guess.bzip2
testImplementation libs.embulk.guess.gzip
testImplementation libs.embulk.guess.json
}

embulkPlugin {
Expand Down
52 changes: 28 additions & 24 deletions embulk-guess-csv_all_strings/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id "java"
id "maven-publish"
id "signing"
id "org.embulk.embulk-plugins" version "0.5.5"
alias(libs.plugins.gradle.embulk.plugins)
id "checkstyle"
}

Expand Down Expand Up @@ -34,32 +34,36 @@ java {
}

dependencies {
compileOnly "org.embulk:embulk-spi:0.11"
compileOnly "org.slf4j:slf4j-api:2.0.7"
compileOnly libs.embulk.spi
compileOnly libs.slf4j

implementation project(":embulk-guess-csv")
implementation project(":")
implementation "org.embulk:embulk-util-config:0.3.4"
implementation "org.embulk:embulk-util-csv:0.2.4"
implementation "org.embulk:embulk-util-json:0.3.0"
implementation "org.embulk:embulk-util-guess:0.3.2"
implementation "org.embulk:embulk-util-rubytime:0.3.3"
implementation "org.embulk:embulk-util-timestamp:0.2.2"

testImplementation "junit:junit:4.13.2"
testImplementation "org.embulk:embulk-spi:0.10.44"
testImplementation "org.embulk:embulk-core:0.10.44"
testImplementation "org.embulk:embulk-deps:0.10.44"
testImplementation "org.embulk:embulk-junit4:0.10.44"
testImplementation "com.google.guava:guava:18.0"

testImplementation "org.embulk:embulk-formatter-csv:0.10.42"
testImplementation "org.embulk:embulk-input-file:0.10.42"
testImplementation "org.embulk:embulk-output-file:0.10.42"
testImplementation "org.embulk:embulk-parser-csv:0.10.42"
testImplementation "org.embulk:embulk-guess-bzip2:0.10.42"
testImplementation "org.embulk:embulk-guess-gzip:0.10.42"
testImplementation "org.embulk:embulk-guess-json:0.10.42"

implementation libs.embulk.util.config
implementation libs.validation
implementation libs.bundles.jackson

implementation libs.embulk.util.csv
implementation libs.embulk.util.guess
implementation libs.embulk.util.json
implementation libs.embulk.util.rubytime
implementation libs.embulk.util.timestamp

testImplementation libs.junit4
testImplementation libs.embulk.spi
testImplementation libs.embulk.core
testImplementation libs.embulk.deps
testImplementation libs.embulk.junit4
testImplementation libs.guava

testImplementation libs.embulk.formatter.csv
testImplementation libs.embulk.input.file
testImplementation libs.embulk.output.file
testImplementation libs.embulk.parser.csv
testImplementation libs.embulk.guess.bzip2
testImplementation libs.embulk.guess.gzip
testImplementation libs.embulk.guess.json
}

embulkPlugin {
Expand Down
78 changes: 78 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[versions]

gradle-embulk-plugins = "0.7.0"

embulk-spi = "0.11"
slf4j-api = "2.0.7"

embulk-util-config = "0.3.4"
validation-api = "1.1.0.Final"

jackson = "2.6.7"
jackson-databind = "2.6.7.5"

embulk-util-csv = "0.2.4"
embulk-util-file = "0.1.5"
embulk-util-guess = "0.3.2"
embulk-util-json = "0.3.0"
embulk-util-text = "0.1.3"
embulk-util-rubytime = "0.3.3"
embulk-util-timestamp = "0.2.2"

junit4 = "4.13.2"
embulk-core = "0.11.0"
guava = "18.0"

embulk-formatter-csv = "0.10.42"
embulk-input-file = "0.10.42"
embulk-output-file = "0.10.42"
embulk-parser-csv = "0.10.42"
embulk-guess-bzip2 = "0.10.42"
embulk-guess-csv = "0.10.42"
embulk-guess-gzip = "0.10.42"
embulk-guess-json = "0.10.42"

[libraries]

embulk-spi = { group = "org.embulk", name = "embulk-spi", version.ref = "embulk-spi" }
slf4j = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j-api" }
embulk-util-csv = { group = "org.embulk", name = "embulk-util-csv", version.ref = "embulk-util-csv" }
embulk-util-config = { group = "org.embulk", name = "embulk-util-config", version.ref = "embulk-util-config" }
embulk-util-file = { group = "org.embulk", name = "embulk-util-file", version.ref = "embulk-util-file" }
embulk-util-guess = { group = "org.embulk", name = "embulk-util-guess", version.ref = "embulk-util-guess" }
embulk-util-json = { group = "org.embulk", name = "embulk-util-json", version.ref = "embulk-util-json" }
embulk-util-text = { group = "org.embulk", name = "embulk-util-text", version.ref = "embulk-util-text" }
embulk-util-rubytime = { group = "org.embulk", name = "embulk-util-rubytime", version.ref = "embulk-util-rubytime" }
embulk-util-timestamp = { group = "org.embulk", name = "embulk-util-timestamp", version.ref = "embulk-util-timestamp" }
validation = { group = "javax.validation", name = "validation-api", version.ref = "validation-api" }
jackson-annotations = { group = "com.fasterxml.jackson.core", name = "jackson-annotations", version.ref = "jackson" }
jackson-core = { group = "com.fasterxml.jackson.core", name = "jackson-core", version.ref = "jackson" }
jackson-databind = { group = "com.fasterxml.jackson.core", name = "jackson-databind", version.ref = "jackson-databind" }
jackson-datatype-jdk8 = { group = "com.fasterxml.jackson.datatype", name = "jackson-datatype-jdk8", version.ref = "jackson" }
junit4 = { group = "junit", name = "junit", version.ref = "junit4" }
embulk-core = { group = "org.embulk", name = "embulk-core", version.ref = "embulk-core" }
embulk-deps = { group = "org.embulk", name = "embulk-deps", version.ref = "embulk-core" }
embulk-junit4 = { group = "org.embulk", name = "embulk-junit4", version.ref = "embulk-core" }
guava = { group = "com.google.guava", name = "guava", version.ref = "guava" }

embulk-formatter-csv = { group = "org.embulk", name = "embulk-formatter-csv", version.ref = "embulk-formatter-csv" }
embulk-input-file = { group = "org.embulk", name = "embulk-input-file", version.ref = "embulk-input-file" }
embulk-output-file = { group = "org.embulk", name = "embulk-output-file", version.ref = "embulk-output-file" }
embulk-parser-csv = { group = "org.embulk", name = "embulk-parser-csv", version.ref = "embulk-parser-csv" }
embulk-guess-bzip2 = { group = "org.embulk", name = "embulk-guess-bzip2", version.ref = "embulk-guess-bzip2" }
embulk-guess-csv = { group = "org.embulk", name = "embulk-guess-csv", version.ref = "embulk-guess-csv" }
embulk-guess-gzip = { group = "org.embulk", name = "embulk-guess-gzip", version.ref = "embulk-guess-gzip" }
embulk-guess-json = { group = "org.embulk", name = "embulk-guess-json", version.ref = "embulk-guess-json" }

[bundles]

jackson = [
"jackson-annotations",
"jackson-core",
"jackson-databind",
"jackson-datatype-jdk8",
]

[plugins]

gradle-embulk-plugins = { id = "org.embulk.embulk-plugins", version.ref = "gradle-embulk-plugins" }
4 changes: 4 additions & 0 deletions settings-gradle.lockfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
empty=incomingCatalogForLibs0

0 comments on commit 743da73

Please sign in to comment.