Hey <@UN85K2RQR>, following up what you wrote here...
# ktfmt
g
Hey @Colton Idle, following up what you wrote here: https://twitter.com/ColtonIdle/status/1388540306979708928 Do you need any support?
c
@gammax thanks for getting back to me. I decided to try to apply ktfmt via spotless and even though it seems like I should use
subprojects{}
according to @Javier and this github issue (https://github.com/diffplug/spotless/issues/755) BUT I tried using
target(**/*.kt)
and it applied to all of my modules. So I guess I don't need the
subprojects
block? My setup
Copy code
target("**/*.kt", "**/*.kts")
        targetExclude("$buildDir/**/*.kt")
g
What's the problem with using subprojects?
c
I just didn't know how to do that (docs don't mention it) and it honestly makes sense to me that a code formatter would be applied on a codebase level not a module level so it just steered me in the direction of doing somethingn like this. For example, I first played around with ktfmt by just taking the jar and applying it to the root of the project. That's essentially my thinking. Just take the jar and run it on all kt and kts files