Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start using Gradle version catalog #57

Merged
merged 1 commit into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 33 additions & 28 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
plugins {
id "java"
id "checkstyle"
id "jacoco"
id "signing"
id "maven-publish"
id "org.embulk.embulk-plugins" version "0.7.0"
id "signing"
alias(libs.plugins.gradle.embulk.plugins)
id "checkstyle"
}

repositories {
mavenCentral()
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

group = "org.embulk"
version = "0.5.0-SNAPSHOT"
description = "Reads files stored on Google Cloud Storage."

configurations {
compileClasspath.resolutionStrategy.activateDependencyLocking()
runtimeClasspath.resolutionStrategy.activateDependencyLocking()
}

tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
options.encoding = "UTF-8"
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}

withJavadocJar()
withSourcesJar()
}

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

implementation('org.embulk:embulk-util-config:0.3.1') {
implementation(libs.embulk.util.config) {
// Conflict with Embulk Core
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-annotations'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
Expand All @@ -44,38 +50,37 @@ dependencies {
// while embulk-core has had jackson-core/annotations/databind 2.6.7. Safer to have the combat-tested version as of now.
//
// It (and other Jackson sublibraries) will be replaced with the latest Jackson after Embulk v0.10.32 and later get popular.
implementation "com.fasterxml.jackson.core:jackson-core:2.9.6"
implementation libs.jackson.core

implementation 'com.fasterxml.jackson.core:jackson-annotations:2.6.7'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.6.7'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.6.7'
implementation 'javax.validation:validation-api:1.1.0.Final'
implementation libs.jackson.annotations
implementation libs.jackson.databind
implementation libs.jackson.datatype.jdk8
implementation libs.validation

implementation "org.embulk:embulk-util-file:0.1.3"
implementation('org.embulk:embulk-util-retryhelper:0.8.1') {
exclude group: 'org.slf4j', module: 'slf4j-api'
implementation libs.embulk.util.file
implementation(libs.embulk.util.retryhelper) {
exclude group: "org.slf4j", module: "slf4j-api"
}

implementation("com.google.cloud:google-cloud-storage:1.56.0") {
implementation(libs.google.cloud.storage) {
exclude group: "commons-logging", module: "commons-logging"
}

// Instead of "commons-logging:commons-logging:1.2" that is required from "google-cloud-storage",
// we use "jcl-over-slf4j" because Embulk is based on SLF4J.
implementation("org.slf4j:jcl-over-slf4j:1.7.12") {
implementation(libs.jcl.over.slf4j) {
// slf4j-api is in embulk-core / embulk-api.
exclude group: "org.slf4j", module: "slf4j-api"
}

testImplementation "junit:junit:4.12"
testImplementation "org.embulk:embulk-core:0.11.4"
testImplementation "org.embulk:embulk-deps:0.11.4"
testImplementation "org.embulk:embulk-junit4:0.11.4"
testImplementation "org.mockito:mockito-core:2.18.3"
testImplementation 'com.google.code.findbugs:annotations:3.0.0'
testImplementation "org.embulk:embulk-formatter-csv:0.10.36"
testImplementation "org.embulk:embulk-output-file:0.10.36"
testImplementation "org.embulk:embulk-parser-csv:0.10.36"
testImplementation libs.junit4
testImplementation libs.embulk.core
testImplementation libs.embulk.deps
testImplementation libs.embulk.junit4
testImplementation libs.mockito.core
testImplementation libs.embulk.formatter.csv
testImplementation libs.embulk.output.file
testImplementation libs.embulk.parser.csv
}

embulkPlugin {
Expand Down
2 changes: 1 addition & 1 deletion gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ org.apache.httpcomponents:httpcore:4.4.9=compileClasspath,runtimeClasspath
org.checkerframework:checker-compat-qual:2.5.2=compileClasspath,runtimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.14=compileClasspath,runtimeClasspath
org.embulk:embulk-spi:0.11=compileClasspath
org.embulk:embulk-util-config:0.3.1=compileClasspath,runtimeClasspath
org.embulk:embulk-util-config:0.3.0=compileClasspath,runtimeClasspath
org.embulk:embulk-util-file:0.1.3=compileClasspath,runtimeClasspath
org.embulk:embulk-util-retryhelper:0.8.1=compileClasspath,runtimeClasspath
org.msgpack:msgpack-core:0.8.24=compileClasspath
Expand Down
51 changes: 51 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[versions]

gradle-embulk-plugins = "0.7.0"

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

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

embulk-util-file = "0.1.3"
embulk-util-retryhelper = "0.8.1"

google-cloud-storage = "1.56.0"

jcl-over-slf4j = "1.7.12"

junit4 = "4.12"
mockito = "2.18.3"

embulk-core = "0.11.4"
embulk-formatter-csv = "0.10.36"
embulk-output-file = "0.10.36"
embulk-parser-csv = "0.10.36"

[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-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-retryhelper = { group = "org.embulk", name = "embulk-util-retryhelper", version.ref = "embulk-util-retryhelper" }
validation = { group = "javax.validation", name = "validation-api", version.ref = "validation-api" }
jackson-annotations = { group = "com.fasterxml.jackson.core", name = "jackson-annotations", version = "2.6.7" }
jackson-core = { group = "com.fasterxml.jackson.core", name = "jackson-core", version = "2.9.6" }
jackson-databind = { group = "com.fasterxml.jackson.core", name = "jackson-databind", version = "2.6.7" }
jackson-datatype-jdk8 = { group = "com.fasterxml.jackson.datatype", name = "jackson-datatype-jdk8", version = "2.6.7" }
google-cloud-storage = { group = "com.google.cloud", name = "google-cloud-storage", version.ref = "google-cloud-storage" }
jcl-over-slf4j = { group = "org.slf4j", name = "jcl-over-slf4j", version.ref = "jcl-over-slf4j" }
junit4 = { group = "junit", name = "junit", version.ref = "junit4" }
mockito-core = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" }
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" }
embulk-formatter-csv = { group = "org.embulk", name = "embulk-formatter-csv", version.ref = "embulk-formatter-csv" }
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" }

[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
2 changes: 0 additions & 2 deletions src/test/java/org/embulk/input/gcs/TestAuthUtils.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.embulk.input.gcs;

import com.google.auth.Credentials;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.embulk.config.ConfigException;
import org.embulk.config.ConfigSource;
import org.embulk.test.EmbulkTestRuntime;
Expand Down Expand Up @@ -55,7 +54,6 @@ public static void initializeConstant()
GCP_BUCKET = gcpBucket;
}

@SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
@Rule
public EmbulkTestRuntime runtime = new EmbulkTestRuntime();
private ConfigSource config;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.google.cloud.storage.Storage;
import com.google.common.base.Charsets;
import com.google.common.io.Files;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.embulk.test.EmbulkTestRuntime;
import org.embulk.util.file.ResumableInputStream;
import org.junit.Rule;
Expand Down Expand Up @@ -79,7 +78,6 @@ public int read(ByteBuffer dst) throws IOException

private static final String SAMPLE_PATH = TestInputStreamReopener.class.getResource("/sample_01.csv").getPath();

@SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
@Rule
public EmbulkTestRuntime runtime = new EmbulkTestRuntime();

Expand Down
2 changes: 0 additions & 2 deletions src/test/java/org/embulk/input/gcs/TestRetryUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import com.google.api.client.testing.http.MockLowLevelHttpRequest;
import com.google.api.client.testing.http.MockLowLevelHttpResponse;
import com.google.cloud.storage.StorageException;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.embulk.test.EmbulkTestRuntime;
import org.junit.Before;
import org.junit.Rule;
Expand All @@ -34,7 +33,6 @@

public class TestRetryUtils
{
@SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
@Rule
public EmbulkTestRuntime runtime = new EmbulkTestRuntime();

Expand Down