Skip to content

Commit 5c34158

Browse files
committed
[GAIA-2788] replaced jcenter with MavenCentral
1 parent 6f52def commit 5c34158

File tree

3 files changed

+64
-28
lines changed

3 files changed

+64
-28
lines changed

.circleci/config.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
- run:
3030
<<: *webhook-created
3131
- checkout
32+
- run: echo $OSSRH_SIGN_KEY_CONTENT | base64 --decode > "$OSSRH_SIGN_KEY_PATH"
3233
- run: chmod a+x gradlew
3334
- restore_cache:
3435
key: cache-gradle-{{ checksum "build.gradle" }}
@@ -58,6 +59,7 @@ jobs:
5859
- run:
5960
<<: *webhook-created
6061
- checkout
62+
- run: echo $OSSRH_SIGN_KEY_CONTENT | base64 --decode > "$OSSRH_SIGN_KEY_PATH"
6163
- restore_cache:
6264
key: cache-gradle-{{ checksum "build.gradle" }}
6365
- run: ./gradlew final bintrayUpload -Prelease.useLastTag=true --stacktrace
@@ -92,12 +94,16 @@ workflows:
9294
build:
9395
jobs:
9496
- build:
95-
context: asteria
97+
context:
98+
- asteria
99+
- maven-central
96100
filters:
97101
tags:
98102
ignore: /.*/
99103
- webhook-completed:
100-
context: asteria
104+
context:
105+
- asteria
106+
- maven-central
101107
filters:
102108
tags:
103109
ignore: /.*/
@@ -113,22 +119,30 @@ workflows:
113119
- master
114120
jobs:
115121
- build:
116-
context: asteria
122+
context:
123+
- asteria
124+
- maven-central
117125
- webhook-completed:
118-
context: asteria
126+
context:
127+
- asteria
128+
- maven-central
119129
requires:
120130
- build
121131
release:
122132
jobs:
123133
- release:
124-
context: asteria
134+
context:
135+
- asteria
136+
- maven-central
125137
filters:
126138
branches:
127139
ignore: /.*/
128140
tags:
129141
only: /^v\d+\.\d+\.\d+$/
130142
- webhook-completed:
131-
context: asteria
143+
context:
144+
- asteria
145+
- maven-central
132146
filters:
133147
branches:
134148
ignore: /.*/
@@ -146,8 +160,12 @@ workflows:
146160
- master
147161
jobs:
148162
- code-analytics:
149-
context: asteria
163+
context:
164+
- asteria
165+
- maven-central
150166
- webhook-completed:
151-
context: asteria
167+
context:
168+
- asteria
169+
- maven-central
152170
requires:
153171
- code-analytics

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ fun instantiateEntityA(){
181181
Releases are triggered locally. Just a tag will be pushed and CI pipelines take care of the rest.
182182

183183
#### Major
184-
Run `./gradlew final -x bintrayUpload -x sendReleaseEmail -Prelease.scope=major` locally.
184+
Run `./gradlew final -x sendReleaseEmail -Prelease.scope=major` locally.
185185

186186
#### Minor
187-
Run `./gradlew final -x bintrayUpload -x sendReleaseEmail -Prelease.scope=minor` locally.
187+
Run `./gradlew final -x sendReleaseEmail -Prelease.scope=minor` locally.
188188

189189
#### Patch
190-
Run `./gradlew final -x bintrayUpload -x sendReleaseEmail -Prelease.scope=patch` locally.
190+
Run `./gradlew final -x sendReleaseEmail -Prelease.scope=patch` locally.

build.gradle

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ buildscript {
1515
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versionKotlin}"
1616
classpath "org.jetbrains.kotlin:kotlin-allopen:${versionKotlin}"
1717
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.17"
18-
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
18+
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0"
1919
}
2020
}
2121

2222
apply plugin: "kotlin"
2323
apply plugin: "org.jetbrains.dokka"
24-
apply plugin: "com.jfrog.bintray"
24+
apply plugin: "maven-publish"
25+
apply plugin: "signing"
26+
apply plugin: "io.codearte.nexus-staging"
2527

2628
apply plugin: "one.leftshift.asteria-email"
2729
apply plugin: "one.leftshift.asteria-report"
@@ -34,6 +36,14 @@ repositories {
3436
jcenter()
3537
}
3638

39+
nexusStaging {
40+
packageGroup = "one.leftshift"
41+
serverUrl = "https://s01.oss.sonatype.org/service/local/"
42+
stagingProfileId = System.getenv("OSSRH_STAGING_PROFILE_ID")
43+
username = System.getenv("OSSRH_LOGIN_NAME")
44+
password = System.getenv("OSSRH_LOGIN_PASSWORD")
45+
}
46+
3747
dependencies {
3848
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
3949
compile "org.jetbrains.kotlin:kotlin-reflect"
@@ -123,12 +133,19 @@ task javadocJar(type: Jar) {
123133
from dokkaJavadoc
124134
classifier "javadoc"
125135
}
136+
task sourcesJar(type: Jar) {
137+
from sourceSets.main.allSource
138+
classifier "sources"
139+
}
140+
artifacts {
141+
archives javadocJar, sourcesJar
142+
}
126143
asteriaPublish {
127144
enableBranchSnapshotRepositories = true
128145
}
129146
publishing {
130147
publications {
131-
mavenJava(MavenPublication) {
148+
release(MavenPublication) {
132149
artifactId = project.name
133150
from components.java
134151
artifact sourceJar
@@ -159,19 +176,20 @@ publishing {
159176
}
160177
}
161178
}
162-
}
163-
164-
bintray {
165-
logger.info "Bintray deploy with user [${System.getenv('BINTRAY_USER')}] while working on ${project.name}"
166-
user = System.getenv('BINTRAY_USER')
167-
key = System.getenv('BINTRAY_KEY')
168-
publish = true
169-
pkg {
170-
repo = "implicit"
171-
name = "${project.group}.${project.name}"
172-
userOrg = "leftshiftone"
173-
licenses = ["Apache-2.0"]
174-
vcsUrl = "https://github.com/leftshiftone/implicit.git"
175-
publications = ["mavenJava"]
179+
repositories {
180+
maven {
181+
name = "sonatype"
182+
url = version.toString().endsWith("SNAPSHOT") ? "https://s01.oss.sonatype.org/content/repositories/snapshots" : "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
183+
credentials {
184+
username System.getenv("OSSRH_LOGIN_NAME")
185+
password System.getenv("OSSRH_LOGIN_PASSWORD")
186+
}
187+
}
176188
}
177189
}
190+
ext."signing.keyId" = System.getenv("OSSRH_SIGN_KEY_ID")
191+
ext."signing.password" = System.getenv("OSSRH_SIGN_KEY_PASSWORD")
192+
ext."signing.secretKeyRingFile" = System.getenv("OSSRH_SIGN_KEY_PATH")
193+
signing {
194+
sign publishing.publications
195+
}

0 commit comments

Comments
 (0)