Skip to content

Commit

Permalink
fix: use maven.publish plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
diogomatsubara committed Nov 19, 2024
1 parent be6bd21 commit c95d77b
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions zenoh-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -149,33 +149,20 @@ kotlin {

repositories {
maven {
name = "GithubPackages"
name = "githubPackages"
url = uri("https://maven.pkg.github.com/eclipse-zenoh/zenoh-kotlin")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
maven {
name = "MavenCentral"
url = uri(if (project.hasProperty("SNAPSHOT"))
"https://oss.sonatype.org/content/repositories/snapshots/"
else
"https://oss.sonatype.org/service/local/staging/deploy/maven2/"
)
credentials {
username = System.getenv("ORG_OSSRH_USERNAME")
password = System.getenv("ORG_OSSRH_PASSWORD")
}
// username and password (a personal Github access token) should be specified as
// `githubPackagesUsername` and `githubPackagesPassword` Gradle properties or alternatively
// as `ORG_GRADLE_PROJECT_githubPackagesUsername` and `ORG_GRADLE_PROJECT_githubPackagesPassword`
// environment variables
credentials(PasswordCredentials::class)
}
}
}
}

signing {
isRequired = isRemotePublication
useInMemoryPgpKeys(System.getenv("ORG_GPG_SUBKEY_ID"), System.getenv("ORG_GPG_PRIVATE_KEY"), System.getenv("ORG_GPG_PASSPHRASE"))
sign(publishing.publications)
publishToMavenCentral()

signAllPublications()
}

tasks.withType<PublishToMavenRepository>().configureEach {
Expand Down

0 comments on commit c95d77b

Please sign in to comment.