|
1 | 1 | plugins { |
2 | 2 | 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 |
9 | 6 | } |
10 | 7 |
|
11 | 8 | repositories { |
12 | 9 | mavenCentral() |
13 | 10 | } |
14 | 11 |
|
15 | | -group = "io.trocco" |
16 | | -description = "Dumps records to Kintone." |
| 12 | +group = "trocco-io" |
17 | 13 | version = { |
18 | 14 | 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]+$/) { |
20 | 16 | vd.lastTag |
21 | 17 | } else { |
22 | 18 | "0.0.0.${vd.gitHash}" |
23 | 19 | } |
24 | 20 | }() |
| 21 | +description = "Dumps records to Kintone." |
25 | 22 |
|
| 23 | +java { |
| 24 | + sourceCompatibility = JavaVersion.VERSION_1_8 |
| 25 | + targetCompatibility = JavaVersion.VERSION_1_8 |
| 26 | +} |
26 | 27 |
|
27 | | -sourceCompatibility = 1.8 |
28 | | -targetCompatibility = 1.8 |
| 28 | +configurations { |
| 29 | + compileClasspath.resolutionStrategy.activateDependencyLocking() |
| 30 | + runtimeClasspath.resolutionStrategy.activateDependencyLocking() |
| 31 | +} |
29 | 32 |
|
30 | 33 | dependencies { |
31 | | - def embulkVersion = "0.10.39" |
| 34 | + compileOnly "org.embulk:embulk-spi:0.11" |
32 | 35 |
|
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 |
36 | 38 | 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 |
40 | 41 | 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") |
43 | 44 |
|
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 |
52 | 52 | 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" |
54 | 57 | } |
55 | 58 |
|
56 | 59 | embulkPlugin { |
57 | 60 | mainClass = "org.embulk.output.kintone.KintoneOutputPlugin" |
58 | 61 | category = "output" |
59 | 62 | 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 |
78 | 63 | } |
79 | 64 |
|
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 | | -} |
96 | 65 | gem { |
97 | | - authors = ["takeshi fujita"] |
| 66 | + authors = [ "takeshi fujita" ] |
| 67 | + email = [ "tksfjt1024@gmail.com" ] |
98 | 68 | summary = "kintone output plugin for Embulk" |
99 | | - email = ["tksfjt1024@gmail.com"] |
100 | | - licenses = ["MIT"] |
101 | 69 | homepage = "https://github.com/trocco-io/embulk-output-kintone" |
102 | | -} |
103 | | -gemPush { |
104 | | - host = "https://rubygems.org" |
| 70 | + licenses = [ "MIT" ] |
| 71 | + from("LICENSE.txt") |
105 | 72 | } |
106 | 73 |
|
107 | 74 | spotless { |
|
0 commit comments