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

Breaking changes in ktfmt 0.31 #1117

Closed
2 tasks
msfjarvis opened this issue Feb 3, 2022 · 3 comments · Fixed by #1118
Closed
2 tasks

Breaking changes in ktfmt 0.31 #1117

msfjarvis opened this issue Feb 3, 2022 · 3 comments · Fixed by #1118

Comments

@msfjarvis
Copy link

ktfmt 0.31 was just released which includes a couple breaking changes for Spotless. Specifically

  • Library usage was updated to make the format method no longer be a top-level method. It is now inside the Formatter object.
  • The binaries for 0.31 appear to have been published to Maven Central's new S01 infrastructure, which means the dependency needs to be resolved from https://repo1.maven.org/maven2 as opposed to https://repo.maven.org/maven2.

I'm not super familiar with reflection so it might take me a day or two before I can propose a PR for at least the first part of this. Let me know if you'd prefer to do it yourself faster.

@nedtwigg
Copy link
Member

nedtwigg commented Feb 3, 2022

PR is very welcome, I've got no plans to integrate these changes. If you'd like, you can avoid reflection entirely by following an example from #524. Could do if (version < 31) { existingCode() } else { newCode() }

@msfjarvis
Copy link
Author

Oh that looks much easier, I will try that approach out. Thanks a lot!

@nedtwigg
Copy link
Member

nedtwigg commented Feb 9, 2022

Fixed in plugin-gradle 6.2.2 and plugin-maven 2.20.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants