Vivek Modi
04/15/2025, 6:28 PMlibs.versions.toml
version catalog in the build-logic:convention
module.Vivek Modi
04/15/2025, 6:28 PMgradlePlugin {
plugins {
register("androidApplicationCompose") {
id = libs.plugins.nowinandroid.android.application.compose.get().pluginId
implementationClass = "AndroidApplicationComposeConventionPlugin"
}
register("androidApplication") {
id = libs.plugins.nowinandroid.android.application.asProvider().get().pluginId
implementationClass = "AndroidApplicationConventionPlugin"
}
// ... more plugins
}
}
Vivek Modi
04/15/2025, 6:29 PM.get()
directly (e.g., compose.get()
), while others use .asProvider().get()
(e.g., application.asProvider().get()
).Vivek Modi
04/15/2025, 6:29 PMlibs.versions.toml
, these plugins are declared normally under [plugins]
or indirectly referenced.
My questions are:
1. What's the difference between plugin.get()
and plugin.asProvider().get()
?
2. Is one preferred over the other in certain scenarios?
3. Could this difference be caused by how the plugin is defined in libs.versions.toml
?
Any clarification would be helpful! I'm trying to standardize how plugins are registered in the convention plugins module.ephemient
04/15/2025, 6:33 PMfoo
and foo-bar
defined in the version catalog, then libs.foo
doesn't have a .get()
, as it's of a different type so that libs.foo.bar
can exist. but libs.foo.bar
has a get()
because it has no nested childrenephemient
04/15/2025, 6:33 PMVivek Modi
04/16/2025, 11:06 PM