That is correct, but I would advice you to write convention plugins instead. Those are pre-compiled script plugins in a separate build you include as composite build, for example in
gradle/build-src
or in the special
buildSrc
build. This has various advantages, especially when issuing the Kotlin DSL, as you for example get type-safe accessors generated for plugins you apply via
plugins
block and thus can write on them almost the same as in the
build.gradle.kts
. For normal script plugins (the ones you apply with
from
) this is not the case and you have to use the verbose generic APIs.