I’m working on an Android project and I’m using the modern plugin definition like so in my top level build.gradle file
plugins {
alias(libs.plugins.android) apply false
alias(libs.plugins.kotlin.android) apply false
...
For reference my toml file has the following
android = { id = "com.android.application", version.ref = "android-build-tools-plugin" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
Now in the “app” gradle module I would like to apply the plugins that I previously didn’t apply, as I want to apply them on a module by module basis. But ideally I wouldn’t do this:
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
I would do something like this
plugins {
id libs.plugins.android.id
id libs.plugins.kotlin.android.id
}
Is this possible? I know for getting integers from the versions file you can do things like
compileSdk libs.versions.compileSdk.get() as Integer