Thanks @TWiStErRob for this question. There is no way to finalize the plugin container. This is something we are actively working on with the Provider
API work, however, we aren’t at the level of locking containers as well as providing finalizing callback yet.
Unless your project has several thousands of subprojects, I would simply over-configure by registering all the tasks you require and disable the tasks if the android plugins get added. If performance is a concern, I would then profile the build in order to arrive at a quantifiable performance hit that we can then look at improving inside Gradle.