11plugins {
2- id " com.jfrog.bintray" version " 1.7 "
2+ id " com.jfrog.bintray" version " 1.8.4 "
33 id " maven-publish"
4- id " com.github.jruby-gradle.base" version " 0.1.5"
54 id " java"
65 id " checkstyle"
76 id " jacoco"
7+ id " org.embulk.embulk-plugins" version " 0.3.0"
88}
9- import com.github.jrubygradle.JRubyExec
9+
1010repositories {
1111 mavenCentral()
1212 jcenter()
1313}
14- configurations {
15- provided
16- }
1714
1815group = " org.embulk.input.sftp"
19- version = " 0.3.2"
16+ version = " 0.3.3"
17+ description = " Reads files stored on remote server using SFTP."
2018
2119sourceCompatibility = 1.8
2220targetCompatibility = 1.8
2321
22+ tasks. withType(JavaCompile ) {
23+ options. compilerArgs << " -Xlint:deprecation" << " -Xlint:unchecked"
24+ }
25+
2426dependencies {
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"
2728 compile " org.apache.commons:commons-vfs2:2.2"
2829 compile " commons-io:commons-io:2.6"
2930 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"
3337 testCompile " org.apache.sshd:apache-sshd:1.1.0"
3438 testCompile " org.littleshoot:littleproxy:1.1.0-beta1"
3539 testCompile " io.netty:netty-all:4.0.34.Final"
3640}
3741
42+ embulkPlugin {
43+ mainClass = " org.embulk.input.sftp.SftpFileInputPlugin"
44+ category = " input"
45+ type = " sftp"
46+ }
47+
3848javadoc {
3949 options {
4050 locale = ' en_US'
4151 encoding = ' UTF-8'
4252 }
4353}
4454
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+
4580// bintray
4681bintray {
4782 // write at your bintray user name and api key to ~/.gradle/gradle.properties file:
4883 user = project. hasProperty(' bintray_user' ) ? bintray_user : ' '
4984 key = project. hasProperty(' bintray_api_key' ) ? bintray_api_key : ' '
5085
51- publications = [' bintrayMavenRelease ' ]
86+ publications = [ " embulkPluginMaven " ]
5287 publish = true
5388
5489 pkg {
@@ -68,36 +103,17 @@ bintray {
68103 }
69104 }
70105}
71- publishing {
72- publications {
73- bintrayMavenRelease(MavenPublication ) {
74- from components. java
75- artifact testsJar
76- artifact sourcesJar
77- artifact javadocJar
78- }
79- }
80- }
81106
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+ email = [ " satoshiakama@gmail.com" ]
110+ summary = " SFTP file input plugin for Embulk"
111+ homepage = " https://github.com/embulk/embulk-input-sftp"
112+ licenses = [ " Apache-2.0" ]
86113}
87- clean { delete " classpath" }
88114
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"
101117}
102118
103119checkstyle {
@@ -116,41 +132,3 @@ task checkstyle(type: Checkstyle) {
116132 classpath = sourceSets. main. output + sourceSets. test. output
117133 source = sourceSets. main. allJava + sourceSets. test. allJava
118134}
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 = [" satoshiakama@gmail.com" ]
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