Skip to content

Commit 5f0f392

Browse files
committed
Upgrade the Gradle wrapper to 7.6.1, with enabling the Java toolchain
* Use modern dependency lock file. * Update embulk-{core|junit4|deps|spi} to 0.10.49 * Update embulk-util-config to 0.3.3 * Update embulk-util-json to 0.2.1 * Update embulk-util-timestamp to 0.2.2 * Update gradle-embulk-plugins to 0.5.5 * Update embulk-formatter-csv: to 0.10.42 * Update embulk-input-file: to 0.10.42 * Update embulk-output-file: to 0.10.42 * Update embulk-parser-csv: to 0.10.42
1 parent 2222f6e commit 5f0f392

File tree

25 files changed

+369
-289
lines changed

25 files changed

+369
-289
lines changed

build.gradle

+20-20
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
id "maven-publish"
77
id "signing"
88
id 'checkstyle'
9-
id "org.embulk.embulk-plugins" version "0.4.2" apply false
9+
id "org.embulk.embulk-plugins" version "0.5.5" apply false
1010
}
1111

1212
allprojects {
@@ -30,24 +30,23 @@ subprojects {
3030
defaultJdbcDriver
3131
}
3232

33-
sourceCompatibility = 1.8
34-
targetCompatibility = 1.8
35-
3633
tasks.withType(JavaCompile) {
3734
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
3835
options.encoding = "UTF-8"
3936
}
4037

4138
java {
39+
toolchain {
40+
languageVersion = JavaLanguageVersion.of(8)
41+
}
4242
withJavadocJar()
4343
withSourcesJar()
4444
}
4545

4646
dependencies {
47-
compileOnly "org.embulk:embulk-api:0.10.31"
48-
compileOnly "org.embulk:embulk-spi:0.10.31"
47+
compileOnly "org.embulk:embulk-spi:0.10.49"
4948

50-
compile("org.embulk:embulk-util-config:0.3.0") {
49+
implementation("org.embulk:embulk-util-config:0.3.3") {
5150
// They conflict with embulk-core. They are once excluded here,
5251
// and added explicitly with versions exactly the same with embulk-core:0.10.31.
5352
exclude group: "com.fasterxml.jackson.core", module: "jackson-annotations"
@@ -59,19 +58,20 @@ subprojects {
5958

6059
// They are once excluded from transitive dependencies of other dependencies,
6160
// and added explicitly with versions exactly the same with embulk-core:0.10.31.
62-
compile "com.fasterxml.jackson.core:jackson-annotations:2.6.7"
63-
compile "com.fasterxml.jackson.core:jackson-core:2.6.7"
64-
compile "com.fasterxml.jackson.core:jackson-databind:2.6.7"
65-
compile "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.6.7"
66-
compile "javax.validation:validation-api:1.1.0.Final"
67-
68-
compile "org.embulk:embulk-util-json:0.1.1"
69-
compile "org.embulk:embulk-util-timestamp:0.2.1"
70-
compile "org.embulk:embulk-util-retryhelper:0.8.2"
71-
72-
testCompile "org.embulk:embulk-junit4:0.10.31"
73-
testCompile "org.embulk:embulk-core:0.10.31"
74-
testCompile "org.embulk:embulk-deps:0.10.31"
61+
implementation "com.fasterxml.jackson.core:jackson-annotations:2.6.7"
62+
implementation "com.fasterxml.jackson.core:jackson-core:2.6.7"
63+
implementation "com.fasterxml.jackson.core:jackson-databind:2.6.7"
64+
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.6.7"
65+
implementation "javax.validation:validation-api:1.1.0.Final"
66+
67+
implementation "org.embulk:embulk-util-json:0.2.1"
68+
implementation "org.embulk:embulk-util-timestamp:0.2.2"
69+
implementation "org.embulk:embulk-util-retryhelper:0.8.2"
70+
71+
testImplementation "org.embulk:embulk-junit4:0.10.49"
72+
testImplementation "org.embulk:embulk-core:0.10.49"
73+
testImplementation "org.embulk:embulk-deps:0.10.49"
74+
testImplementation "com.google.guava:guava:18.0" // TODO will remove after replace guava
7575
}
7676

7777
test {

embulk-output-jdbc/gradle.lockfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
com.fasterxml.jackson.core:jackson-annotations:2.6.7=compileClasspath,runtimeClasspath
5+
com.fasterxml.jackson.core:jackson-core:2.6.7=compileClasspath,runtimeClasspath
6+
com.fasterxml.jackson.core:jackson-databind:2.6.7=compileClasspath,runtimeClasspath
7+
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.6.7=compileClasspath,runtimeClasspath
8+
javax.validation:validation-api:1.1.0.Final=compileClasspath,runtimeClasspath
9+
org.embulk:embulk-spi:0.10.49=compileClasspath
10+
org.embulk:embulk-util-config:0.3.3=compileClasspath,runtimeClasspath
11+
org.embulk:embulk-util-json:0.2.1=compileClasspath,runtimeClasspath
12+
org.embulk:embulk-util-retryhelper:0.8.2=compileClasspath,runtimeClasspath
13+
org.embulk:embulk-util-rubytime:0.3.3=compileClasspath,runtimeClasspath
14+
org.embulk:embulk-util-timestamp:0.2.2=compileClasspath,runtimeClasspath
15+
org.msgpack:msgpack-core:0.8.24=compileClasspath
16+
org.slf4j:slf4j-api:2.0.7=compileClasspath
17+
empty=

embulk-output-jdbc/gradle/dependency-locks/embulkPluginRuntime.lockfile

-13
This file was deleted.

embulk-output-mysql/build.gradle

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
dependencies {
2-
compile(project(path: ":embulk-output-jdbc", configuration: "runtimeElements"))
2+
implementation(project(path: ":embulk-output-jdbc", configuration: "runtimeElements"))
33

44
compileOnly "mysql:mysql-connector-java:5.1.44"
55
defaultJdbcDriver 'mysql:mysql-connector-java:5.1.44'
66

7-
testCompile "mysql:mysql-connector-java:5.1.44"
7+
testImplementation "mysql:mysql-connector-java:5.1.44"
88

9-
testCompile "org.embulk:embulk-formatter-csv:0.10.31"
10-
testCompile "org.embulk:embulk-input-file:0.10.31"
11-
testCompile "org.embulk:embulk-output-file:0.10.31"
12-
testCompile "org.embulk:embulk-parser-csv:0.10.31"
9+
testImplementation "org.embulk:embulk-formatter-csv:0.10.42"
10+
testImplementation "org.embulk:embulk-input-file:0.10.42"
11+
testImplementation "org.embulk:embulk-output-file:0.10.42"
12+
testImplementation "org.embulk:embulk-parser-csv:0.10.42"
1313
}
1414

1515
embulkPlugin {

embulk-output-mysql/gradle.lockfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
com.fasterxml.jackson.core:jackson-annotations:2.6.7=compileClasspath,runtimeClasspath
5+
com.fasterxml.jackson.core:jackson-core:2.6.7=compileClasspath,runtimeClasspath
6+
com.fasterxml.jackson.core:jackson-databind:2.6.7=compileClasspath,runtimeClasspath
7+
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.6.7=compileClasspath,runtimeClasspath
8+
javax.validation:validation-api:1.1.0.Final=compileClasspath,runtimeClasspath
9+
mysql:mysql-connector-java:5.1.44=compileClasspath
10+
org.embulk:embulk-spi:0.10.49=compileClasspath
11+
org.embulk:embulk-util-config:0.3.3=compileClasspath,runtimeClasspath
12+
org.embulk:embulk-util-json:0.2.1=compileClasspath,runtimeClasspath
13+
org.embulk:embulk-util-retryhelper:0.8.2=compileClasspath,runtimeClasspath
14+
org.embulk:embulk-util-rubytime:0.3.3=compileClasspath,runtimeClasspath
15+
org.embulk:embulk-util-timestamp:0.2.2=compileClasspath,runtimeClasspath
16+
org.msgpack:msgpack-core:0.8.24=compileClasspath
17+
org.slf4j:slf4j-api:2.0.7=compileClasspath
18+
empty=

embulk-output-mysql/gradle/dependency-locks/embulkPluginRuntime.lockfile

-13
This file was deleted.

embulk-output-mysql/src/test/java/org/embulk/output/mysql/AfterLoadTest.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232

3333
public class AfterLoadTest
3434
{
35-
private static final String BASIC_RESOURCE_PATH = "org/embulk/output/mysql/test/expect/after_load/";
35+
private static final String BASIC_RESOURCE_NAME = "org/embulk/output/mysql/test/expect/after_load/";
36+
private static final String BASIC_RESOURCE_PATH = "/" + BASIC_RESOURCE_NAME;
3637

3738
private static ConfigSource loadYamlResource(TestingEmbulk embulk, String fileName)
3839
{
@@ -140,7 +141,7 @@ public void testMergeDirectAfterLoad() throws Exception
140141

141142
private Path toPath(String fileName) throws URISyntaxException
142143
{
143-
URL url = Resources.getResource(BASIC_RESOURCE_PATH + fileName);
144+
URL url = Resources.getResource(BASIC_RESOURCE_NAME + fileName);
144145
return FileSystems.getDefault().getPath(new File(url.toURI()).getAbsolutePath());
145146
}
146147

embulk-output-mysql/src/test/java/org/embulk/output/mysql/BasicTest.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import static org.embulk.output.mysql.MySQLTests.selectRecords;
55
import static org.hamcrest.Matchers.is;
66
import static org.hamcrest.Matchers.instanceOf;
7-
import static org.junit.Assert.assertThat;
7+
import static org.hamcrest.MatcherAssert.assertThat;
88
import static org.junit.Assert.fail;
99

1010
import java.io.File;
@@ -37,7 +37,8 @@
3737

3838
public class BasicTest
3939
{
40-
private static final String BASIC_RESOURCE_PATH = "org/embulk/output/mysql/test/expect/basic/";
40+
private static final String BASIC_RESOURCE_NAME = "org/embulk/output/mysql/test/expect/basic/";
41+
private static final String BASIC_RESOURCE_PATH = "/" + BASIC_RESOURCE_NAME;
4142

4243
private static ConfigSource loadYamlResource(TestingEmbulk embulk, String fileName)
4344
{
@@ -105,7 +106,7 @@ public void testInvalidTimeZone() throws Exception
105106

106107
private Path toPath(String fileName) throws URISyntaxException
107108
{
108-
URL url = Resources.getResource(BASIC_RESOURCE_PATH + fileName);
109+
URL url = Resources.getResource(BASIC_RESOURCE_NAME + fileName);
109110
return FileSystems.getDefault().getPath(new File(url.toURI()).getAbsolutePath());
110111
}
111112
}

embulk-output-mysql/src/test/java/org/embulk/output/mysql/BeforeLoadTest.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import static org.embulk.output.mysql.MySQLTests.execute;
44
import static org.hamcrest.Matchers.is;
5-
import static org.junit.Assert.assertThat;
5+
import static org.hamcrest.MatcherAssert.assertThat;
66

77
import java.io.File;
88
import java.net.URISyntaxException;
@@ -32,7 +32,8 @@
3232

3333
public class BeforeLoadTest
3434
{
35-
private static final String BASIC_RESOURCE_PATH = "org/embulk/output/mysql/test/expect/before_load/";
35+
private static final String BASIC_RESOURCE_NAME = "org/embulk/output/mysql/test/expect/before_load/";
36+
private static final String BASIC_RESOURCE_PATH = "/" + BASIC_RESOURCE_NAME;
3637

3738
private static ConfigSource loadYamlResource(TestingEmbulk embulk, String fileName)
3839
{
@@ -128,7 +129,7 @@ public void testMergeDirectBeforeLoad() throws Exception
128129

129130
private Path toPath(String fileName) throws URISyntaxException
130131
{
131-
URL url = Resources.getResource(BASIC_RESOURCE_PATH + fileName);
132+
URL url = Resources.getResource(BASIC_RESOURCE_NAME + fileName);
132133
return FileSystems.getDefault().getPath(new File(url.toURI()).getAbsolutePath());
133134
}
134135

embulk-output-mysql/src/test/java/org/embulk/output/mysql/CreateTableTest.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import static org.embulk.output.mysql.MySQLTests.execute;
44
import static org.embulk.output.mysql.MySQLTests.selectRecords;
55
import static org.hamcrest.Matchers.is;
6-
import static org.junit.Assert.assertThat;
6+
import static org.hamcrest.MatcherAssert.assertThat;
77

88
import java.io.File;
99
import java.net.URISyntaxException;
@@ -33,7 +33,8 @@
3333

3434
public class CreateTableTest
3535
{
36-
private static final String BASIC_RESOURCE_PATH = "org/embulk/output/mysql/test/expect/create_table/";
36+
private static final String BASIC_RESOURCE_NAME = "org/embulk/output/mysql/test/expect/create_table/";
37+
private static final String BASIC_RESOURCE_PATH = "/" + BASIC_RESOURCE_NAME;
3738

3839
private static ConfigSource loadYamlResource(TestingEmbulk embulk, String fileName)
3940
{
@@ -84,7 +85,7 @@ public void testTableConstraint() throws Exception
8485

8586
private Path toPath(String fileName) throws URISyntaxException
8687
{
87-
URL url = Resources.getResource(BASIC_RESOURCE_PATH + fileName);
88+
URL url = Resources.getResource(BASIC_RESOURCE_NAME + fileName);
8889
return FileSystems.getDefault().getPath(new File(url.toURI()).getAbsolutePath());
8990
}
9091

embulk-output-mysql/src/test/java/org/embulk/output/mysql/RetryTest.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import static org.embulk.output.mysql.MySQLTests.execute;
44
import static org.embulk.output.mysql.MySQLTests.selectRecords;
55
import static org.hamcrest.Matchers.is;
6-
import static org.junit.Assert.assertThat;
6+
import static org.hamcrest.MatcherAssert.assertThat;
77

88
import java.io.BufferedWriter;
99
import java.io.File;
@@ -43,7 +43,8 @@ private static class Lock
4343
public boolean enabled = true;
4444
}
4545

46-
private static final String BASIC_RESOURCE_PATH = "org/embulk/output/mysql/test/expect/retry/";
46+
private static final String BASIC_RESOURCE_NAME = "org/embulk/output/mysql/test/expect/retry/";
47+
private static final String BASIC_RESOURCE_PATH = "/" + BASIC_RESOURCE_NAME;
4748

4849
private static ConfigSource loadYamlResource(TestingEmbulk embulk, String fileName)
4950
{
@@ -386,7 +387,7 @@ public void run() {
386387

387388
private Path toPath(String fileName) throws URISyntaxException
388389
{
389-
URL url = Resources.getResource(BASIC_RESOURCE_PATH + fileName);
390+
URL url = Resources.getResource(BASIC_RESOURCE_NAME + fileName);
390391
return FileSystems.getDefault().getPath(new File(url.toURI()).getAbsolutePath());
391392
}
392393

embulk-output-postgresql/build.gradle

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
dependencies {
2-
compile(project(path: ":embulk-output-jdbc", configuration: "runtimeElements"))
2+
implementation(project(path: ":embulk-output-jdbc", configuration: "runtimeElements"))
33

44
compileOnly "org.postgresql:postgresql:9.4-1205-jdbc41"
55
defaultJdbcDriver 'org.postgresql:postgresql:9.4-1205-jdbc41'
66

7-
testCompile project(':embulk-output-jdbc').sourceSets.test.output
8-
testCompile "org.postgresql:postgresql:9.4-1205-jdbc41"
7+
testImplementation project(':embulk-output-jdbc').sourceSets.test.output
8+
testImplementation "org.postgresql:postgresql:9.4-1205-jdbc41"
99

10-
testCompile "org.embulk:embulk-formatter-csv:0.10.31"
11-
testCompile "org.embulk:embulk-input-file:0.10.31"
12-
testCompile "org.embulk:embulk-output-file:0.10.31"
13-
testCompile "org.embulk:embulk-parser-csv:0.10.31"
10+
testImplementation "org.embulk:embulk-formatter-csv:0.10.42"
11+
testImplementation "org.embulk:embulk-input-file:0.10.42"
12+
testImplementation "org.embulk:embulk-output-file:0.10.42"
13+
testImplementation "org.embulk:embulk-parser-csv:0.10.42"
1414
}
1515

1616
embulkPlugin {
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
com.fasterxml.jackson.core:jackson-annotations:2.6.7=compileClasspath,runtimeClasspath
5+
com.fasterxml.jackson.core:jackson-core:2.6.7=compileClasspath,runtimeClasspath
6+
com.fasterxml.jackson.core:jackson-databind:2.6.7=compileClasspath,runtimeClasspath
7+
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.6.7=compileClasspath,runtimeClasspath
8+
javax.validation:validation-api:1.1.0.Final=compileClasspath,runtimeClasspath
9+
org.embulk:embulk-spi:0.10.49=compileClasspath
10+
org.embulk:embulk-util-config:0.3.3=compileClasspath,runtimeClasspath
11+
org.embulk:embulk-util-json:0.2.1=compileClasspath,runtimeClasspath
12+
org.embulk:embulk-util-retryhelper:0.8.2=compileClasspath,runtimeClasspath
13+
org.embulk:embulk-util-rubytime:0.3.3=compileClasspath,runtimeClasspath
14+
org.embulk:embulk-util-timestamp:0.2.2=compileClasspath,runtimeClasspath
15+
org.msgpack:msgpack-core:0.8.24=compileClasspath
16+
org.postgresql:postgresql:9.4-1205-jdbc41=compileClasspath
17+
org.slf4j:slf4j-api:2.0.7=compileClasspath
18+
empty=

embulk-output-postgresql/gradle/dependency-locks/embulkPluginRuntime.lockfile

-13
This file was deleted.

embulk-output-postgresql/src/test/java/org/embulk/output/postgresql/BasicTest.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import static org.embulk.output.postgresql.PostgreSQLTests.execute;
44
import static org.embulk.output.postgresql.PostgreSQLTests.selectRecords;
55
import static org.hamcrest.Matchers.is;
6-
import static org.junit.Assert.assertThat;
6+
import static org.hamcrest.MatcherAssert.assertThat;
77

88
import java.io.File;
99
import java.io.IOException;
@@ -34,7 +34,8 @@
3434

3535
public class BasicTest
3636
{
37-
private static final String BASIC_RESOURCE_PATH = "org/embulk/output/postgresql/test/expect/basic/";
37+
private static final String BASIC_RESOURCE_NAME = "org/embulk/output/postgresql/test/expect/basic/";
38+
private static final String BASIC_RESOURCE_PATH = "/" + BASIC_RESOURCE_NAME;
3839

3940
private static ConfigSource loadYamlResource(TestingEmbulk embulk, String fileName)
4041
{
@@ -43,7 +44,8 @@ private static ConfigSource loadYamlResource(TestingEmbulk embulk, String fileNa
4344

4445
private static String readResource(String fileName)
4546
{
46-
return EmbulkTests.readResource(BASIC_RESOURCE_PATH + fileName);
47+
String ret = EmbulkTests.readResource(BASIC_RESOURCE_PATH + fileName);
48+
return ret;
4749
}
4850

4951
@Rule
@@ -141,7 +143,7 @@ public void testReplace() throws Exception
141143

142144
private Path toPath(String fileName) throws URISyntaxException
143145
{
144-
URL url = Resources.getResource(BASIC_RESOURCE_PATH + fileName);
146+
URL url = Resources.getResource(BASIC_RESOURCE_NAME + fileName);
145147
return FileSystems.getDefault().getPath(new File(url.toURI()).getAbsolutePath());
146148
}
147149

0 commit comments

Comments
 (0)