Publish solely to the Code Genome Project, dropping Maven Central - #462
Draft
timtebeek wants to merge 1 commit into
Draft
Publish solely to the Code Genome Project, dropping Maven Central#462timtebeek wants to merge 1 commit into
timtebeek wants to merge 1 commit into
Conversation
Follow-up to #461, which forwarded CGP credentials for dependency resolution. This moves the publication side over as well: the only Maven publication this repo had was the CI snapshot upload to Sonatype, which now goes to CGP's S3 bucket instead. Releases continue to go to the Gradle Plugin Portal, which is unaffected. The cgp repository mirrors rewrite-build-gradle-plugin's org.openrewrite.build.publish-cgp convention plugin, which this repo does not apply, and is only registered when AWS credentials are present so `publish` stays a no-op locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CGP_ARTIFACTS_MAVEN_*so the build could resolveorg.openrewrite/io.modernefrom the Code Genome Project. This moves the publication side over too.The only Maven publication this repo ever had was the CI snapshot upload to Sonatype —
org.openrewrite:pluginhas never existed on Maven Central proper (repo1.maven.org/.../org/openrewrite/plugin/is a 404; onlycentral.sonatype.com/repository/maven-snapshotshas it). So "drop Maven Central" here means: drop the Sonatype snapshot upload and the nexus-publish plumbing behind it. Releases keep going to the Gradle Plugin Portal viapublishPlugins, which is untouched.build.gradle.kts: dropio.github.gradle-nexus.publish-pluginand thenexusPublishingblock.plugin/build.gradle.kts: register thecgpS3 repository, mirroringRewriteCgpPublishPluginfromrewrite-build-gradle-plugin(region-qualified host so Gradle's S3 transport doesn't default to us-east-1;AwsCredentialsfrom the environment; optional session token). Registered only when both AWS credentials are non-empty, so./gradlew publishstays a no-op for anyone without them — same guard shape as the resolution repo added in Forward CGP artifact repository credentials for dependency resolution #461..github/workflows/ci.yml:publish-snapshotsnow runs:plugin:publishwithCGP_AWS_ACCESS_KEY_ID/CGP_AWS_SECRET_ACCESS_KEY(the secret namesgh-automationcallers already use) instead ofpublishPluginMavenPublicationToSonatypeRepositorywith the Sonatype and OSSRH signing secrets. Those signing secrets were inert anyway — no signing plugin is applied in this repo.README.md: snapshots are no longer anonymously consumable, so the snapshot section now points atartifacts.codegenomeproject.org/mavenwith credentials.One deliberate behavior change: the old command published only
pluginMaven, whereas:plugin:publishalso uploads therewritePluginMarkerMavenmarker, so snapshot consumers can use a plainplugins {}block. TheuseModuleresolution strategy in the README still works, so it stays for now.Verified locally: with fake AWS credentials,
:plugin:tasks --group=publishinglistspublishPluginMavenPublicationToCgpRepositoryand no Sonatype tasks; with the credentials unset, nocgptasks appear at all../gradlew snapshot :plugin:publish -x test -x publishPlugins --dry-runproduces the expected task graph, andactionlintpasses onci.yml. No upload was actually attempted, so the S3 write path itself rests on matching the convention plugin rather than on an observed run.