Skip to content

Commit a786ae6

Browse files
authored
Merge pull request #107 from embulk/upload-to-MavenCentral
Upload to Maven Central instead of Bintray
2 parents dee8c65 + 7ed5baf commit a786ae6

File tree

3 files changed

+27
-47
lines changed

3 files changed

+27
-47
lines changed

build.gradle

Lines changed: 27 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
2-
id "com.jfrog.bintray" version "1.8.4"
32
id "java"
43
id "maven-publish"
4+
id "signing"
55
id "jacoco"
66
id "checkstyle"
77
id "org.embulk.embulk-plugins" version "0.4.2" apply false
@@ -10,8 +10,12 @@ plugins {
1010
group = "org.embulk"
1111
version = "0.5.0-SNAPSHOT"
1212

13-
allprojects {
13+
subprojects {
1414
apply plugin: "java"
15+
apply plugin: "maven-publish"
16+
apply plugin: "signing"
17+
apply plugin: "jacoco"
18+
apply plugin: "org.embulk.embulk-plugins"
1519

1620
sourceCompatibility = 1.8
1721
targetCompatibility = 1.8
@@ -25,46 +29,6 @@ allprojects {
2529
withJavadocJar()
2630
withSourcesJar()
2731
}
28-
}
29-
30-
subprojects {
31-
apply plugin: "com.jfrog.bintray"
32-
33-
bintray {
34-
// write at your bintray user name and api key to ~/.gradle/gradle.properties file:
35-
user = project.hasProperty('bintray_user') ? bintray_user : ''
36-
key = project.hasProperty('bintray_api_key') ? bintray_api_key : ''
37-
38-
publications = ['mavenJava']
39-
publish = true
40-
41-
pkg {
42-
userOrg = 'embulk-input-s3'
43-
repo = 'maven'
44-
afterEvaluate {
45-
name = project.name
46-
desc = project.description
47-
}
48-
websiteUrl = 'https://github.com/embulk/embulk-input-s3'
49-
issueTrackerUrl = 'https://github.com/embulk/embulk-input-s3/issues'
50-
vcsUrl = 'https://github.com/embulk/embulk-input-s3.git'
51-
licenses = ['Apache-2.0']
52-
labels = ['embulk', 'java']
53-
publicDownloadNumbers = true
54-
55-
afterEvaluate {
56-
version {
57-
name = project.version
58-
}
59-
}
60-
}
61-
}
62-
}
63-
64-
subprojects {
65-
// embulk-input-s3, embulk-input-riak_cs
66-
apply plugin: "maven-publish"
67-
apply plugin: "org.embulk.embulk-plugins"
6832

6933
test {
7034
testLogging {
@@ -87,7 +51,7 @@ subprojects {
8751

8852
publishing {
8953
publications {
90-
mavenJava(MavenPublication) {
54+
maven(MavenPublication) {
9155
afterEvaluate { project ->
9256
groupId = "${project.group}"
9357
artifactId = "${project.name}"
@@ -153,6 +117,26 @@ subprojects {
153117
}
154118
}
155119
}
120+
121+
repositories {
122+
maven { // publishMavenPublicationToMavenCentralRepository
123+
name = "mavenCentral"
124+
if (project.version.endsWith("-SNAPSHOT")) {
125+
url "https://oss.sonatype.org/content/repositories/snapshots"
126+
} else {
127+
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
128+
}
129+
130+
credentials {
131+
username = project.hasProperty("ossrhUsername") ? ossrhUsername : ""
132+
password = project.hasProperty("ossrhPassword") ? ossrhPassword : ""
133+
}
134+
}
135+
}
136+
}
137+
138+
signing {
139+
sign publishing.publications.maven
156140
}
157141

158142
gemPush {

embulk-input-riak_cs/build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
apply plugin: "jacoco"
2-
31
group = "${rootProject.group}"
42
version = "${rootProject.version}"
53
description = "Reads files stored on Riak CS"

embulk-input-s3/build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
apply plugin: "jacoco"
2-
31
group = "${rootProject.group}"
42
version = "${rootProject.version}"
53
description = "Reads files stored on Amazon S3"

0 commit comments

Comments
 (0)