[Discussion] Make plugin project isolation compatible
I want to use this PR has a starting point to discuss making this plugin Project Isolation compatible and solving #302.
I believe what I have right now to be the minimal amount of changes needed to support project isolation. Before I commit to further work on this, I wanted to get some feedback on the approach here.
Main changes:
-
DoctorPluginis now broken up into 3 plugins: a settings pluginDoctorSettingsPlugin, a root project pluginDoctorPlugin, and a module pluginDoctorChildModulePlugin -
com.osacky.doctornow points to the settings plugin class and must be applied in settings.gradle - The extension is configured in settings.gradle and shared to all project following this pattern
- Child modules use a build service to register back to the root project if the Android app plugin gets applied in order to support the
allowBuildingAllAndroidAppsSimultaneouslysettings. Though I'm not sure how useful this actually is
From my testing on our large 900+ module project it seems to work as before and no longer violates project isolation. I have not tested if there are any differences in performance.
Thanks for scoping this out and the detailed PR summary. I like your approach. In general it makes senes to break up the doctor plugin in to a settings plugin anyways. Please continue! And sorry for the super long delay in reviewing this.