But basically you can save yourself a world of pai...
# gradle
e
But basically you can save yourself a world of pain with the Kotlin Gradle DSL by defining your external plugin modules as part of your buildSrc
dependencies { ... }
block
. Think of buildSrc as the sourceSet for your build logic (build scripts). Adding external plugin modules in your buildSrc dependencies makes the plugin classes available to your build scripts (classes are available to kotlin DSL scripts without you having to define them in the
plugins { ... }
block of your module build scripts). Another good thing is that you dont need the
pluginManagement { … }
block in settings.gradle(.kts) anymore. Downside of this approach is probably that each script classpath is slightly bigger. Also, you cant use buildSrc constants in your buildSrc build.gradle(.kts) 😄. Also, this doesn’t really solve the “problem” of the generated accessors but between the available types and the rest of the kotlin DSL, you should be able to still have clean readable typed build logic.