MΓ³dulo 16 Β· Modularize by Feature β LecciΓ³n 3 de 4 Β· ~8 min
Convention plugins
Every module repeats the same config
With a dozen-plus modules, each build.gradle.kts needs roughly the same boilerplate: compileSdk, minSdk, Kotlin compiler options, the Compose compiler setup, common test dependencies. Copy-pasting that into every module means when it needs to change β bumping compileSdk, say β you're hand-editing a dozen files and hoping you didn't miss one.
Convention plugins solve this: write the shared config once, as a Gradle plugin, then have each module apply it by id. The plugin lives in a special included build β by convention, a directory named build-logic β which Gradle builds first and makes available to the rest of the project as if it were a published plugin.