-
Notifications
You must be signed in to change notification settings - Fork 455
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
Use custom source sets and compile-only dependencies instead of reflection #524
Labels
Comments
This was referenced Feb 13, 2020
6 tasks
nedtwigg
added a commit
to tisoft/spotless
that referenced
this issue
Sep 30, 2021
nedtwigg
added a commit
that referenced
this issue
Dec 3, 2021
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Spotless supports many formatters, and they have many transitive dependencies. We write most integration code using reflection, so that we don't have to reconcile the conflicting transitive dependencies of every formatter we support.
An easier-to-use, but harder-to-setup method is to create a custom source set with
compileOnly
dependencies. e.gsrc/main/java-scalafmt
. We're happy to accept piecemeal PR's which do this for any formatter that a contributor is interested in - no need to convert everything.When contributing a PR of this sort, there is no need to worry about older versions of the formatter - we can always use the old reflection code to maintain support for these old versions if necessary.
Completed examples:
The text was updated successfully, but these errors were encountered: