File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed
.github/actions/maven-publish Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 3030
3131 - name : Publish Android/Java Packages to Maven
3232 shell : bash
33- run : ./gradlew publish -PisSnapshot=false --stacktrace
33+ run : ./gradlew publishToSonatype -PisSnapshot=false --stacktrace
3434 env :
3535 MAVEN_USERNAME : ${{ inputs.ossr-username }}
3636 MAVEN_PASSWORD : ${{ inputs.ossr-token }}
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ buildscript {
2121
2222plugins {
2323 id ' org.jetbrains.dokka' version ' 1.9.20'
24+ id ' io.github.gradle-nexus.publish-plugin' version ' 2.0.0'
2425}
2526
2627subprojects {
Original file line number Diff line number Diff line change @@ -14,8 +14,6 @@ task sourcesJar(type: Jar) {
1414 from android. sourceSets. main. java. source
1515}
1616
17- final releaseRepositoryUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
18- final snapshotRepositoryUrl = " https://oss.sonatype.org/content/repositories/snapshots/"
1917
2018publishing {
2119 publications {
@@ -69,13 +67,14 @@ publishing {
6967 }
7068 }
7169 }
72- repositories {
73- maven {
74- name = " sonatype"
75- url = version. endsWith(' SNAPSHOT' ) ? snapshotRepositoryUrl : releaseRepositoryUrl
76- credentials {
77- username = System . getenv(" MAVEN_USERNAME" )
78- password = System . getenv(" MAVEN_PASSWORD" )
70+
71+ nexusPublishing {
72+ repositories {
73+ sonatype{
74+ nexusUrl. set(uri(' https://ossrh-staging-api.central.sonatype.com/service/local/' ))
75+ snapshotRepositoryUrl. set(uri(' https://central.sonatype.com/repository/maven-snapshots/' ))
76+ username. set(System . getenv(" MAVEN_USERNAME" ))
77+ password. set(System . getenv(" MAVEN_PASSWORD" ))
7978 }
8079 }
8180 }
You can’t perform that action at this time.
0 commit comments