From b1f62355fa7f868b4c4ddc19f42dea15abbdc847 Mon Sep 17 00:00:00 2001 From: Sean Gilligan Date: Mon, 8 Jun 2026 18:02:36 -0700 Subject: [PATCH] WIP: Maven Central Publishing --- README.adoc | 26 ++------------------------ jreleaser.toml | 19 +++++++++++++------ scripts/maven-publish-release.sh | 3 ++- 3 files changed, 17 insertions(+), 31 deletions(-) diff --git a/README.adoc b/README.adoc index b9720990..42233f0b 100644 --- a/README.adoc +++ b/README.adoc @@ -66,31 +66,9 @@ The SECG secp256K1 curve was removed from Java in the JDK 16 release (see https: == Experimental Pre-Release binaries -Binary packages are available on https://gitlab.com/groups/bitcoinj/-/packages[GitLab.com]. You can download JARs or use the provided Maven coordinates to link to them directly from your `pom.xml` or `build.gradle`. +Binary packages are available on https://central.sonatype.com[Maven Central]. You can download JARs or use the provided Maven coordinates to link to them directly from your `pom.xml` or `build.gradle`. -WARNING:: This is an experimental pre-release and should be used only for testing and evaluation only. - -=== Add the GitLab Maven Package Repository - -To your `pom.xml`: - -[source,xml] ----- - - - secpjdk-repo - https://gitlab.com/api/v4/projects/55956336/packages/maven - - ----- - -Or to your `build.gradle`: - ----- -maven { - url 'https://gitlab.com/api/v4/projects/55956336/packages/maven' -} ----- +WARNING:: This is an experimental pre-release and should be used for testing and evaluation only. === Add Your Module Dependencies diff --git a/jreleaser.toml b/jreleaser.toml index 6d05388a..70d3d173 100644 --- a/jreleaser.toml +++ b/jreleaser.toml @@ -10,12 +10,19 @@ owner = "bitcoinj" name = "secp256k1-jdk" enabled = false -# Validate with Maven Central Rules and Deploy to our GitLab Maven Repo -[deploy.maven.gitlab.secp256k1-jdk] +[signing] active = "ALWAYS" -projectIdentifier = 55956336 -url = "https://gitlab.com/api/v4/projects/55956336/packages/maven" + +[signing.pgp] +armored = true +mode = "COMMAND" + +[signing.pgp.command] +executable = "gpg" +defaultKeyring = true + +[deploy.maven.mavenCentral.sonatype] +active = "ALWAYS" +url = "https://central.sonatype.com/api/v1/publisher" applyMavenCentralRules = true -sign = false -snapshotSupported = false stagingRepositories = ["target/repo-signed"] diff --git a/scripts/maven-publish-release.sh b/scripts/maven-publish-release.sh index 7a2798c7..644ca3f3 100755 --- a/scripts/maven-publish-release.sh +++ b/scripts/maven-publish-release.sh @@ -1,7 +1,8 @@ #!/bin/sh # Validate and publish release artifacts to our GitLab Maven artifact rpo # This should be run from the project root directory and inside the `nix develop` shell -# JRELEASER_GITLAB_TOKEN should be set before running +# `JRELEASER_MAVENCENTRAL_SONATYPE_USERNAME` and `JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_PASSWORD` +# should be set before running if [[ $1 != "--dry-run" && $1 != "" ]]; then echo "Usage: $0 [--dry-run]" exit 1