1
1
plugins {
2
- id " com.jfrog.bintray" version " 1.7 "
2
+ id " com.jfrog.bintray" version " 1.8.4 "
3
3
id " maven-publish"
4
- id " com.github.jruby-gradle.base" version " 0.1.5"
5
4
id " java"
6
5
id " checkstyle"
7
6
id " jacoco"
7
+ id " org.embulk.embulk-plugins" version " 0.3.0"
8
8
}
9
- import com.github.jrubygradle.JRubyExec
9
+
10
10
repositories {
11
11
mavenCentral()
12
12
jcenter()
13
13
}
14
- configurations {
15
- provided
16
- }
17
14
18
15
group = " org.embulk.input.sftp"
19
- version = " 0.3.2"
16
+ version = " 0.3.3"
17
+ description = " Reads files stored on remote server using SFTP."
20
18
21
19
sourceCompatibility = 1.8
22
20
targetCompatibility = 1.8
23
21
22
+ tasks. withType(JavaCompile ) {
23
+ options. compilerArgs << " -Xlint:deprecation" << " -Xlint:unchecked"
24
+ }
25
+
24
26
dependencies {
25
- compile " org.embulk:embulk-core:0.9.12"
26
- provided " org.embulk:embulk-core:0.9.12"
27
+ compileOnly " org.embulk:embulk-core:0.9.23"
27
28
compile " org.apache.commons:commons-vfs2:2.2"
28
29
compile " commons-io:commons-io:2.6"
29
30
compile " com.jcraft:jsch:0.1.55"
30
- testCompile " junit:junit:4.+"
31
- testCompile " org.embulk:embulk-core:0.9.12:tests"
32
- testCompile " org.embulk:embulk-standards:0.9.12"
31
+
32
+ testCompile " junit:junit:4.13"
33
+ testCompile " org.embulk:embulk-core:0.9.23:tests"
34
+ testCompile " org.embulk:embulk-standards:0.9.23"
35
+ testCompile " org.embulk:embulk-deps-buffer:0.9.23"
36
+ testCompile " org.embulk:embulk-deps-config:0.9.23"
33
37
testCompile " org.apache.sshd:apache-sshd:1.1.0"
34
38
testCompile " org.littleshoot:littleproxy:1.1.0-beta1"
35
39
testCompile " io.netty:netty-all:4.0.34.Final"
36
40
}
37
41
42
+ embulkPlugin {
43
+ mainClass = " org.embulk.input.sftp.SftpFileInputPlugin"
44
+ category = " input"
45
+ type = " sftp"
46
+ }
47
+
38
48
javadoc {
39
49
options {
40
50
locale = ' en_US'
41
51
encoding = ' UTF-8'
42
52
}
43
53
}
44
54
55
+ // add tests/javadoc/source jar tasks as artifacts to be released
56
+ task testsJar (type : Jar , dependsOn : classes) {
57
+ classifier = ' tests'
58
+ from sourceSets. test. output
59
+ }
60
+ task sourcesJar (type : Jar , dependsOn : classes) {
61
+ classifier = ' sources'
62
+ from sourceSets. main. allSource
63
+ }
64
+ task javadocJar (type : Jar , dependsOn : javadoc) {
65
+ classifier = ' javadoc'
66
+ from javadoc. destinationDir
67
+ }
68
+
69
+ publishing {
70
+ publications {
71
+ embulkPluginMaven(MavenPublication ) { // Publish it with "publishEmbulkPluginMavenPublicationTo???Repository".
72
+ from components. java
73
+ artifact testsJar
74
+ artifact sourcesJar
75
+ artifact javadocJar
76
+ }
77
+ }
78
+ }
79
+
45
80
// bintray
46
81
bintray {
47
82
// write at your bintray user name and api key to ~/.gradle/gradle.properties file:
48
83
user = project. hasProperty(' bintray_user' ) ? bintray_user : ' '
49
84
key = project. hasProperty(' bintray_api_key' ) ? bintray_api_key : ' '
50
85
51
- publications = [' bintrayMavenRelease ' ]
86
+ publications = [ " embulkPluginMaven " ]
52
87
publish = true
53
88
54
89
pkg {
@@ -68,36 +103,17 @@ bintray {
68
103
}
69
104
}
70
105
}
71
- publishing {
72
- publications {
73
- bintrayMavenRelease(MavenPublication ) {
74
- from components. java
75
- artifact testsJar
76
- artifact sourcesJar
77
- artifact javadocJar
78
- }
79
- }
80
- }
81
106
82
- task classpath (type : Copy , dependsOn : [" jar" ]) {
83
- doFirst { file(" classpath" ). deleteDir() }
84
- from (configurations. runtime - configurations. provided + files(jar. archivePath))
85
- into " classpath"
107
+ gem {
108
+ authors = [ " Satoshi Akama" ]
109
+
110
+ summary = " SFTP file input plugin for Embulk"
111
+ homepage = " https://github.com/embulk/embulk-input-sftp"
112
+ licenses = [ " Apache-2.0" ]
86
113
}
87
- clean { delete " classpath" }
88
114
89
- // add tests/javadoc/source jar tasks as artifacts to be released
90
- task testsJar (type : Jar , dependsOn : classes) {
91
- classifier = ' tests'
92
- from sourceSets. test. output
93
- }
94
- task sourcesJar (type : Jar , dependsOn : classes) {
95
- classifier = ' sources'
96
- from sourceSets. main. allSource
97
- }
98
- task javadocJar (type : Jar , dependsOn : javadoc) {
99
- classifier = ' javadoc'
100
- from javadoc. destinationDir
115
+ gemPush {
116
+ host = " https://rubygems.org"
101
117
}
102
118
103
119
checkstyle {
@@ -116,41 +132,3 @@ task checkstyle(type: Checkstyle) {
116
132
classpath = sourceSets. main. output + sourceSets. test. output
117
133
source = sourceSets. main. allJava + sourceSets. test. allJava
118
134
}
119
-
120
- task gem (type : JRubyExec , dependsOn : [" gemspec" , " classpath" ]) {
121
- jrubyArgs " -rrubygems/gem_runner" , " -eGem::GemRunner.new.run(ARGV)" , " build"
122
- script " build/gemspec"
123
- doLast { ant. move(file : " ${ project.name} -${ project.version} .gem" , todir : " pkg" ) }
124
- }
125
-
126
- task gemPush (type : JRubyExec , dependsOn : [" gem" ]) {
127
- jrubyArgs " -rrubygems/gem_runner" , " -eGem::GemRunner.new.run(ARGV)" , " push"
128
- script " pkg/${ project.name} -${ project.version} .gem"
129
- }
130
-
131
- task " package" (dependsOn : [" gemspec" , " classpath" ]) << {
132
- println " > Build succeeded."
133
- println " > You can run embulk with '-L ${ file(".").absolutePath} ' argument."
134
- }
135
-
136
- task gemspec << { file(" build/gemspec" ). write($/
137
- Gem ::Specification . new do |spec|
138
- spec. name = " ${ project.name} "
139
- spec. version = " ${ project.version} "
140
- spec. authors = [" Satoshi Akama" ]
141
- spec. summary = % [SFTP file input plugin for Embulk ]
142
- spec. description = % [Reads files stored on remote server using SFTP . ]
143
- spec
. email
= [
" [email protected] " ]
144
- spec. licenses = [" Apache-2.0" ]
145
- spec. homepage = " https://github.com/embulk/embulk-input-sftp"
146
-
147
- spec. files = `git ls- files`. split(" \n " ) + Dir [" classpath/*.jar" ]
148
- spec. test_files = spec. files. grep(% r" ^(test|spec)/" )
149
- spec. require_paths = [" lib" ]
150
-
151
- spec. add_development_dependency ' bundler' , [' ~> 1.0' ]
152
- spec. add_development_dependency ' rake' , [' >= 10.0' ]
153
- end
154
- / $)
155
- }
156
- clean { delete " ${ project.name} .gemspec" }
0 commit comments