Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate focus.settings.gradle when new module asi added #30

Open
MichalKlusak opened this issue Sep 2, 2022 · 1 comment
Open

Regenerate focus.settings.gradle when new module asi added #30

MichalKlusak opened this issue Sep 2, 2022 · 1 comment

Comments

@MichalKlusak
Copy link

When I'm focused to module A and add (or merge) new module B to settings-all.gradle, gradle doesn't know module B when gradle sync and I have to call focus task again to generate new focus.settings.gradle.

Would it be possible that focus recognize during gradle sync that settings-all.gradle was changed and regenerate focus.settings.gradle automatically so I don't need to call focus task again?

@rharter
Copy link
Collaborator

rharter commented Dec 9, 2023

"Gradle sync" is an IDE process, not a gradle process. I don't know of a way to trigger Gradle tasks when a sync happens without some separate IDE plugin.

We could, theoretically, make the createFocusSettings task an early task and make the focusSettingsFile an input of it so that it runs any time the focus settings file changes, but that's already too late in the process, because the createFocusSettings task would require that all possible projects are configured so that it can load their dependencies, and the existing focus settings file will prevent that from happening.

As it stands I don't see a way to resolve this due to the chicken and egg nature of configuration vs. task execution phases.

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

No branches or pull requests

2 participants