Curious if this is worth filing a bug. <https://f...
# ktfmt
c
Curious if this is worth filing a bug. https://facebookincubator.github.io/ktfmt/ under gradle the docs say:
Copy code
# build.gradle.kts
plugins { id("com.diffplug.spotless") }
    
// version and style are optional
spotless { kotlin { ktfmt('0.25').kotlinlangStyle() } }
but spotless docs say:
Copy code
spotless { // if you are using build.gradle.kts, instead of 'spotless {' use:
           // configure<com.diffplug.gradle.spotless.SpotlessExtension> {

...
So should it be
spotless {
or
configure<com.diffplug.gradle.spotless.SpotlessExtension> {
for kts files? Are the spotless docs wrong/out of date? Or should the ktfmt website show the proper api for applying to a kts file? (this is a super small detail but as someone that just felt like they jumped through a bunch of hoops to get this working with kts build files on Android, I want to make sure the docs are up to date) 😄
j
Both are the same. If for some reason the accessor is not generated, you have to use configure, if the accessor is generated, you can use it or configure.
c
Interesting...
j
A tip, kts files has an easy way to access to the source via control + click or CMD + click. Probably if you clicks on the accessor, it will show a ext function which is using the SpotlessExtension under the hood