@@ -2,9 +2,9 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
2
2
import org.gradle.api.tasks.testing.logging.TestLogEvent
3
3
4
4
plugins {
5
- id ' com.jfrog.bintray' version ' 1.8.4' apply false
6
5
id ' java'
7
6
id " maven-publish"
7
+ id " signing"
8
8
id ' checkstyle'
9
9
id " org.embulk.embulk-plugins" version " 0.4.2" apply false
10
10
}
@@ -18,7 +18,7 @@ allprojects {
18
18
subprojects {
19
19
apply plugin : ' java'
20
20
apply plugin : " maven-publish"
21
- apply plugin : " com.jfrog.bintray "
21
+ apply plugin : " signing "
22
22
apply plugin : " org.embulk.embulk-plugins"
23
23
// apply plugin: 'jacoco'
24
24
@@ -144,45 +144,58 @@ subprojects {
144
144
145
145
publishing {
146
146
publications {
147
- embulkPluginMaven(MavenPublication ) { // Publish it with "publishEmbulkPluginMavenPublicationTo???Repository".
148
- from components. java // Must be "components.java". The dependency modification works only for it.
149
- artifact testsJar
150
- artifact sourcesJar
151
- artifact javadocJar
147
+ maven(MavenPublication ) {
148
+ afterEvaluate { project ->
149
+ groupId = " ${ project.group} "
150
+ artifactId = " ${ project.name} "
151
+ }
152
+
153
+ from components. java
154
+
155
+ pom { // https://central.sonatype.org/pages/requirements.html
156
+ packaging " jar"
157
+
158
+ afterEvaluate { project ->
159
+ name = " ${ project.name} "
160
+ description = " ${ project.description} "
161
+ }
162
+ url = " https://www.embulk.org/"
163
+
164
+ licenses {
165
+ license {
166
+ // http://central.sonatype.org/pages/requirements.html#license-information
167
+ name = " The Apache License, Version 2.0"
168
+ url = " https://www.apache.org/licenses/LICENSE-2.0.txt"
169
+ }
170
+ }
171
+
172
+ scm {
173
+ connection = " scm:git:git://github.com/embulk/embulk-input-jdbc.git"
174
+ developerConnection
= " scm:git:[email protected] :embulk/embulk-input-jdbc.git"
175
+ url = " https://github.com/embulk/embulk-input-jdbc"
176
+ }
177
+ }
152
178
}
153
179
}
180
+
154
181
repositories {
155
- // TODO: Configure some public Maven repo(s).
156
- }
157
- }
182
+ maven { // publishMavenPublicationToMavenCentralRepository
183
+ name = " mavenCentral"
184
+ if (project. version. endsWith(" -SNAPSHOT" )) {
185
+ url " https://oss.sonatype.org/content/repositories/snapshots"
186
+ } else {
187
+ url " https://oss.sonatype.org/service/local/staging/deploy/maven2"
188
+ }
158
189
159
- bintray {
160
- // write at your bintray user name and api key to ~/.gradle/gradle.properties file:
161
- // bintray_user=frsyuki
162
- // bintray_api_key=xxxxxxxxxxx
163
- user = project. hasProperty(' bintray_user' ) ? bintray_user : ' '
164
- key = project. hasProperty(' bintray_api_key' ) ? bintray_api_key : ' '
165
-
166
- publications = [ " embulkPluginMaven" ]
167
-
168
- dryRun = false
169
- publish = true
170
-
171
- pkg {
172
- userOrg = ' embulk-input-jdbc'
173
- repo = ' maven'
174
- name = project. name
175
- desc = ' MySQL, PostgreSQL, Redshift and generic JDBC input plugins for Embulk'
176
- websiteUrl = ' https://github.com/embulk/embulk-input-jdbc'
177
- issueTrackerUrl = ' https://github.com/embulk/embulk-input-jdbc/issues'
178
- vcsUrl = ' https://github.com/embulk/embulk-input-jdbc.git'
179
- licenses = [' Apache-2.0' ]
180
- labels = [' embulk' , ' java' ]
181
- publicDownloadNumbers = true
182
-
183
- version {
184
- name = project. version
190
+ credentials {
191
+ username = project. hasProperty(" ossrhUsername" ) ? ossrhUsername : " "
192
+ password = project. hasProperty(" ossrhPassword" ) ? ossrhPassword : " "
193
+ }
185
194
}
186
195
}
187
196
}
197
+
198
+ signing {
199
+ sign publishing. publications. maven
200
+ }
188
201
}
0 commit comments