Skip to content

Commit ba6e721

Browse files
authored
Merge pull request #127 from kiwix/refactore_deployment_according_to_central
Refactored the publishing plugin to upload binaries to the "Central Portal".
2 parents ee448ab + 8a15526 commit ba6e721

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

.github/workflows/cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
2929
if: github.event_name == 'release'
3030
env:
31-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
32-
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
31+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
32+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
3333
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
3434
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
3535
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
maven { url 'https://plugins.gradle.org/m2/' }
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:8.1.3'
9+
classpath 'com.android.tools.build:gradle:8.11.1'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20"
1111
classpath 'io.github.gradle-nexus:publish-plugin:2.0.0'
1212
classpath 'de.undercouch:gradle-download-task:5.3.0'
@@ -30,10 +30,10 @@ nexusPublishing {
3030
repositories {
3131
sonatype {
3232
stagingProfileId = properties.getProperty("sonatypeStagingProfileId", System.getenv('SONATYPE_STAGING_PROFILE_ID'))
33-
username = properties.getProperty("ossrhUsername", System.getenv('OSSRH_USERNAME'))
34-
password = properties.getProperty("ossrhPassword", System.getenv('OSSRH_PASSWORD'))
35-
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
36-
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
33+
username = properties.getProperty("sonatypeUsername", System.getenv('SONATYPE_USERNAME'))
34+
password = properties.getProperty("sonatypePassword", System.getenv('SONATYPE_PASSWORD'))
35+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
36+
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
3737
}
3838
}
3939
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Fri Aug 12 19:44:15 IST 2022
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

lib/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ if (rootProject.file("local.properties").exists()) {
1212
ext["keyId"] = properties.getProperty("signing.keyId", System.getenv('SIGNING_KEY_ID'))
1313
ext["password"] = properties.getProperty("signing.password", System.getenv('SIGNING_PASSWORD'))
1414
ext["key"] = properties.getProperty("signing.key", System.getenv('SIGNING_KEY'))
15-
ext["ossrhUsername"] = properties.getProperty("ossrhUsername", System.getenv('OSSRH_USERNAME'))
16-
ext["ossrhPassword"] = properties.getProperty("ossrhPassword", System.getenv('OSSRH_PASSWORD'))
15+
ext["sonatypeUsername"] = properties.getProperty("sonatypeUsername", System.getenv('SONATYPE_USERNAME'))
16+
ext["sonatypePassword"] = properties.getProperty("sonatypePassword", System.getenv('SONATYPE_PASSWORD'))
1717
ext["sonatypeStagingProfileId"] = properties.getProperty("sonatypeStagingProfileId", System.getenv('SONATYPE_STAGING_PROFILE_ID'))
1818

1919
ext {
@@ -95,7 +95,7 @@ android {
9595
abortOnError true
9696
checkAllWarnings = true
9797
warningsAsErrors true
98-
disable("GradleDependency", "UnknownNullness", "OldTargetApi")
98+
disable("GradleDependency", "UnknownNullness", "OldTargetApi", "AndroidGradlePluginVersion")
9999
}
100100
}
101101

lib/publish.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ afterEvaluate {
4545
}
4646
repositories {
4747
maven {
48-
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
48+
url = uri("https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/")
4949
credentials {
50-
username = ossrhUsername
51-
password = ossrhPassword
50+
username = sonatypeUsername
51+
password = sonatypePassword
5252
}
5353
}
5454
}

0 commit comments

Comments
 (0)