-
-
Notifications
You must be signed in to change notification settings - Fork 444
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
Support composite builds when generating runs #871
base: FG_5.0
Are you sure you want to change the base?
Conversation
- Run generators will now write to the root of the composite build, rather than the root of the current project. - When in a composite build, attempt to find the full path to the current project.
Without looking too deeply into this, why cant we just use root project? Instead of having to walk, and then find root? |
Because included builds are registered differently in gradle. They are considered loosly attached to the current project and behave weirdlh when it comes to the root and their parents |
Ahh, sorry! Should have explained this a little better. The point of Most of the time that's what you want. However, run configurations are the one thing which need to know the whole workspace they're operating in, hence jumping through the additional hoops. |
Interesting, another weirdness of gradle. All I know is we use rootProject all the time in Forge itself which uses included builds. Same for ff, and eventbus. |
Ahh, this is terrible nomenclature on Gradle's part. When you use The actual motivation for |
Marking this as ready for review as #868 is held up. |
This adds support for composite builds (i.e.
includeBuild
) to the various run generators.As each included build is treated as a separate project, generating runs would read/write config from the non-existent
<child project>/.idea
rather than.idea
(similarly for VSCode).This change will walk up the entire project hierarchy to find the correct place to read/write IDE configuration. It also remaps the
prepareXXX
tasks to the "full" task path.I've set up a test repository at https://github.com/SquidDev/fg-composite-demo/ which contains a mixture of projects using
include
andincludeBuild
. SquidDev/fg-composite-demo@c46e017 is the commit which switches run generations to this branch, to allow you to see before/after.I'm marking this as a draft for now, as it will conflict with #868.