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

Don't redundantly apply BasePlugin #1226

Closed
wants to merge 2 commits into from
Closed

Conversation

ZacSweers
Copy link
Contributor

This sort of prevents use of predeclared deps because it doesn't check if the base plugin has already been applied. Better to just hook into this callback for when the plugin is applied and perform its relevant logic there

This sort of prevents use of predeclared deps because it doesn't check if the base plugin has already been applied. Better to just hook into this callback for when the plugin is applied and perform its relevant logic there
@ZacSweers
Copy link
Contributor Author

I don't have access to the assemble_and_test failure

Copy link
Member

@nedtwigg nedtwigg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this change, it's possible, that base might never get applied. The problem with that is there won't be a build or check task. Example user story:

Spotless always applied base eagerly until 6.0.3 when we stopped, then we started again because of the story above in 6.5.0.

I want to solve your problem, but I'm stuck between that and not recreating the problems we created.

sort of prevents use of predeclared deps because it doesn't check if the base plugin has already been applied.

I don't understand why the eager application causes this.

@@ -35,8 +35,6 @@ public void apply(Project project) {
if (project.hasProperty(SPOTLESS_MODERN)) {
project.getLogger().warn("'spotlessModern' has no effect as of Spotless 5.0, recommend removing it.");
}
// make sure there's a `clean` and a `check`
project.getPlugins().apply(BasePlugin.class);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the gradle docs:

Applies the given plugin. Does nothing if the plugin has already been applied.

@nedtwigg
Copy link
Member

nedtwigg commented Jun 2, 2022

Also, you can see test failures here.

@ZacSweers
Copy link
Contributor Author

Turned out to be a misunderstanding of the error traces we got in our codebase 👍

@ZacSweers ZacSweers closed this Jun 2, 2022
@ZacSweers ZacSweers deleted the patch-1 branch June 2, 2022 05:06
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.

2 participants