Thomas Keller
12/18/2025, 2:38 PMbuild.gradle.kts is evaluated (i.e. in afterEvaluate). So if I'd like to have some kind of configurability for a build convention plugin so that I can decide whether or not certain plugins are applied, how would I do that? Or is this impossible?
In plain words, an extension boolean property for convention-plugin to apply other-plugin when the extension property is set to true in the module's build.gradle.kts.
Or is the only other way to extract that part of the configuration into a separate build convention plugin and apply it in the module's build.gradle.kts ? Right now I try to group common configuration in "super convention plugins" that are applied to the specific module, but just now and then things get a little too heavy.Vampire
12/18/2025, 2:42 PMMartin
12/18/2025, 2:44 PMThomas Keller
12/18/2025, 2:53 PMabstract class KotlinCommonExtension @Inject constructor(private val project: Project) {
fun useCompose() {
project.plugins.withId("com.android.base") {
project.configureAndroidCompose()
}
project.plugins.withId("org.jetbrains.kotlin.multiplatform") {
project.configureMultiplatformCompose()
}
}
}Thomas Keller
12/18/2025, 2:54 PMVampire
12/18/2025, 2:58 PMproject.plugins (see its JavaDoc) but project.pluginManager, yes.tony
12/18/2025, 3:00 PMThomas Keller
12/18/2025, 3:03 PMThomas Keller
12/18/2025, 3:04 PM