1
1
plugins {
2
- id " com.jfrog.bintray" version " 1.8.4"
3
2
id " maven-publish"
4
3
id " java"
4
+ id " signing"
5
5
id " checkstyle"
6
6
id " jacoco"
7
- id " org.embulk.embulk-plugins" version " 0.3.0 "
7
+ id " org.embulk.embulk-plugins" version " 0.4.2 "
8
8
}
9
9
10
10
repositories {
11
11
mavenCentral()
12
- jcenter()
13
12
}
14
13
15
14
group = " org.embulk"
@@ -21,27 +20,55 @@ targetCompatibility = 1.8
21
20
22
21
tasks. withType(JavaCompile ) {
23
22
options. compilerArgs << " -Xlint:deprecation" << " -Xlint:unchecked"
23
+ options. encoding = " UTF-8"
24
+ }
25
+
26
+ java {
27
+ withJavadocJar()
28
+ withSourcesJar()
24
29
}
25
30
26
31
dependencies {
27
- compileOnly " org.embulk:embulk-core:0.9.23"
28
- compile (" org.apache.commons:commons-vfs2:2.2" ) {
29
- exclude group : " commons-logging" , module : " commons-logging"
30
- }
31
- compile(" org.slf4j:jcl-over-slf4j:1.7.12" ) {
32
- exclude group : " org.slf4j" , module : " slf4j-api"
32
+ compileOnly " org.embulk:embulk-api:0.10.31"
33
+ compileOnly " org.embulk:embulk-spi:0.10.31"
34
+
35
+ compile(" org.embulk:embulk-util-config:0.3.0" ) {
36
+ // They conflict with embulk-core. They are once excluded here,
37
+ // and added explicitly with versions exactly the same with embulk-core:0.10.31.
38
+ exclude group : " com.fasterxml.jackson.core" , module : " jackson-annotations"
39
+ exclude group : " com.fasterxml.jackson.core" , module : " jackson-core"
40
+ exclude group : " com.fasterxml.jackson.core" , module : " jackson-databind"
41
+ exclude group : " com.fasterxml.jackson.datatype" , module : " jackson-datatype-jdk8"
42
+ exclude group : " javax.validation" , module : " validation-api"
33
43
}
44
+
45
+ // They are once excluded from transitive dependencies of other dependencies,
46
+ // and added explicitly with versions exactly the same with embulk-core:0.10.31.
47
+ compile " com.fasterxml.jackson.core:jackson-annotations:2.6.7"
48
+ compile " com.fasterxml.jackson.core:jackson-core:2.6.7"
49
+ compile " com.fasterxml.jackson.core:jackson-databind:2.6.7"
50
+ compile " com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.6.7"
51
+ compile " javax.validation:validation-api:1.1.0.Final"
52
+
53
+ compile " org.embulk:embulk-util-file:0.1.3"
54
+ compile " org.embulk:embulk-util-retryhelper:0.8.2"
55
+
56
+ compile " org.apache.commons:commons-vfs2:2.2"
34
57
compile " commons-io:commons-io:2.6"
35
58
compile " com.jcraft:jsch:0.1.55"
36
59
37
60
testCompile " junit:junit:4.13"
38
- testCompile " org.embulk:embulk-core :0.9.23:tests "
39
- testCompile " org.embulk:embulk-standards :0.9.23 "
40
- testCompile " org.embulk:embulk-deps-buffer :0.9.23 "
41
- testCompile " org.embulk:embulk-deps-config :0.9.23 "
61
+ testCompile " org.embulk:embulk-junit4 :0.10.31 "
62
+ testCompile " org.embulk:embulk-core :0.10.31 "
63
+ testCompile " org.embulk:embulk-core :0.10.31:tests "
64
+ testCompile " org.embulk:embulk-deps:0.10.31 "
42
65
testCompile " org.apache.sshd:apache-sshd:1.1.0"
43
66
testCompile " org.littleshoot:littleproxy:1.1.0-beta1"
44
67
testCompile " io.netty:netty-all:4.0.34.Final"
68
+
69
+ testCompile " org.embulk:embulk-formatter-csv:0.10.31"
70
+ testCompile " org.embulk:embulk-output-file:0.10.31"
71
+ testCompile " org.embulk:embulk-parser-csv:0.10.31"
45
72
}
46
73
47
74
embulkPlugin {
@@ -52,63 +79,81 @@ embulkPlugin {
52
79
53
80
javadoc {
54
81
options {
55
- locale = ' en_US'
56
- encoding = ' UTF-8'
82
+ locale = " en_US"
83
+ encoding = " UTF-8"
57
84
}
58
85
}
59
86
60
- // add tests/javadoc/source jar tasks as artifacts to be released
61
- task testsJar (type : Jar , dependsOn : classes) {
62
- classifier = ' tests'
63
- from sourceSets. test. output
87
+ jar {
88
+ from rootProject. file(" LICENSE" )
64
89
}
65
- task sourcesJar ( type : Jar , dependsOn : classes) {
66
- classifier = ' sources '
67
- from sourceSets . main . allSource
90
+
91
+ sourcesJar {
92
+ from rootProject . file( " LICENSE " )
68
93
}
69
- task javadocJar ( type : Jar , dependsOn : javadoc) {
70
- classifier = ' javadoc '
71
- from javadoc . destinationDir
94
+
95
+ javadocJar {
96
+ from rootProject . file( " LICENSE " )
72
97
}
73
98
74
99
publishing {
75
100
publications {
76
- embulkPluginMaven(MavenPublication ) { // Publish it with "publishEmbulkPluginMavenPublicationTo???Repository".
77
- from components. java
78
- artifact testsJar
79
- artifact sourcesJar
80
- artifact javadocJar
101
+ maven(MavenPublication ) {
102
+ groupId = project. group
103
+ artifactId = project. name
104
+
105
+ from components. java // Must be "components.java". The dependency modification works only for it.
106
+ // javadocJar and sourcesJar are added by java.withJavadocJar() and java.withSourcesJar() above.
107
+ // See: https://docs.gradle.org/current/javadoc/org/gradle/api/plugins/JavaPluginExtension.html
108
+
109
+ pom { // https://central.sonatype.org/pages/requirements.html
110
+ packaging " jar"
111
+
112
+ name = project. name
113
+ description = project. description
114
+ url = " https://www.embulk.org/"
115
+
116
+ licenses {
117
+ license {
118
+ // http://central.sonatype.org/pages/requirements.html#license-information
119
+ name = " The Apache License, Version 2.0"
120
+ url = " https://www.apache.org/licenses/LICENSE-2.0.txt"
121
+ }
122
+ }
123
+
124
+ developers {
125
+ }
126
+
127
+ scm {
128
+ connection = " scm:git:git://github.com/embulk/embulk-input-sftp.git"
129
+ developerConnection
= " scm:git:[email protected] :embulk/embulk-input-sftp.git"
130
+ url = " https://github.com/embulk/embulk-input-sftp"
131
+ }
132
+ }
81
133
}
82
134
}
83
- }
84
135
85
- // bintray
86
- bintray {
87
- // write at your bintray user name and api key to ~/.gradle/gradle.properties file:
88
- user = project. hasProperty(' bintray_user' ) ? bintray_user : ' '
89
- key = project. hasProperty(' bintray_api_key' ) ? bintray_api_key : ' '
90
-
91
- publications = [ " embulkPluginMaven" ]
92
- publish = true
93
-
94
- pkg {
95
- userOrg = ' embulk-input-sftp'
96
- repo = ' maven'
97
- name = project. name
98
- desc = ' SFTP file input plugin for Embulk'
99
- websiteUrl = ' https://github.com/embulk/embulk-input-sftp'
100
- issueTrackerUrl = ' https://github.com/embulk/embulk-input-sftp/issues'
101
- vcsUrl = ' https://github.com/embulk/embulk-input-sftp.git'
102
- licenses = [' Apache-2.0' ]
103
- labels = [' embulk' , ' java' ]
104
- publicDownloadNumbers = true
105
-
106
- version {
107
- name = project. version
136
+ repositories {
137
+ maven { // publishMavenPublicationToMavenCentralRepository
138
+ name = " mavenCentral"
139
+ if (project. version. endsWith(" -SNAPSHOT" )) {
140
+ url " https://oss.sonatype.org/content/repositories/snapshots"
141
+ } else {
142
+ url " https://oss.sonatype.org/service/local/staging/deploy/maven2"
143
+ }
144
+
145
+ credentials {
146
+ username = project. hasProperty(" ossrhUsername" ) ? ossrhUsername : " "
147
+ password = project. hasProperty(" ossrhPassword" ) ? ossrhPassword : " "
148
+ }
108
149
}
109
150
}
110
151
}
111
152
153
+ signing {
154
+ sign publishing. publications. maven
155
+ }
156
+
112
157
gem {
113
158
authors = [ " Satoshi Akama" ]
114
159
@@ -121,6 +166,13 @@ gemPush {
121
166
host = " https://rubygems.org"
122
167
}
123
168
169
+ test {
170
+ testLogging {
171
+ outputs. upToDateWhen { false }
172
+ showStandardStreams = true
173
+ }
174
+ }
175
+
124
176
checkstyle {
125
177
configFile = file(" ${ project.rootDir} /config/checkstyle/checkstyle.xml" )
126
178
toolVersion = ' 6.14.1'
0 commit comments