Skip to content

Conversation

aaron-steinfeld
Copy link
Contributor

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:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

Documentation

Make sure that you have documented corresponding changes in this repository or hypertrace docs repo if required.

Copy link
Contributor Author

@aaron-steinfeld aaron-steinfeld left a 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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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.

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.

1 participant