Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/maven-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:

- name: Publish Android/Java Packages to Maven
shell: bash
run: ./gradlew publish -PisSnapshot=false --stacktrace
run: ./gradlew publishToSonatype -PisSnapshot=false --stacktrace
env:
MAVEN_USERNAME: ${{ inputs.ossr-username }}
MAVEN_PASSWORD: ${{ inputs.ossr-token }}
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ buildscript {

plugins {
id 'org.jetbrains.dokka' version '1.9.20'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
}

subprojects {
Expand Down
17 changes: 8 additions & 9 deletions gradle/maven-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ task sourcesJar(type: Jar) {
from android.sourceSets.main.java.source
}

final releaseRepositoryUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
final snapshotRepositoryUrl = "https://oss.sonatype.org/content/repositories/snapshots/"

publishing {
publications {
Expand Down Expand Up @@ -69,13 +67,14 @@ publishing {
}
}
}
repositories {
maven {
name = "sonatype"
url = version.endsWith('SNAPSHOT') ? snapshotRepositoryUrl : releaseRepositoryUrl
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")

nexusPublishing {
repositories {
sonatype{
nexusUrl.set(uri('https://ossrh-staging-api.central.sonatype.com/service/local/'))
snapshotRepositoryUrl.set(uri('https://central.sonatype.com/repository/maven-snapshots/'))
username.set(System.getenv("MAVEN_USERNAME"))
password.set(System.getenv("MAVEN_PASSWORD"))
}
}
}
Expand Down