Skip to content

Commit c031a38

Browse files
committed
Merge branch '317-migrate-to-sonatype-central-publishing-portal' into 'master'
Resolve "Migrate to Sonatype Central Publishing Portal" Closes #317 See merge request pace/mobile/android/pace-cloud-sdk!375
2 parents bcb5a76 + 83399c7 commit c031a38

File tree

6 files changed

+112
-157
lines changed

6 files changed

+112
-157
lines changed

.gitlab-ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,17 @@ before_script:
4444
extends: .android_version
4545
stage: build
4646
script:
47-
- bash -c "echo '$SIGNING_GPG_KEY_CONTENT' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'"
48-
- ./gradlew clean library:assembleRelease
49-
- ./gradlew sourcesJar javadocJar
50-
- ./gradlew publishReleasePublicationToSonatypeRepository -PbuildNumber=$BUILD_NUMBER -PversionName=$BUILD_VERSION_NAME -PsigningKeyId=$SIGNING_KEY_ID -PsigningPassword=$SIGNING_PASSWORD -PsigningSecretKeyRingFile=$SIGNING_SECRET_KEY_RING_FILE -PossrhUsername=$OSSRH_USERNAME -PossrhPassword=$OSSRH_PASSWORD
47+
- export JRELEASER_MAVENCENTRAL_STAGE=UPLOAD
48+
- ./gradlew clean library:publish -PbuildNumber=$BUILD_NUMBER -PversionName=$BUILD_VERSION_NAME
49+
- ./gradlew library:jreleaserDeploy -PbuildNumber=$BUILD_NUMBER -PversionName=$BUILD_VERSION_NAME
5150

5251
.close_and_release_library:
5352
extends: .android_version
5453
stage: publish
5554
script:
56-
- ./gradlew findSonatypeStagingRepository closeAndReleaseSonatypeStagingRepository -PbuildNumber=$BUILD_NUMBER -PversionName=$BUILD_VERSION_NAME -PossrhUsername=$OSSRH_USERNAME -PossrhPassword=$OSSRH_PASSWORD -PsonatypeStagingProfileId=$SONATYPE_STAGING_PROFILE_ID
55+
- export JRELEASER_MAVENCENTRAL_STAGE=PUBLISH
56+
- ./gradlew clean library:publish -PbuildNumber=$BUILD_NUMBER -PversionName=$BUILD_VERSION_NAME
57+
- ./gradlew library:jreleaserRelease -PbuildNumber=$BUILD_NUMBER -PversionName=$BUILD_VERSION_NAME
5758

5859
commit_format:
5960
stage: test

build.gradle.kts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ buildscript {
2424

2525
plugins {
2626
id(Libs.DOKKA) version Versions.DOKKA
27-
id(Libs.NEXUS_PUBLISH) version Versions.NEXUS_PUBLISH
27+
id(Libs.JRELEASER_GRADLE_PLUGIN) version Versions.JRELEASER_GRADLE_PLUGIN
2828
id(Libs.GOOGLE_PROTOBUF_GRADLE_PLUGIN) version Versions.GOOGLE_PROTOBUF_GRADLE_PLUGIN
2929
java
3030
}
@@ -35,13 +35,6 @@ allprojects {
3535
mavenCentral()
3636
mavenLocal()
3737
}
38-
39-
extra["signing.keyId"] = properties["signingKeyId"]
40-
extra["signing.password"] = properties["signingPassword"]
41-
extra["signing.secretKeyRingFile"] = properties["signingSecretKeyRingFile"]
42-
extra["ossrhUsername"] = properties["ossrhUsername"]
43-
extra["ossrhPassword"] = properties["ossrhPassword"]
44-
extra["sonatypeStagingProfileId"] = properties["sonatypeStagingProfileId"]
4538
}
4639

4740
subprojects {
@@ -59,16 +52,3 @@ idea.project.settings {
5952

6053
group = Config.GROUP_ID
6154
version = properties.getOrDefault("versionName", Versions.DEFAULT_VERSION_NAME_LIBRARY)!!.toString()
62-
63-
nexusPublishing {
64-
repositories {
65-
sonatype {
66-
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
67-
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
68-
stagingProfileId.set(properties["sonatypeStagingProfileId"]?.toString())
69-
username.set(properties["ossrhUsername"]?.toString())
70-
password.set(properties["ossrhPassword"]?.toString())
71-
repositoryDescription.set("${Config.GROUP_ID}:${Config.ARTIFACT_ID}:${properties["versionName"] ?: Versions.DEFAULT_VERSION_NAME_LIBRARY}")
72-
}
73-
}
74-
}

buildSrc/src/main/java/Config.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@ object Config {
44
const val FUELING_APPLICATION_ID = "cloud.pace.sdk.fueling_app"
55
const val GROUP_ID = "cloud.pace"
66
const val ARTIFACT_ID = "sdk"
7+
const val SDK_VEND0R = "PACE Telematics GmbH"
8+
const val SDK_NAME = "PACE Cloud SDK Android"
9+
const val SDK_DESCRIPTION = "PACE Cloud SDK is a client SDK that allows your app to easily connect to PACE's Connected Fueling. " +
10+
"The SDK consists of the IDKit to manage the OpenID (OID) authorization and general session flow with its token handling. " +
11+
"It also consists of the AppKit, with which you can fetch and display location based apps, apps by URL or ID. " +
12+
"Furthermore it contains the POIKit, which allows you to fetch Point of Interests (e.g. gas stations)."
713
}

buildSrc/src/main/java/Libs.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ object Libs {
4343
const val JETPACK_COMPOSE_RUNTIME_LIVEDATA = "androidx.compose.runtime:runtime-livedata:${Versions.JETPACK_COMPOSE}"
4444
const val JETPACK_COMPOSE_UI_TOOLING = "androidx.compose.ui:ui-tooling:${Versions.JETPACK_COMPOSE}"
4545
const val JETPACK_COMPOSE_UI_TOOLING_PREVIEW = "androidx.compose.ui:ui-tooling-preview:${Versions.JETPACK_COMPOSE}"
46+
const val JRELEASER_GRADLE_PLUGIN = "org.jreleaser"
4647
const val JUNIT = "junit:junit:${Versions.JUNIT}"
4748
const val LIFECYCLE_LIVE_DATA_KTX = "androidx.lifecycle:lifecycle-livedata-ktx:${Versions.LIFECYCLE_KTX}"
4849
const val LIFECYCLE_PROCESS_KTX = "androidx.lifecycle:lifecycle-process:${Versions.LIFECYCLE_KTX}"
@@ -63,7 +64,6 @@ object Libs {
6364
const val NAVIGATION_FRAGMENT = "androidx.navigation:navigation-fragment-ktx:${Versions.NAVIGATION}"
6465
const val NAVIGATION_SAFE_ARGS = "androidx.navigation:navigation-safe-args-gradle-plugin:${Versions.NAVIGATION}"
6566
const val NAVIGATION_UI = "androidx.navigation:navigation-ui-ktx:${Versions.NAVIGATION}"
66-
const val NEXUS_PUBLISH = "io.github.gradle-nexus.publish-plugin"
6767
const val OKHTTP_LOGGING_INTERCEPTOR = "com.squareup.okhttp3:logging-interceptor:${Versions.OKHTTP}"
6868
const val ONE_TIME_PASSWORD = "dev.turingcomplete:kotlin-onetimepassword:${Versions.ONE_TIME_PASSWORD}"
6969
const val PREFERENCE_KTX = "androidx.preference:preference-ktx:${Versions.PREFERENCE_KTX}"

buildSrc/src/main/java/Versions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ object Versions {
3333
const val JETPACK_COMPOSE = "1.4.3"
3434
const val JETPACK_COMPOSE_COMPILER = "1.5.10"
3535
const val JETPACK_COMPOSE_CONSTRAINT_LAYOUT = "1.0.1"
36+
const val JRELEASER_GRADLE_PLUGIN = "1.18.0"
3637
const val JUNIT = "4.13.2"
3738
const val KOIN = "3.4.2"
3839
const val KOIN_TEST = "3.4.1"
@@ -47,7 +48,6 @@ object Versions {
4748
const val MOSHI_JSONAPI = "3.5.0"
4849
const val MOSHI_KOTLIN = "1.14.0"
4950
const val NAVIGATION = "2.5.3"
50-
const val NEXUS_PUBLISH = "2.0.0-rc-1"
5151
const val OKHTTP = "4.10.0"
5252
const val ONE_TIME_PASSWORD = "2.4.0"
5353
const val PREFERENCE_KTX = "1.2.0"

0 commit comments

Comments
 (0)