how do I use version catalogs in convention plugin...
# community-support
b
how do I use version catalogs in convention plugins? looks like the libs object is not available
1
t
See docs.gradle.org/current/userguide/version_catalogs.html#…
Copy code
val libs = extensions.getByType(VersionCatalogsExtension::class.java).named("libs")
// …
libs.findLibrary("guava").get()
b
thank you
p
The alias usage in the plugins block has a small disadvantage: the plugins block is extracted in a small Kotlin script file. The handwritten parser of the plugins block does not support aliases, so it uses another Kotlin compilation as a fallback for the extracted plugins block, additional to the main compilation of the precompiled Kotlin scripts.