Skip to content

Configure maven central publishing #1042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2025
Merged

Conversation

loosebazooka
Copy link
Member

@loosebazooka loosebazooka commented Aug 6, 2025

should consume secrets from gcp during publishing. Note that this means we have moved our pgp key to something else and we must document that releases 2.x onwards use the new key.

@loosebazooka loosebazooka force-pushed the gcp-secrets-to-central-publish branch from b2656a5 to 28171bb Compare August 6, 2025 20:06
Comment on lines +30 to +31
nmcpAggregation(project(":sigstore-java"))
nmcpAggregation(project(":sigstore-maven-plugin"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add gradle plugin artifacts as well

Copy link
Member Author

@loosebazooka loosebazooka Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is creating some issue where it's trying to apply the plugin on itself? We can try to add it in after, but for now, I'd like to get this in so we can publish these (and still publish the plugins to the portal)

An exception occurred applying plugin request [id: 'build-logic.java-published-library']
> Failed to apply plugin 'dev.sigstore.sign'.
   > Plugin with id 'dev.sigstore.sign-base' not found.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the changes and how do you reproduce the error of "Failed to apply plugin 'dev.sigstore.sign'"?

diff --git a/build.gradle.kts b/build.gradle.kts
index bb9cfe5..fa3933a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -29,4 +29,6 @@ nmcpAggregation {
 dependencies {
     nmcpAggregation(project(":sigstore-java"))
     nmcpAggregation(project(":sigstore-maven-plugin"))
+    nmcpAggregation(project(":sigstore-gradle:sigstore-gradle-sign-base-plugin"))
+    nmcpAggregation(project(":sigstore-gradle:sigstore-gradle-sign-plugin"))
 }
% CENTRAL_PORTAL_USERNAME=u CENTRAL_PORTAL_PASSWORD=p ./gradlew publishAggregationToCentralPortal -m
:sigstore-java:cleanupDirectory SKIPPED
:sigstore-java:generateBuildInfo SKIPPED
:sigstore-java:protobufDummy SKIPPED
:sigstore-java:extractProto SKIPPED
:sigstore-java:processResources SKIPPED
...
[Incubating] Problems report is available at: file:////sigstore-java/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.14.1/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 1

Copy link
Member Author

@loosebazooka loosebazooka Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hrmm interesting, maybe it doesn't add signing?

diff --git a/build.gradle.kts b/build.gradle.kts
index bb9cfe5..fa3933a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -29,4 +29,6 @@ nmcpAggregation {
 dependencies {
     nmcpAggregation(project(":sigstore-java"))
     nmcpAggregation(project(":sigstore-java"))
     nmcpAggregation(project(":sigstore-maven-plugin"))
+    nmcpAggregation(project(":sigstore-gradle:sigstore-gradle-sign-base-plugin"))
+    nmcpAggregation(project(":sigstore-gradle:sigstore-gradle-sign-plugin"))
 }
diff --git a/sigstore-gradle/sigstore-gradle-sign-base-plugin/build.gradle.kts b/sigstore-gradle/sigstore-gradle-sign-base-plugin/build.gradle.kts
index 8ef4908..0642901 100644
--- a/sigstore-gradle/sigstore-gradle-sign-base-plugin/build.gradle.kts
+++ b/sigstore-gradle/sigstore-gradle-sign-base-plugin/build.gradle.kts
@@ -1,5 +1,6 @@
 plugins {
     id("build-logic.kotlin-dsl-published-gradle-plugin")
+    id("build-logic.java-published-library")
     id("build-logic.test-junit5")
 }

diff --git a/sigstore-gradle/sigstore-gradle-sign-plugin/build.gradle.kts b/sigstore-gradle/sigstore-gradle-sign-plugin/build.gradle.kts
index 2b5133c..fe0322a 100644
--- a/sigstore-gradle/sigstore-gradle-sign-plugin/build.gradle.kts
+++ b/sigstore-gradle/sigstore-gradle-sign-plugin/build.gradle.kts
@@ -1,5 +1,6 @@
 plugins {
     id("build-logic.kotlin-dsl-published-gradle-plugin")
+    id("build-logic.java-published-library")
     id("build-logic.test-junit5")
 }

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that sigstore-gradle/sigstore-gradle-sign-base-plugin/build.gradle.kts already has id("build-logic.kotlin-dsl-published-gradle-plugin") which internally has id("build-logic.publish-to-central").
So the addition of id("build-logic.java-published-library") should not be needed for sigstore-gradle/*/build.gradle.kts

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while signing, etc is all configured in java-published-library

Apparently, we'd better move signing to publish-to-central or a separate file.
I might try signing the plugin itself.

However, I did use com.github.vlsi.state-vote-release plugin to release com.github.vlsi.state-vote-release, so the limitation of "plugin can't be used" sounds strange.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think you brought that up when we discussed it last time. I can't remember the details I think it might be lost in slack history unfortunately. If you find a solution I would love to include it. I was just unable to find one that worked.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might try once again and add a code comment

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any update here? I would like to unblock this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry, I did not intend to block the pr

@loosebazooka loosebazooka merged commit c053464 into main Aug 12, 2025
20 checks passed
@loosebazooka loosebazooka deleted the gcp-secrets-to-central-publish branch August 12, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants