Benefits of binary plugin over script plugin

I am migrating a monolithic android project to KMP multi modular architecture. There are lots of common code in the build.gradle.kts so I dig in the gradle documentation and found the solution which is by creating a pre compiled script plugin and adding convention to it. Gradle automatically compiles that script into a plugin which I can use in the sub projects. It is quite easy to do but when I look into android samples, instead of script plugin, I see only binary plugins. So I am wondering what benefits would I get over script plugin If I create binary plugin.

Some just prefer one over the other.

Depending on situation it can also be a performance topic vs syntax sugar.

The “now in android” build went from 12.724s to 0.765s configuration time. But I don’t know under which conditions exactly. I’d guess a change that needs their rebuilding and thus also accessors generation and so on. Once built I would not expect a significant performance difference actually.

Thanks for the clarification. That makes sense — so the performance benefit mainly shows up in larger builds with many modules and convention plugins, especially when accessors regeneration is triggered.

In smaller or medium-sized projects, the difference would likely be negligible, correct?

That’s my gut feeling, but I have no numbers to prove it. If you really want to know for your situation, you need to measure it.