Does anyone use ktfmt with spotless? <https://git...
# ktfmt
c
Does anyone use ktfmt with spotless? https://github.com/diffplug/spotless/blob/main/plugin-gradle/README.md#ktfmt I'm curious if anyone knows a way to just use latest ktfmt instead of updating the string manually in this config block
j
Yes
wops, I didnt see your question
I am using renovate/dependabot to upgrade the version of ktfmt
And I pass it to spotless
because the ktfmt artifact is in maven central, you can have it without adding it as dependency only to get the version with those tools
c
Interesting. I use dependabot too and it updates spotless but not ktfmt
j
you need to add the artifact
"com.facebook:ktfmt$ktfmtVersion"
👍 1
c
Copy code
plugins {
id("com.diffplug.spotless") version "5.15.1"
id("com.facebook:ktfmt") version "0.27"
After I added ktfmt like you said it won't compile anymore.
j
No no, as dependency
it is not a plugin
or even as a string if you only want dependabot updates it
c
hm. okay. not sure where to place that dependency exactly since this is in my root, but I will keep trying it out. Thanks Javier!
j
In any place it works with dependabot
you don't need to use it directly in dependencies or something so
👍 1