From 06b3c5f77af85ad21da37f0ed94f11bf96e84838 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Fri, 23 Jan 2026 09:36:42 -0800 Subject: [PATCH 1/4] chore: Only accept credentials via command line. --- build.gradle.kts | 4 ---- gradle.properties | 2 -- 2 files changed, 6 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b51c1b4..aca96b1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,10 +3,6 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.external.javadoc.CoreJavadocOptions import org.gradle.external.javadoc.StandardJavadocDocletOptions -// These values come from gradle.properties or command line -val ossrhUsername: String? by project -val ossrhPassword: String? by project - buildscript { repositories { mavenCentral() diff --git a/gradle.properties b/gradle.properties index a7d4b18..0a27a47 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,6 @@ # x-release-please-start-version version=4.2.0 # x-release-please-end -ossrhUsername= -ossrhPassword= # See https://github.com/gradle/gradle/issues/11308 regarding the following property systemProp.org.gradle.internal.publish.checksums.insecure=true From e0cbe17790ee5c03f73beea1e3c4437192ec1922 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Fri, 23 Jan 2026 09:48:29 -0800 Subject: [PATCH 2/4] Add sonatype URLs. --- build.gradle.kts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index aca96b1..63731ed 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -222,7 +222,10 @@ if (project == rootProject) { configure { clientTimeout.set(Duration.ofMinutes(2)) // we've seen extremely long delays in creating repositories repositories { - sonatype() + sonatype { + nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) + snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) + } } } } From bfc07b775f0b3f4e1b1fc91110fd99a6221da73a Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Fri, 23 Jan 2026 10:21:10 -0800 Subject: [PATCH 3/4] Remove root project check. --- build.gradle.kts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 63731ed..064746f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -19,7 +19,7 @@ plugins { `maven-publish` idea id("org.jetbrains.kotlin.jvm") version "1.6.10" - id("io.github.gradle-nexus.publish-plugin") version "1.3.0" apply false + id("io.github.gradle-nexus.publish-plugin") version "1.3.0" } // Note about org.jetbrains.kotlin.jvm in the plugins block: @@ -217,15 +217,12 @@ publishing { } } -// Only configure nexus publishing when this is the root project -if (project == rootProject) { - configure { - clientTimeout.set(Duration.ofMinutes(2)) // we've seen extremely long delays in creating repositories - repositories { - sonatype { - nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) - snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) - } +nexusPublishing { + clientTimeout.set(Duration.ofMinutes(2)) // we've seen extremely long delays in creating repositories + repositories { + sonatype{ + nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) + snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) } } } From f6ce4acf3714a0467c29b1da079b7bcaefe0d4e2 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Fri, 23 Jan 2026 12:40:34 -0800 Subject: [PATCH 4/4] Correct credentials. --- .github/workflows/publish.yml | 4 ++-- build.gradle.kts | 17 ++++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e67e2a7..981a92e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -45,8 +45,8 @@ jobs: name: Get secrets with: aws_assume_role: ${{ vars.AWS_ROLE_ARN }} - ssm_parameter_pairs: '/production/common/releasing/sonatype/username = SONATYPE_USER_NAME, - /production/common/releasing/sonatype/password = SONATYPE_PASSWORD, + ssm_parameter_pairs: '/production/common/releasing/sonatype/central/username = SONATYPE_USER_NAME, + /production/common/releasing/sonatype/central/password = SONATYPE_PASSWORD, /production/common/releasing/java/keyId = SIGNING_KEY_ID' s3_path_pairs: 'launchdarkly-releaser/java/code-signing-keyring.gpg = code-signing-keyring.gpg' diff --git a/build.gradle.kts b/build.gradle.kts index 064746f..63731ed 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -19,7 +19,7 @@ plugins { `maven-publish` idea id("org.jetbrains.kotlin.jvm") version "1.6.10" - id("io.github.gradle-nexus.publish-plugin") version "1.3.0" + id("io.github.gradle-nexus.publish-plugin") version "1.3.0" apply false } // Note about org.jetbrains.kotlin.jvm in the plugins block: @@ -217,12 +217,15 @@ publishing { } } -nexusPublishing { - clientTimeout.set(Duration.ofMinutes(2)) // we've seen extremely long delays in creating repositories - repositories { - sonatype{ - nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) - snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) +// Only configure nexus publishing when this is the root project +if (project == rootProject) { + configure { + clientTimeout.set(Duration.ofMinutes(2)) // we've seen extremely long delays in creating repositories + repositories { + sonatype { + nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) + snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) + } } } }