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

Implement modular java/spring-boot generator. #15726

Merged
merged 43 commits into from
Jul 31, 2021

Conversation

mshima
Copy link
Member

@mshima mshima commented Jul 25, 2021

Internal:

  • Add support to cjs generators and tests.
  • Add support to choices at command.
  • Add utilities for modular generators.
  • Adjusts to jhi template support.

modular generators:

  • Convert new generators to cjs.
  • Migrate modular generators to mixins for better modularity.
  • Move generator tests to the generator folder for better modularity.
  • Migrate files to jhi templates.

spring-boot generator generates a spring initializr like project.


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@mshima mshima force-pushed the skip_ci-modular_java_config branch from 2867bba to c9021e0 Compare July 25, 2021 01:21
@mshima mshima requested a review from Tcharl July 25, 2021 01:22
generators/gradle/index.cjs Outdated Show resolved Hide resolved
generators/gradle/index.cjs Outdated Show resolved Hide resolved
generators/gradle/index.cjs Outdated Show resolved Hide resolved
default: () => this._getDefaultPackageName(),
},
{
name: BUILD_TOOL,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the filetree mentionned earlier is possible, we could put that question in generator->builTool->prompt.js

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prompts.js is possible but I don't think it's too useful.
It would require to pass the generator as parameter or bind context to the function.

Copy link
Contributor

@Tcharl Tcharl Jul 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to avoid the previous generator in the chain to reference properties/prompts of the next ones. So that contributor will know were to find the information, and generators will be really independent together (not bound by a parent->childor caller->callee relationship)

generators/java/index.cjs Outdated Show resolved Hide resolved
return {
async writeFiles() {
if (this.shouldSkipFiles()) return;
await this.writeFilesToDisk(files);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't it be the standard?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, why?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So to include in the superclass and avoid repeating

generators/gradle/templates/build.gradle.jhi.ejs Outdated Show resolved Hide resolved
generators/gradle/templates/build.gradle.jhi.ejs Outdated Show resolved Hide resolved
generators/gradle/templates/gradle.properties.jhi.ejs Outdated Show resolved Hide resolved
generators/java/constants.cjs Outdated Show resolved Hide resolved
generators/java/mixin.cjs Outdated Show resolved Hide resolved
generators/spring-boot/constants.cjs Outdated Show resolved Hide resolved
@mshima
Copy link
Member Author

mshima commented Jul 27, 2021

Thanks @pascalgrimaud

@mshima mshima merged commit 58686c9 into jhipster:main Jul 31, 2021
@mshima mshima deleted the skip_ci-modular_java_config branch July 31, 2021 03:25
@mshima
Copy link
Member Author

mshima commented Aug 5, 2021

@pascalgrimaud
Copy link
Member

@mshima : approved. Could you add some documentation for the next release plz?

@mshima
Copy link
Member Author

mshima commented Aug 5, 2021

@pascalgrimaud I will convert them to mjs before they can be considered stable, otherwise we will have to migrate at jhipster 8 development cicle only.
And I think we should migrate the blueprint generator here I will open a new bug.

@pascalgrimaud pascalgrimaud added this to the 7.2.0 milestone Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
$$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $500 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants