1
-
2
1
plugins {
3
- id ' com.jfrog.bintray' version ' 1.8.4'
4
- id ' com.github.jruby-gradle.base' version ' 1.6.0'
2
+ id " com.jfrog.bintray" version " 1.8.4" apply false
5
3
id ' java'
4
+ id " maven-publish"
6
5
id ' checkstyle'
6
+ id " org.embulk.embulk-plugins" version " 0.4.1" apply false
7
7
}
8
- import com.github.jrubygradle.JRubyExec
9
8
10
9
def bintrayReleaseProjects = [
11
10
project(" :embulk-output-jdbc" ),
12
11
]
13
12
14
13
allprojects {
15
14
group = ' org.embulk.output.jdbc'
16
- version = ' 0.8.7'
17
-
18
- apply plugin : ' com.jfrog.bintray'
19
- apply plugin : ' maven-publish'
20
-
21
- bintray {
22
- // write at your bintray user name and api key to ~/.gradle/gradle.properties file:
23
- // bintray_user=frsyuki
24
- // bintray_api_key=xxxxxxxxxxx
25
- user = project. hasProperty(' bintray_user' ) ? bintray_user : ' '
26
- key = project. hasProperty(' bintray_api_key' ) ? bintray_api_key : ' '
27
-
28
- publications = [' bintrayMavenRelease' ]
29
-
30
- dryRun = ! bintrayReleaseProjects. contains(project)
31
- publish = true
32
-
33
- pkg {
34
- userOrg = ' embulk-output-jdbc'
35
- repo = ' maven'
36
- name = project. name
37
- desc = ' MySQL, PostgreSQL, Redshift and generic JDBC output plugins for Embulk'
38
- websiteUrl = ' https://github.com/embulk/embulk-output-jdbc'
39
- issueTrackerUrl = ' https://github.com/embulk/embulk-output-jdbc/issues'
40
- vcsUrl = ' https://github.com/embulk/embulk-output-jdbc.git'
41
- licenses = [' Apache-2.0' ]
42
- labels = [' embulk' , ' java' ]
43
- publicDownloadNumbers = true
44
-
45
- version {
46
- name = project. version
47
- }
48
- }
49
- }
15
+ version = " 0.9.0"
16
+ description = " Inserts or updates records to a table."
50
17
}
51
18
52
19
subprojects {
53
- apply plugin : ' maven' // install jar files to the local repo: $ gradle install
54
20
apply plugin : ' java'
55
- apply plugin : ' findbugs'
21
+ apply plugin : " maven-publish"
22
+ apply plugin : " com.jfrog.bintray"
23
+ apply plugin : " org.embulk.embulk-plugins"
56
24
// apply plugin: 'jacoco'
57
- apply plugin : ' com.github.jruby-gradle.base'
58
25
59
26
repositories {
60
27
mavenCentral()
@@ -66,34 +33,26 @@ subprojects {
66
33
}
67
34
68
35
configurations {
69
- provided
70
36
defaultJdbcDriver
71
37
}
72
38
73
39
sourceCompatibility = 1.8
74
40
targetCompatibility = 1.8
75
41
76
42
dependencies {
77
- compile ' org.embulk:embulk-core:0.9.20'
78
- provided ' org.embulk:embulk-core:0.9.20'
79
- testCompile ' org.embulk:embulk-test:0.9.20'
80
- testCompile ' org.embulk:embulk-standards:0.9.20'
43
+ compileOnly " org.embulk:embulk-core:0.9.23"
44
+
45
+ testCompile " org.embulk:embulk-core:0.9.23"
46
+ testCompile " org.embulk:embulk-test:0.9.23"
47
+ testCompile " org.embulk:embulk-standards:0.9.23"
48
+ testCompile " org.embulk:embulk-deps-buffer:0.9.23"
49
+ testCompile " org.embulk:embulk-deps-config:0.9.23"
81
50
}
82
51
83
52
tasks. withType(JavaCompile ) {
84
- options. compilerArgs << " -Xlint:unchecked" // << "-Xlint:deprecation"
53
+ options. compilerArgs << " -Xlint:unchecked" << " -Xlint:deprecation"
85
54
options. encoding = ' UTF-8'
86
55
}
87
- tasks. withType(FindBugs ) {
88
- reports {
89
- xml. enabled = false
90
- html. enabled = true
91
- }
92
- }
93
-
94
- findbugs {
95
- ignoreFailures = true
96
- }
97
56
98
57
javadoc {
99
58
options {
@@ -102,19 +61,7 @@ subprojects {
102
61
}
103
62
}
104
63
105
- task classpath(type : Copy , dependsOn : [" jar" ]) {
106
- doFirst { file(' classpath' ). deleteDir() }
107
- from (configurations. runtime - configurations. provided - configurations. defaultJdbcDriver + files(jar. archivePath))
108
- into ' classpath'
109
- }
110
- task defaultJdbcDriver(type : Copy , dependsOn : [" jar" ]) {
111
- doFirst { file(' default_jdbc_driver' ). deleteDir() }
112
- from (configurations. defaultJdbcDriver)
113
- into ' default_jdbc_driver'
114
- }
115
- clean {
116
- delete ' classpath'
117
- delete ' default_jdbc_driver'
64
+ test {
118
65
}
119
66
120
67
checkstyle {
@@ -134,10 +81,20 @@ subprojects {
134
81
source = sourceSets. main. allJava + sourceSets. test. allJava
135
82
}
136
83
137
- task gem(type : JRubyExec , dependsOn : [' build' , ' gemspec' , ' classpath' , ' defaultJdbcDriver' ]) {
138
- jrubyArgs ' -rrubygems/gem_runner' , " -eGem::GemRunner.new.run(ARGV)" , ' build'
139
- scriptArgs " ${ project.projectDir.absolutePath} /build/gemspec"
140
- doLast { ant. move(file : " ${ project.name} -${ project.version} .gem" , todir : " ${ parent.projectDir} /pkg" ) }
84
+ gem {
85
+ authors = [ " Sadayuki Furuhashi" ]
86
+
87
+ summary = " JDBC output plugin for Embulk"
88
+ homepage = " https://github.com/embulk/embulk-output-jdbc"
89
+ licenses = [ " Apache-2.0" ]
90
+
91
+ into(" default_jdbc_driver" ) {
92
+ from configurations. defaultJdbcDriver
93
+ }
94
+ }
95
+
96
+ gemPush {
97
+ host = " https://rubygems.org"
141
98
}
142
99
143
100
// add tests/javadoc/source jar tasks as artifacts to be released
@@ -159,46 +116,45 @@ subprojects {
159
116
160
117
publishing {
161
118
publications {
162
- bintrayMavenRelease (MavenPublication ) {
163
- from components. java
119
+ embulkPluginMaven (MavenPublication ) { // Publish it with "publishEmbulkPluginMavenPublicationTo???Repository".
120
+ from components. java // Must be "components.java". The dependency modification works only for it.
164
121
artifact testsJar
165
122
artifact sourcesJar
166
123
artifact javadocJar
167
124
}
168
125
}
169
- }
170
-
171
- task gemspec {
172
- doLast {
173
- file(' build' ). mkdirs();
174
- file(' build/gemspec' ). write($/
175
- Gem ::Specification . new do |spec|
176
- spec. name = " ${ project.name} "
177
- spec. version = " ${ project.version} "
178
- spec. authors = [" Sadayuki Furuhashi" ]
179
- spec. summary = % [JDBC output plugin for Embulk ]
180
- spec. description = % [Inserts or updates records to a table. ]
181
- spec
. email
= [
" [email protected] " ]
182
- spec. licenses = [" Apache 2.0" ]
183
- spec. homepage = " https://github.com/embulk/embulk-output-jdbc"
184
-
185
- spec. files = `git ls- files`. split(" \n " ) + Dir [" classpath/*.jar" ] + Dir [" default_jdbc_driver/*.jar" ]
186
- spec. test_files = spec. files. grep(% r" ^(test|spec)/" )
187
- spec. require_paths = [" lib" ]
188
- end
189
- / $)
126
+ repositories {
127
+ // TODO: Configure some public Maven repo(s).
190
128
}
191
129
}
192
- }
193
130
194
- task gempush {
195
- doLast {
196
- " gem push pkg/embulk-output-jdbc-${ project.version} .gem" . execute(). waitFor()
197
- " gem push pkg/embulk-output-mysql-${ project.version} .gem" . execute(). waitFor()
198
- " gem push pkg/embulk-output-postgresql-${ project.version} .gem" . execute(). waitFor()
199
- " gem push pkg/embulk-output-redshift-${ project.version} .gem" . execute(). waitFor()
200
- " gem push pkg/embulk-output-oracle-${ project.version} .gem" . execute(). waitFor()
201
- " gem push pkg/embulk-output-sqlserver-${ project.version} .gem" . execute(). waitFor()
202
- " gem push pkg/embulk-output-db2-${ project.version} .gem" . execute(). waitFor()
131
+ bintray {
132
+ // write at your bintray user name and api key to ~/.gradle/gradle.properties file:
133
+ // bintray_user=frsyuki
134
+ // bintray_api_key=xxxxxxxxxxx
135
+ user = project. hasProperty(' bintray_user' ) ? bintray_user : ' '
136
+ key = project. hasProperty(' bintray_api_key' ) ? bintray_api_key : ' '
137
+
138
+ publications = [ " embulkPluginMaven" ]
139
+
140
+ dryRun = ! bintrayReleaseProjects. contains(project)
141
+ publish = true
142
+
143
+ pkg {
144
+ userOrg = ' embulk-output-jdbc'
145
+ repo = ' maven'
146
+ name = project. name
147
+ desc = ' MySQL, PostgreSQL, Redshift and generic JDBC output plugins for Embulk'
148
+ websiteUrl = ' https://github.com/embulk/embulk-output-jdbc'
149
+ issueTrackerUrl = ' https://github.com/embulk/embulk-output-jdbc/issues'
150
+ vcsUrl = ' https://github.com/embulk/embulk-output-jdbc.git'
151
+ licenses = [' Apache-2.0' ]
152
+ labels = [' embulk' , ' java' ]
153
+ publicDownloadNumbers = true
154
+
155
+ version {
156
+ name = project. version
157
+ }
158
+ }
203
159
}
204
160
}
0 commit comments