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

Support for multi module gradle builds #1288

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lnavarette
Copy link

This change partially resolves #663

High level overview of the changes:

  • The BuildSystem already had methods for getting main/test source roots. I have updated a few of the standard ProjectContributors to use that so that I could extend the BuildSystem to be the source of truth for whether it's a single or multi module build.
  • I extend the BuildSystem to support configuration of a module (other than root module) to hold the application, and it now provides a getApplicationModuleRoot so that ProjectContributors can grab that if they want to put files in the application module - regardless of whether it's a single or multi project build.
  • I didn't update any of the factories to support this automatically, I took a direction similar to how the kotlin dialect was implemented, which requires a ProjectDescriptionCustomizer to inject the BuildSystem implementation
  • I only implemented the changes for the gradle build system as I have more familiarity there. I'm happy to do the work to add the same for maven.

I'd like feedback on:

  • if BuildSystem was the "correct" thing to extend to add this functionality or if there may be a better place. It seemed clean enough but in a few places I needed to introduce it as a dependency for another class.
  • from a testing POV, what would you want to see to be confident these changes are working as expected?
  • from a feature completeness POV - is the approach of requiring a ProjectDescriptionCustomizer acceptable?

@pivotal-cla
Copy link

@lnavarette Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@lnavarette lnavarette marked this pull request as draft December 8, 2021 18:32
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 8, 2021
@tinesoft
Copy link

tinesoft commented May 20, 2022

Any progress on that PR/ topic @wilkinsona, @snicoll ?

This would be a great addition to Spring Initializr.

I'll be interested in contributing as well, if needed.

@wilkinsona
Copy link
Contributor

Unfortunately not, @tinesoft. We have a number of other things on our plates at the moment which are of higher priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add API support for multi-modules project creation
5 participants