-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: update to use newer nexus publish plugin #24
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tabling this, just uploading with my notes in case someone else can pick it up. CC @ravisingal
@@ -56,5 +56,6 @@ plugins { | |||
|
|||
#### Releasing repositories | |||
```bash | |||
FIXME: This has changed, as has publish https://github.com/gradle-nexus/publish-plugin/wiki/Migration-from-gradle_nexus_staging-plugin---nexus_publish-plugin-duo#tasks---simple-case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
publish needs to be rewired, as well as updating consumers to use new task names.
@@ -20,7 +20,7 @@ public static void setup() { | |||
project.getPluginManager().apply("org.hypertrace.publish-maven-central-plugin"); | |||
project.getExtensions().getByType(HypertracePublishMavenCentralExtension.class).license.set(License.APACHE_2_0); | |||
project.getExtensions().getByType(HypertracePublishMavenCentralExtension.class).repoName.set("test"); | |||
project.getTasksByName("tasks", false); | |||
project.getAllTasks(true); // FIXME: why is this failing - something with kotlin dsl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one's weird, I think it's something like a difference in the third-party's kotlin version vs our own.
project.getRootProject().getPluginManager() | ||
.apply(NexusStagingPlugin.class); | ||
private void applyNexusPlugin() { | ||
// FIXME - modifying root from a child is problematic and an error in gradle 7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the heart of the problem that lead me to upgrade. The plugin as is doesn't work for gradle 7, both with this PR and without it. Gradle <7 warned and ignored when modifying root, Gradle 7+ errors. Both the old third party and new third party require application on root, so our options are:
- Make this a root plugin, and have it modify children (this is what the third party does, but ugly)
- Split and make two different root and child plugins
- Make one plugin with two "modes" for how to act when applied to root vs child. Very against this though.
Description
Please include a summary of the change, motivation and context.
Testing
Please describe the tests that you ran to verify your changes. Please summarize what did you test and what needs to be tested e.g. deployed and tested helm chart locally.
Checklist:
Documentation
Make sure that you have documented corresponding changes in this repository or hypertrace docs repo if required.