`spotlessPredeclare` accessor is not available in kotlin scripts
In Gradle kotlin scripts, spotlessPredeclare is not available as an assessor. In order to use this , one has to access it via the extensions API, e.g. using kotlin's with.
with(extensions["spotlessPredeclare"] as SpotlessExtension) { ... }
Looking at the codebase, I noticed the spotlessPredeclare is not created when the plugin is applied.
https://github.com/diffplug/spotless/blob/db6a60eff69b7d37cfdceab0aff39100c05e422e/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessPlugin.java#L51-L52
Maybe it's on purpose and I wonder why, but maybe it's not and maybe this can be added relatively easily.
spotlessPredeclare has two modes:
https://github.com/diffplug/spotless/blob/acc621eb709abddb093057c5cbb8f0e7345fb604/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessExtension.java#L327-L343
Happy to take a PR which makes this more Kotlin-friendly.