Convention Plugins

what are the reasons to use gradle convention plugin instead of using common gradle file and apply it from project root dir? is it faster or slower?

I can’t find any reason to use the convention plugin except for a link to plugins instead of specifying the path to common module settings.

Assuming you mean using “apply from”, those are so-called legacy script plugins that have various quirks and problems and thus are highly discouraged. For example you easily run into hard to debug classloader problems. And you also cannot use the plugins { ... } DSL but have to use the legacy “apply plugin” syntax which is also discouraged. Also when using Kotlin DSL for the script plugins, in legacy script plugins you do not get type-safe accessors generated as those are only generated for things added by plugins applied in the plugins { ... ] DSL.

1 Like