Skip to content

Commit 9909a24

Browse files
author
Daniel Bustamante Ospina
authored
Merge pull request #54 from reactive-commons/feature/maven-central-migration
Publish to maven central
2 parents bcd6f62 + bbb29b9 commit 9909a24

File tree

10 files changed

+153
-425
lines changed

10 files changed

+153
-425
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- master
1111

1212
release:
13-
types: [created]
13+
types: [ created ]
1414

1515
jobs:
1616
build:
@@ -50,8 +50,8 @@ jobs:
5050
java-version: 1.8
5151
- name: Grant execute permission for gradlew
5252
run: chmod +x gradlew
53-
# - name: Execute jacocoTestReport
54-
# run: ./gradlew test jacocoTestReport && cp build/reports/jacoco/report.xml jacoco.xml || echo "Code coverage failed"
53+
# - name: Execute jacocoTestReport
54+
# run: ./gradlew test jacocoTestReport && cp build/reports/jacoco/report.xml jacoco.xml || echo "Code coverage failed"
5555
- name: Build with Gradle
5656
run: ./gradlew build asciidoctor --refresh-dependencies --no-daemon --continue
5757
- name: Generate Changelog
@@ -73,11 +73,13 @@ jobs:
7373
files: CHANGELOG.md docs/
7474
name: ${{ github.actor }}
7575
email: ${{ github.actor }}@users.noreply.github.com
76-
# - name: Push codeCoverage to Codecov
77-
# run: bash <(curl -s https://codecov.io/bash)
78-
- name: Echo credentials
79-
run: echo "bintrayUser=${{secrets.BINTRAY_USER}}" >> gradle.properties
80-
- name: Echo credentials Key
81-
run: echo "bintrayApiKey=${{secrets.BINTRAY_KEY}}" >> gradle.properties && cat gradle.properties
82-
- name: Publish plugin
83-
run: ./gradlew bintrayUpload
76+
# - name: Push codeCoverage to Codecov
77+
# run: bash <(curl -s https://codecov.io/bash)
78+
- name: Prepare gpg key
79+
run: |
80+
echo "${{secrets.SIGNING_KEY_FILE}}" | base64 -d > ~/.gradle/secring.gpg
81+
- name: Publish Libraries
82+
run: ./gradlew publish -Psigning.keyId=${{ secrets.SIGNING_KEY_ID }} -Psigning.password=${{ secrets.SIGNING_KEY_PASSWORD }} -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg)
83+
env:
84+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
85+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
Lines changed: 4 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,10 @@
1-
plugins {
2-
id "com.jfrog.bintray" version "1.8.5"
3-
id 'java-library'
4-
id 'maven'
5-
id 'maven-publish'
6-
}
7-
8-
9-
def pomConfig = {
10-
licenses {
11-
license {
12-
name "The Apache Software License, Version 2.0"
13-
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
14-
distribution "repo"
15-
}
16-
}
17-
developers {
18-
developer {
19-
id "danielbustamante"
20-
name "Daniel Bustamante Ospina"
21-
email "danibust@bancolombia.com.co"
22-
}
23-
}
24-
25-
scm {
26-
url "git@github.com:reactive-commons/reactive-commons-java.git"
27-
}
28-
}
29-
30-
publishing {
31-
publications {
32-
MyPublication(MavenPublication) {
33-
from components.java
34-
artifact sourcesJar {
35-
classifier "sources"
36-
}
37-
artifact javadocJar {
38-
classifier "javadoc"
39-
}
40-
groupId 'org.reactivecommons'
41-
artifactId 'async-commons-api'
42-
version project.property('version')
43-
pom.withXml {
44-
def root = asNode()
45-
root.appendNode('description', 'Async Commons API')
46-
root.appendNode('name', 'async-commons-api')
47-
root.appendNode('url', 'http://reactivecommons.org')
48-
root.children().last() + pomConfig
49-
}
50-
}
51-
}
52-
}
53-
54-
bintray {
55-
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
56-
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
57-
publications = ['MyPublication']
58-
publish = true
59-
pkg {
60-
repo = 'maven-artifacts'
61-
userOrg = 'reactive-commons'
62-
name = 'reactive-commons'
63-
licenses = ['Apache-2.0']
64-
vcsUrl = 'git@github.com:reactive-commons/reactive-commons-java.git'
65-
version {
66-
name = project.property('version')
67-
desc = 'First version'
68-
released = new Date()
69-
vcsTag = project.property('version')
70-
}
71-
}
1+
ext {
2+
artifactId = 'async-commons-api'
3+
artifactDescription = 'Async Commons API'
724
}
735

746
dependencies {
75-
api project(":domain-events-api")
7+
api project(':domain-events-api')
768
compileOnly 'io.projectreactor:reactor-core'
779
testImplementation 'io.projectreactor:reactor-test'
7810
}
Lines changed: 5 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,8 @@
1-
plugins {
2-
id "com.jfrog.bintray" version "1.8.5"
3-
id 'java-library'
4-
id 'maven'
5-
id 'maven-publish'
6-
}
7-
8-
9-
def pomConfig = {
10-
licenses {
11-
license {
12-
name "The Apache Software License, Version 2.0"
13-
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
14-
distribution "repo"
15-
}
16-
}
17-
developers {
18-
developer {
19-
id "danielbustamante"
20-
name "Daniel Bustamante Ospina"
21-
email "danibust@bancolombia.com.co"
22-
}
23-
}
24-
25-
scm {
26-
url "git@github.com:reactive-commons/reactive-commons-java.git"
27-
}
28-
}
29-
30-
publishing {
31-
publications {
32-
MyPublication(MavenPublication) {
33-
from components.java
34-
artifact sourcesJar {
35-
classifier "sources"
36-
}
37-
artifact javadocJar {
38-
classifier "javadoc"
39-
}
40-
groupId 'org.reactivecommons'
41-
artifactId 'async-commons-standalone'
42-
version project.property('version')
43-
pom.withXml {
44-
def root = asNode()
45-
root.appendNode('description', 'Async Commons Standalone Config')
46-
root.appendNode('name', 'async-commons-standalone')
47-
root.appendNode('url', 'https://site_for_lib.tld')
48-
root.children().last() + pomConfig
49-
}
50-
}
51-
}
52-
}
53-
54-
bintray {
55-
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
56-
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
57-
publications = ['MyPublication']
58-
publish = true
59-
pkg {
60-
repo = 'maven-artifacts'
61-
userOrg = 'reactive-commons'
62-
name = 'reactive-commons'
63-
licenses = ['Apache-2.0']
64-
vcsUrl = 'git@github.com:reactive-commons/reactive-commons-java.git'
65-
version {
66-
name = project.property('version')
67-
desc = 'First version'
68-
released = new Date()
69-
vcsTag = project.property('version')
70-
}
71-
}
1+
ext {
2+
artifactId = 'async-commons-standalone'
3+
artifactDescription = 'Async Commons Standalone Config'
724
}
735

746
dependencies {
75-
api project(":async-commons")
76-
}
7+
api project(':async-commons')
8+
}

async/async-commons-starter/async-commons-starter.gradle

Lines changed: 5 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,11 @@
1-
plugins {
2-
id "com.jfrog.bintray" version "1.8.5"
3-
id 'java-library'
4-
id 'maven'
5-
id 'maven-publish'
6-
}
7-
8-
test.onlyIf { true }
9-
10-
def pomConfig = {
11-
licenses {
12-
license {
13-
name "The Apache Software License, Version 2.0"
14-
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
15-
distribution "repo"
16-
}
17-
}
18-
developers {
19-
developer {
20-
id "danielbustamante"
21-
name "Daniel Bustamante Ospina"
22-
email "danibust@bancolombia.com.co"
23-
}
24-
}
25-
26-
scm {
27-
url "git@github.com:reactive-commons/reactive-commons-java.git"
28-
}
29-
}
30-
31-
publishing {
32-
publications {
33-
MyPublication(MavenPublication) {
34-
from components.java
35-
artifact sourcesJar {
36-
classifier "sources"
37-
}
38-
artifact javadocJar {
39-
classifier "javadoc"
40-
}
41-
groupId 'org.reactivecommons'
42-
artifactId 'async-commons-starter'
43-
version project.property('version')
44-
pom.withXml {
45-
def root = asNode()
46-
root.appendNode('description', 'Async Commons Starter')
47-
root.appendNode('name', 'async-commons-starter')
48-
root.appendNode('url', 'https://site_for_lib.tld')
49-
root.children().last() + pomConfig
50-
}
51-
}
52-
}
53-
}
54-
55-
bintray {
56-
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
57-
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
58-
publications = ['MyPublication']
59-
publish = true
60-
pkg {
61-
repo = 'maven-artifacts'
62-
userOrg = 'reactive-commons'
63-
name = 'reactive-commons'
64-
licenses = ['Apache-2.0']
65-
vcsUrl = 'git@github.com:reactive-commons/reactive-commons-java.git'
66-
version {
67-
name = project.property('version')
68-
desc = 'First version'
69-
released = new Date()
70-
vcsTag = project.property('version')
71-
}
72-
}
1+
ext {
2+
artifactId = 'async-commons-starter'
3+
artifactDescription = 'Async Commons Starter'
734
}
745

756
dependencies {
76-
api project(":async-commons")
77-
compileOnly('org.springframework.boot:spring-boot-starter')
7+
api project(':async-commons')
8+
compileOnly 'org.springframework.boot:spring-boot-starter'
789

7910
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
8011

Lines changed: 6 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,14 @@
1-
plugins {
2-
id "com.jfrog.bintray" version "1.8.5"
3-
id 'java-library'
4-
id 'maven'
5-
id 'maven-publish'
6-
}
7-
8-
9-
def pomConfig = {
10-
licenses {
11-
license {
12-
name "The Apache Software License, Version 2.0"
13-
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
14-
distribution "repo"
15-
}
16-
}
17-
developers {
18-
developer {
19-
id "danielbustamante"
20-
name "Daniel Bustamante Ospina"
21-
email "danibust@bancolombia.com.co"
22-
}
23-
}
24-
25-
scm {
26-
url "git@github.com:reactive-commons/reactive-commons-java.git"
27-
}
28-
}
29-
30-
publishing {
31-
publications {
32-
MyPublication(MavenPublication) {
33-
from components.java
34-
artifact sourcesJar {
35-
classifier "sources"
36-
}
37-
artifact javadocJar {
38-
classifier "javadoc"
39-
}
40-
groupId 'org.reactivecommons'
41-
artifactId 'async-commons'
42-
version project.property('version')
43-
pom.withXml {
44-
def root = asNode()
45-
root.appendNode('description', 'Async Commons')
46-
root.appendNode('name', 'async-commons')
47-
root.appendNode('url', 'https://site_for_lib.tld')
48-
root.children().last() + pomConfig
49-
}
50-
}
51-
}
52-
}
53-
54-
bintray {
55-
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
56-
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
57-
publications = ['MyPublication']
58-
publish = true
59-
pkg {
60-
repo = 'maven-artifacts'
61-
userOrg = 'reactive-commons'
62-
name = 'reactive-commons'
63-
licenses = ['Apache-2.0']
64-
vcsUrl = 'git@github.com:reactive-commons/reactive-commons-java.git'
65-
version {
66-
name = project.property('version')
67-
desc = 'First version'
68-
released = new Date()
69-
vcsTag = project.property('version')
70-
}
71-
}
1+
ext {
2+
artifactId = 'async-commons'
3+
artifactDescription = 'Async Commons'
724
}
735

746
dependencies {
75-
api project(":async-commons-api")
76-
api project(":domain-events-api")
7+
api project(':async-commons-api')
8+
api project(':domain-events-api')
779

7810
compileOnly 'io.projectreactor:reactor-core'
79-
api ("io.projectreactor.rabbitmq:reactor-rabbitmq")
11+
api 'io.projectreactor.rabbitmq:reactor-rabbitmq'
8012
api 'com.fasterxml.jackson.core:jackson-databind'
8113
testImplementation 'io.projectreactor:reactor-test'
8214
}

0 commit comments

Comments
 (0)