Skip to content

Commit c591c77

Browse files
committed
Miscellaneous reviews and modifies
1 parent b98553c commit c591c77

35 files changed

+399
-551
lines changed

Rakefile

Lines changed: 0 additions & 6 deletions
This file was deleted.

build.gradle

Lines changed: 36 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,74 @@
11
plugins {
22
id "java"
3-
id "maven-publish"
4-
id "org.embulk.embulk-plugins" version "0.5.5"
5-
id "com.github.johnrengelman.shadow" version "6.1.0" apply false
6-
id "checkstyle"
7-
id "com.palantir.git-version" version "0.12.3"
8-
id "com.diffplug.spotless" version "6.13.0"
3+
id "org.embulk.embulk-plugins" version "0.7.0"
4+
id "com.palantir.git-version" version "3.1.0"
5+
id "com.diffplug.spotless" version "6.13.0" // Downgrade to match Java 8
96
}
107

118
repositories {
129
mavenCentral()
1310
}
1411

15-
group = "io.trocco"
16-
description = "Dumps records to Kintone."
12+
group = "trocco-io"
1713
version = {
1814
def vd = versionDetails()
19-
if (vd.commitDistance == 0 && vd.lastTag ==~ /^[0-9]+\.[0-9]+\.[0-9]$/) {
15+
if (vd.commitDistance == 0 && vd.lastTag ==~ /^[0-9]+\.[0-9]+\.[0-9]+$/) {
2016
vd.lastTag
2117
} else {
2218
"0.0.0.${vd.gitHash}"
2319
}
2420
}()
21+
description = "Dumps records to Kintone."
2522

23+
java {
24+
sourceCompatibility = JavaVersion.VERSION_1_8
25+
targetCompatibility = JavaVersion.VERSION_1_8
26+
}
2627

27-
sourceCompatibility = 1.8
28-
targetCompatibility = 1.8
28+
configurations {
29+
compileClasspath.resolutionStrategy.activateDependencyLocking()
30+
runtimeClasspath.resolutionStrategy.activateDependencyLocking()
31+
}
2932

3033
dependencies {
31-
def embulkVersion = "0.10.39"
34+
compileOnly "org.embulk:embulk-spi:0.11"
3235

33-
compileOnly "org.embulk:embulk-api:${embulkVersion}"
34-
compileOnly "org.embulk:embulk-spi:${embulkVersion}"
35-
implementation "org.embulk:embulk-util-config:0.3.4"
36+
implementation "org.embulk:embulk-util-config:0.3.4" // Downgrade for compatibility with Embulk v0.9
37+
implementation "org.embulk:embulk-util-json:0.3.0" // Downgrade for compatibility with Embulk v0.9
3638
implementation "org.embulk:embulk-util-retryhelper:0.9.0"
37-
implementation "org.embulk:embulk-util-json:0.3.0"
38-
39-
implementation "com.google.inject:guice:4.0"
39+
implementation "org.apache.commons:commons-lang3:3.4" // Downgrade to match Embulk runtime
40+
implementation "com.google.guava:guava:18.0" // Downgrade to match Embulk runtime
4041
implementation "com.google.code.externalsortinginjava:externalsortinginjava:0.6.2"
41-
implementation 'org.apache.commons:commons-lang3:3.4'
42-
implementation project(path: ":shadow-kintone-java-client", configuration: "shadow")
42+
// implementation "com.kintone:kintone-java-client:1.4.0"
43+
implementation project(path: ":shadow", configuration: "shadow")
4344

44-
testImplementation "junit:junit:4.+"
45-
testImplementation "org.embulk:embulk-core:${embulkVersion}"
46-
testImplementation "org.embulk:embulk-deps:${embulkVersion}"
47-
testImplementation "org.embulk:embulk-junit4:${embulkVersion}"
48-
testImplementation "org.embulk:embulk-formatter-csv:${embulkVersion}"
49-
testImplementation "org.embulk:embulk-input-file:${embulkVersion}"
50-
testImplementation "org.embulk:embulk-parser-csv:${embulkVersion}"
51-
testImplementation "org.mockito:mockito-inline:4.11.0"
45+
testImplementation "org.embulk:embulk-spi:0.11"
46+
testImplementation "org.embulk:embulk-deps:0.11.5"
47+
testImplementation "org.embulk:embulk-input-file:0.11.0" // Downgrade to match the version of embulk-util-config
48+
testImplementation "org.embulk:embulk-parser-csv:0.11.4" // Downgrade to match the version of embulk-util-config & embulk-util-json
49+
testImplementation "org.embulk:embulk-junit4:0.11.5"
50+
testImplementation "org.mockito:mockito-inline:4.11.0" // Downgrade to match Java 8
51+
testImplementation "ch.qos.logback:logback-classic:1.3.15" // Downgrade to match Java 8
5252
testImplementation "net.jcip:jcip-annotations:1.0"
53-
testImplementation 'javax.xml.bind:jaxb-api:2.3.1'
53+
}
54+
55+
tasks.withType(JavaCompile).configureEach {
56+
options.compilerArgs << "-Xlint:all" << "-Xlint:-serial"
5457
}
5558

5659
embulkPlugin {
5760
mainClass = "org.embulk.output.kintone.KintoneOutputPlugin"
5861
category = "output"
5962
type = "kintone"
60-
}
61-
clean { delete "classpath" }
62-
63-
checkstyle {
64-
configFile = file("${project.rootDir}/config/checkstyle/checkstyle.xml")
65-
toolVersion = '6.14.1'
66-
}
67-
checkstyleMain {
68-
configFile = file("${project.rootDir}/config/checkstyle/default.xml")
69-
ignoreFailures = true
70-
}
71-
checkstyleTest {
72-
configFile = file("${project.rootDir}/config/checkstyle/default.xml")
73-
ignoreFailures = true
74-
}
75-
task checkstyle(type: Checkstyle) {
76-
classpath = sourceSets.main.output + sourceSets.test.output
77-
source = sourceSets.main.allJava + sourceSets.test.allJava
7863
}
7964

80-
// This Gradle plugin's POM dependency modification works for "maven-publish" tasks.
81-
//
82-
// Note that "uploadArchives" is no longer supported. It is deprecated in Gradle 6 to be removed in Gradle 7.
83-
// https://github.com/gradle/gradle/issues/3003#issuecomment-495025844
84-
publishing {
85-
publications {
86-
embulkPluginMaven(MavenPublication) { // Publish it with "publishEmbulkPluginMavenPublicationToMavenRepository".
87-
from components.java // Must be "components.java". The dependency modification works only for it.
88-
}
89-
}
90-
repositories {
91-
maven {
92-
url = "${project.buildDir}/mavenPublishLocal"
93-
}
94-
}
95-
}
9665
gem {
97-
authors = ["takeshi fujita"]
66+
authors = [ "takeshi fujita" ]
67+
email = [ "tksfjt1024@gmail.com" ]
9868
summary = "kintone output plugin for Embulk"
99-
email = ["tksfjt1024@gmail.com"]
100-
licenses = ["MIT"]
10169
homepage = "https://github.com/trocco-io/embulk-output-kintone"
102-
}
103-
gemPush {
104-
host = "https://rubygems.org"
70+
licenses = [ "MIT" ]
71+
from("LICENSE.txt")
10572
}
10673

10774
spotless {

config/checkstyle/checkstyle.xml

Lines changed: 0 additions & 128 deletions
This file was deleted.

config/checkstyle/default.xml

Lines changed: 0 additions & 108 deletions
This file was deleted.

0 commit comments

Comments
 (0)