Skip to content

[Discussion] Make plugin project isolation compatible#384

Draft
wbonnefond wants to merge 5 commits into
runningcode:masterfrom
wbonnefond:wb/project-isolation
Draft

[Discussion] Make plugin project isolation compatible#384
wbonnefond wants to merge 5 commits into
runningcode:masterfrom
wbonnefond:wb/project-isolation

Conversation

@wbonnefond
Copy link
Copy Markdown

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.

@runningcode
Copy link
Copy Markdown
Owner

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.

@wbonnefond wbonnefond force-pushed the wb/project-isolation branch from c77758d to c097074 Compare March 19, 2025 19:08
@consp1racy
Copy link
Copy Markdown

Hi, can we do this first (#469) and refactor later?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants