refactor: update to use newer nexus publish plugin#24
Draft
aaron-steinfeld wants to merge 1 commit into
Draft
Conversation
aaron-steinfeld
commented
Jun 8, 2022
Contributor
Author
aaron-steinfeld
left a comment
There was a problem hiding this comment.
Tabling this, just uploading with my notes in case someone else can pick it up. CC @ravisingal
|
|
||
| #### 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 |
Contributor
Author
There was a problem hiding this comment.
publish needs to be rewired, as well as updating consumers to use new task names.
| 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 |
Contributor
Author
There was a problem hiding this comment.
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 |
Contributor
Author
There was a problem hiding this comment.
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.
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.
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.