gradle-doctor icon indicating copy to clipboard operation
gradle-doctor copied to clipboard

[Discussion] Make plugin project isolation compatible

Open wbonnefond opened this issue 1 year ago • 1 comments

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:

  • DoctorPlugin is now broken up into 3 plugins: a settings plugin DoctorSettingsPlugin, a root project plugin DoctorPlugin, and a module plugin DoctorChildModulePlugin
  • com.osacky.doctor now 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 allowBuildingAllAndroidAppsSimultaneously settings. 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.

wbonnefond avatar Dec 11 '24 22:12 wbonnefond

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.

runningcode avatar Jan 15 '25 01:01 runningcode