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
19 changes: 14 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ buildscript {
}
dependencies {
classpath("com.google.protobuf:protobuf-gradle-plugin:0.8.19")
classpath("io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0")
classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.9.20")
}
}
Expand All @@ -29,6 +28,7 @@ plugins {
id("io.codearte.nexus-staging") version "0.30.0"
id("com.google.protobuf") version "0.8.19"
id("com.diffplug.spotless") version "6.21.0"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}

java {
Expand Down Expand Up @@ -147,10 +147,19 @@ tasks.test {
useJUnitPlatform()
}

nexusStaging {
serverUrl = "https://s01.oss.sonatype.org/service/local/"
packageGroup = properties["GROUP"] as String
stagingProfileId = "16b57cbf143daa"
group = properties["GROUP"].toString()
version = properties["VERSION_NAME"].toString()

nexusPublishing {
repositories {
sonatype {
//only for users registered in Sonatype after 24 Feb 2021
username.set(properties["nexusUsername"].toString())
password.set(properties["nexusPassword"].toString())
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
}
}
}

publishing {
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=livekit
POM_DEVELOPER_NAME=LiveKit

RELEASE_REPOSITORY_URL=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
SNAPSHOT_REPOSITORY_URL=https://s01.oss.sonatype.org/content/repositories/snapshots/
RELEASE_REPOSITORY_URL=https://ossrh-staging-api.central.sonatype.com/service/local/
SNAPSHOT_REPOSITORY_URL=https://central.sonatype.com/repository/maven-snapshots/

# Variables required to allow build.gradle to parse for publishing.
# WARNING: Do not edit this and potentially commit to repo.
Expand Down
4 changes: 2 additions & 2 deletions gradle/gradle-mvn-push.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ def isReleaseBuild() {

def getReleaseRepositoryUrl() {
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
: "https://ossrh-staging-api.central.sonatype.com/service/local/"
}

def getSnapshotRepositoryUrl() {
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
: "https://oss.sonatype.org/content/repositories/snapshots/"
: "https://central.sonatype.com/repository/maven-snapshots/"
}

def getRepositoryUsername() {
Expand Down