Skip to content

Commit

Permalink
fix: use installPackagesTask again during init
Browse files Browse the repository at this point in the history
  • Loading branch information
khalilou88 committed Oct 10, 2024
1 parent ea95130 commit 1c73c61
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/nx-gradle/src/generators/init/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
addProjectConfiguration,
formatFiles,
generateFiles,
installPackagesTask,
joinPathFragments,
logger,
offsetFromRoot,
Expand Down Expand Up @@ -146,6 +147,10 @@ export async function initGenerator(
if (!options.skipFormat) {
await formatFiles(tree);
}

return () => {
installPackagesTask(tree);
};
}

function updateNxJson(tree: Tree, options: NormalizedSchema) {
Expand Down
5 changes: 5 additions & 0 deletions packages/nx-maven/src/generators/init/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
addProjectConfiguration,
formatFiles,
generateFiles,
installPackagesTask,
joinPathFragments,
logger,
offsetFromRoot,
Expand Down Expand Up @@ -122,6 +123,10 @@ export async function initGenerator(
if (!options.skipFormat) {
await formatFiles(tree);
}

return () => {
installPackagesTask(tree);
};
}

function updateNxJson(tree: Tree, options: NormalizedSchema) {
Expand Down
2 changes: 2 additions & 0 deletions testing-projects/jnxplus-smoke/tests/nx-maven/quarkus.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ describe('nx-maven quarkus smoke', () => {
execSyncOptions(),
);

execSync(`npx nx format --projects ${testLib}`, execSyncOptions());

execSync(`npx nx test ${testLib}`, execSyncOptions());

execSync(`npx nx run-many --target=build --parallel`, execSyncOptions());
Expand Down

0 comments on commit 1c73c61

Please sign in to comment.