Skip to content
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

#350 - Rework publishing plugins so they can be used externally and on multi-project builds #355

Open
wants to merge 2 commits into
base: 7.0.x
Choose a base branch
from

Conversation

jdaugherty
Copy link

@jdaugherty jdaugherty commented Nov 20, 2024

This change resolves #350. At a high level it:

  1. Removes unused extension properties
  2. Removes "internal" from publish namespaces & Rename plugins to reflect they aren't only for grails central
  3. Updates the gradle enterprise logic that was commented out with the initial upgrade to grails 7 (jumps to latest version)
  4. Updates the github actions to match grails-core (to pickup the gradle enterprise updates)
  5. Adds documentation for the publish plugin
  6. Supports publishing to artifactory or maven central for snapshots
  7. Migrates the username, password, and url properties to properties / environment variables only. using a publish plugin will require a snapshot url property to be defined based on the snapshot repository type. My assumption is we'll add these to the gradle.properties in each project
  8. Supports defining the grailsPublish block at the subproject level.

With these changes, any project can remove the gradle boiler plate of publishing to maven central & an artifactory snapshot instance. Technically, it doesn't have to be a grails project to use this plugin. If it is a grails plugin then the plugin.xml will be added as an artifact for the publish plugin and for the profile plugin it will generate the associated profile.xml.

I tested the snapshot portion of this logic with this code spring security rest code. @jeffscottbrown was kind enough to assist in testing. You can find an example artifact here - (I published to the wrong repo initially, oops).

Once this change is merged, all of the repositories with grailsPublish will have broken publishing since the urls will be missing. I plan to go through all of them quickly and set the appropriate snapshot url (plugins go here & profiles go here) to fix this breakage. Separately, I'll go through the various multi-projects that couldn't use grailsPublish and switch them to grails publish (like the spring security rest plugin).

As part of the milestone announcement, we can offer these plugins to people so they can use them to simplify plugin upgrades. I'd like to provide an example github action too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the Gradle Publish Plugins & Move them to public available instead of internal
2 participants