nowinandroid icon indicating copy to clipboard operation
nowinandroid copied to clipboard

Apply version catalog in the convention plugins

Open Jaehwa-Noh opened this issue 1 year ago • 3 comments

Apply version catalog in the convention plugins.

Jaehwa-Noh avatar Jun 27 '24 10:06 Jaehwa-Noh

Please explain why this is a good idea. At first glance, the lines like this:

libs.findPlugin("compose").get().get().pluginId

look less readable than the original

apply(plugin = "org.jetbrains.kotlin.plugin.compose")

dturner avatar Jul 02 '24 16:07 dturner

@dturner I think this is the good for SSOT, and when we would change plugins, we can change name or group in just one place libs.versions.toml. I agreed with you it is hard to read then origin, but I think that we can remove .get().get() using extension function.

Kindly leave your comment here. I'll change or close this PR. Thank you.

Jaehwa-Noh avatar Jul 03 '24 00:07 Jaehwa-Noh

@dturner I have improved the style more readable. It have had more clear context about the source, it comes from version catalog.

apply(plugin = libs.getPlugin("android.application"))

Is there anything more do I improve?

Jaehwa-Noh avatar Aug 11 '24 05:08 Jaehwa-Noh