-
Notifications
You must be signed in to change notification settings - Fork 460
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
Break into spotless-lib (reusable for other projects) and spotless-gradle #56
Comments
I actually thought about this a few weeks ago, but I was unsure about the usefulness of it, so I never raised it. I look forward to any results you find from your investigation! |
I think it's an improvement. I'm gonna merge |
These are the proposed new maven coordinates for 3.0:
The current maven coordinate is
It's tempting to not move it at all, but since spotless 3.0 is likely to already require some small changes from existing users, we might as well optimize for lack-of-confusion for future users. My biggest design conflict is what the dependency policy for Todos:
There's a real need to burn-down some of the docs for all this too... |
|
Regarding the latter TODOs in #56 (comment), I wonder if you could you clarify what they're about for me. For example, are they about migrating non-test classes (like |
They're about moving all FormatterStep from plugin-gradle to lib, so that the they can be reused in other plugins. Hope you feel better soon :) |
|
|
@nedtwigg, I wonder if I may have your thoughts on how we could migrate the tests that depend on The best idea I have so far which I'd be able to implement myself, is to simply copy-and-paste the needed parts of Would it be possible to make e.g. a Gradle module in which we could chuck in all of our test utils, and have the other modules depend on it? I ask as I'm not really familiar with how multi-module Gradle builds work. |
Yeah, I struggled with this a little over the weekend. There's a couple issues:
Here's my gut:
I've got some progress on this, lemme know when would be a good time for me to upload without causing conflicts for you. |
Oh fantastic! I see that there was a lot to consider here, so many thanks for looking into it so much already. I'm ready whenever you're ready to upload your current progress. |
Roger, I'll try to put it up in a few hours. |
Does 15 hours count as a few? Sorry for delay, had a lot on my plate today. Probably won't be able to write code for this for the rest of the week, but I think we've now got the final structure. I'll start migrating artifacts into jcenter to get ready for putting them into mavenCentral. Introduced testlib in 1fd857e, and moved lots of stuff out of gradle-plugin and into lib. I think everything is now where it belongs, except:
Should all have their implementations in |
Haha, no worries! I happened to be asleep during most of those 15 hours, so it definitely counts as only "a few" in my book. :)
Cool stuff.
Okay. Just wanted to warn you that things are getting busy for me again, so I don't know when I'll be able to tackle any of the bullet points above (or indeed the rest of the seemingly never-ending deluge of tasks we need to finish up before shipping So let's tackle everything one step at a time and at our own pace. :) |
@nedtwigg The bullet points in your last message have now been dealt with by yours truly. :) The tests have yet to be migrated, so that's our next step. |
IndentStepTest has been migrated as of 2ff0364. |
@nedtwigg GoogleJavaFormatTest has now been... uh, "migrated", so to speak, as of commit 240fb7c. However, I've left the contents of what was originally GoogleJavaFormatTest and is now GoogleJavaFormatIntegrationTest alone, as it's not clear to me if it should removed in any way, either fully or partially. May I have your feedback on what should be done with |
Looks perfect as-is. The gradle integration test is prrroobably overkill for future rules that get added when there's a nice test in lib, but it's nice to have a few end-to-end checks in the test suite. Well done! |
Spotless now has quite a few utilities for mass string manipulation which are useful outside of a gradle plugin:
If we break the core functionality into spotless-lib, that would allow spotless-maven, etc. It would also speed up the spotless test suite by relying less on the excellent but slow gradle testkit. Going to explore this in the
spotless-lib
branch.The text was updated successfully, but these errors were encountered: