Skip to content

Commit

Permalink
use special nexus publish plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
scrayos committed Mar 14, 2024
1 parent 12e80e2 commit d4bb033
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
21 changes: 13 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@file:Suppress("UnstableApiUsage")

import com.google.protobuf.gradle.id
import org.gradle.internal.impldep.org.bouncycastle.cms.RecipientId.password
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType

// define the gav coordinates of this project
Expand All @@ -16,6 +17,7 @@ plugins {
alias(libs.plugins.kotlin)
alias(libs.plugins.dokka)
alias(libs.plugins.kover)
alias(libs.plugins.nexusPublish)
alias(libs.plugins.protobuf)
alias(libs.plugins.sonarqube)
alias(libs.plugins.ktlint)
Expand Down Expand Up @@ -130,18 +132,21 @@ val dokkaJavadocJar = tasks.register<Jar>("dokkaJavadocJar") {
archiveClassifier.set("javadoc")
}

nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_PASSWORD")
}
}
}

// configure the publishing in the maven repository
publishing {
// define the repositories that shall be used for publishing
repositories {
maven {
name = "OSSRH"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_PASSWORD")
}
}
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/scrayosnet/xenos-client-kotlin")
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ kover = { id = "org.jetbrains.kotlinx.kover", version = "0.7.6" }
protobuf = { id = "com.google.protobuf", version = "0.9.4" }
sonarqube = { id = "org.sonarqube", version = "4.4.1.3373" }
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version = "12.1.0" }
nexusPublish = { id = "io.github.gradle-nexus.publish-plugin", version = "1.3.0" }

0 comments on commit d4bb033

Please sign in to comment.