Skip to content

Commit

Permalink
Correct publishing env properties
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnatBeresnev committed Oct 19, 2023
1 parent 07dbe69 commit 02fab9b
Showing 1 changed file with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,39 @@ plugins {
signing
}

// TODO: recheck ENV variables - may be replace them with dokka specific renaming to DOKKA_*

publishing {
repositories {
maven {
name = "mavenCentral"
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
// TODO: recheck credentials
username = System.getenv("SONATYPE_USER")
password = System.getenv("SONATYPE_PASSWORD")
username = System.getenv("DOKKA_SONATYPE_USER")
password = System.getenv("DOKKA_SONATYPE_PASSWORD")
}
}
maven {
// TODO: recheck if we need it at all
name = "snapshot"
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
credentials {
username = System.getenv("SONATYPE_USER")
password = System.getenv("SONATYPE_PASSWORD")
username = System.getenv("DOKKA_SONATYPE_USER")
password = System.getenv("DOKKA_SONATYPE_PASSWORD")
}
}
maven {
name = "spaceDev"
url = uri("https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev")
credentials {
username = System.getenv("SPACE_PACKAGES_USER")
password = System.getenv("SPACE_PACKAGES_SECRET")
username = System.getenv("DOKKA_SPACE_PACKAGES_USER")
password = System.getenv("DOKKA_SPACE_PACKAGES_SECRET")
}
}
maven {
name = "spaceTest"
url = uri("https://maven.pkg.jetbrains.space/kotlin/p/dokka/test")
credentials {
// TODO: should it be different credentials from dev?
username = System.getenv("SPACE_PACKAGES_USER")
password = System.getenv("SPACE_PACKAGES_SECRET")
username = System.getenv("DOKKA_SPACE_PACKAGES_USER")
password = System.getenv("DOKKA_SPACE_PACKAGES_SECRET")
}
}
// Publish to a project-local Maven directory, for verification. To test, run:
Expand Down Expand Up @@ -90,9 +86,9 @@ publishing {

signing {
useInMemoryPgpKeys(
System.getenv("SIGN_KEY_ID")?.takeIf(String::isNotBlank),
System.getenv("SIGN_KEY")?.takeIf(String::isNotBlank),
System.getenv("SIGN_KEY_PASSPHRASE")?.takeIf(String::isNotBlank),
System.getenv("DOKKA_SIGN_KEY_ID")?.takeIf(String::isNotBlank),
System.getenv("DOKKA_SIGN_KEY")?.takeIf(String::isNotBlank),
System.getenv("DOKKA_SIGN_KEY_PASSPHRASE")?.takeIf(String::isNotBlank),
)
sign(publishing.publications)
setRequired(provider { !project.version.toString().endsWith("-SNAPSHOT") })
Expand Down

0 comments on commit 02fab9b

Please sign in to comment.