-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
120 lines (107 loc) · 3.62 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
plugins {
id "java"
id "maven-publish"
id "org.embulk.embulk-plugins" version "0.5.5"
id "com.github.johnrengelman.shadow" version "6.1.0" apply false
id "checkstyle"
id "com.palantir.git-version" version "0.12.3"
id "com.diffplug.spotless" version "6.13.0"
}
repositories {
mavenCentral()
}
group = "io.trocco"
description = "Dumps records to Kintone."
version = {
def vd = versionDetails()
if (vd.commitDistance == 0 && vd.lastTag ==~ /^[0-9]+\.[0-9]+\.[0-9]$/) {
vd.lastTag
} else {
"0.0.0.${vd.gitHash}"
}
}()
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
def embulkVersion = "0.10.39"
compileOnly "org.embulk:embulk-api:${embulkVersion}"
compileOnly "org.embulk:embulk-spi:${embulkVersion}"
implementation "org.embulk:embulk-util-config:0.3.4"
implementation "org.embulk:embulk-util-retryhelper:0.9.0"
implementation "org.embulk:embulk-util-json:0.3.0"
implementation "com.google.inject:guice:4.0"
implementation "com.google.code.externalsortinginjava:externalsortinginjava:0.6.2"
implementation 'org.apache.commons:commons-lang3:3.4'
implementation project(path: ":shadow-kintone-java-client", configuration: "shadow")
testImplementation "junit:junit:4.+"
testImplementation "org.embulk:embulk-core:${embulkVersion}"
testImplementation "org.embulk:embulk-deps:${embulkVersion}"
testImplementation "org.embulk:embulk-junit4:${embulkVersion}"
testImplementation "org.embulk:embulk-formatter-csv:${embulkVersion}"
testImplementation "org.embulk:embulk-input-file:${embulkVersion}"
testImplementation "org.embulk:embulk-parser-csv:${embulkVersion}"
testImplementation "org.mockito:mockito-inline:4.11.0"
testImplementation "net.jcip:jcip-annotations:1.0"
testImplementation 'javax.xml.bind:jaxb-api:2.3.1'
}
embulkPlugin {
mainClass = "org.embulk.output.kintone.KintoneOutputPlugin"
category = "output"
type = "kintone"
}
clean { delete "classpath" }
checkstyle {
configFile = file("${project.rootDir}/config/checkstyle/checkstyle.xml")
toolVersion = '6.14.1'
}
checkstyleMain {
configFile = file("${project.rootDir}/config/checkstyle/default.xml")
ignoreFailures = true
}
checkstyleTest {
configFile = file("${project.rootDir}/config/checkstyle/default.xml")
ignoreFailures = true
}
task checkstyle(type: Checkstyle) {
classpath = sourceSets.main.output + sourceSets.test.output
source = sourceSets.main.allJava + sourceSets.test.allJava
}
// This Gradle plugin's POM dependency modification works for "maven-publish" tasks.
//
// Note that "uploadArchives" is no longer supported. It is deprecated in Gradle 6 to be removed in Gradle 7.
// https://github.com/gradle/gradle/issues/3003#issuecomment-495025844
publishing {
publications {
embulkPluginMaven(MavenPublication) { // Publish it with "publishEmbulkPluginMavenPublicationToMavenRepository".
from components.java // Must be "components.java". The dependency modification works only for it.
}
}
repositories {
maven {
url = "${project.buildDir}/mavenPublishLocal"
}
}
}
gem {
authors = ["takeshi fujita"]
summary = "kintone output plugin for Embulk"
email = ["[email protected]"]
licenses = ["MIT"]
homepage = "https://github.com/trocco-io/embulk-output-kintone"
}
gemPush {
host = "https://rubygems.org"
}
spotless {
java {
importOrder()
removeUnusedImports()
googleJavaFormat()
formatAnnotations()
toggleOffOn()
}
}
test {
forkEvery = 1
maxHeapSize = "1g"
}