diff --git a/e2e/gradle/src/utils/create-gradle-project.ts b/e2e/gradle/src/utils/create-gradle-project.ts index b1e11051b2a06..1e4755082e1b7 100644 --- a/e2e/gradle/src/utils/create-gradle-project.ts +++ b/e2e/gradle/src/utils/create-gradle-project.ts @@ -15,7 +15,11 @@ export function createGradleProject( packageName: string = 'gradleProject', addProjectJsonNamePrefix: string = '' ) { - e2eConsoleLogger(`Using java version: ${execSync('java -version')}`); + e2eConsoleLogger( + `Using java version: ${execSync('java -version')} ${execSync( + 'echo $JAVA_HOME' + )}` + ); const gradleCommand = isWindows() ? resolve(`${__dirname}/../../gradlew.bat`) : resolve(`${__dirname}/../../gradlew`); diff --git a/packages/gradle/plugin.spec.ts b/packages/gradle/plugin.spec.ts index c07019a01d431..78dc8efe8bb1d 100644 --- a/packages/gradle/plugin.spec.ts +++ b/packages/gradle/plugin.spec.ts @@ -27,6 +27,9 @@ describe('@nx/gradle/plugin', () => { gradleFileToOutputDirsMap: new Map>([ ['proj/build.gradle', new Map([['build', 'build']])], ]), + gradleProjectToTasksMap: new Map>([ + ['proj', new Set(['test'])], + ]), gradleProjectToTasksTypeMap: new Map>([ ['proj', new Map([['test', 'Verification']])], ]), @@ -86,6 +89,7 @@ describe('@nx/gradle/plugin', () => { ], }, "name": "proj", + "projectType": "application", "targets": { "test": { "cache": true, diff --git a/packages/gradle/src/utils/get-project-report-lines.ts b/packages/gradle/src/utils/get-project-report-lines.ts index 84be3187ccc93..ddeaf341c7861 100644 --- a/packages/gradle/src/utils/get-project-report-lines.ts +++ b/packages/gradle/src/utils/get-project-report-lines.ts @@ -42,7 +42,7 @@ export async function getProjectReportLines( 'projectReport', ]); logger.warn( - `Could not run 'projectReportAll' task. Ran 'projectReport' instead. Please run 'nx generate @nx/gradle:init' to generate the necessary tasks.` + `Could not run 'projectReportAll' task. Ran 'projectReport' instead. Please run 'nx generate @nx/gradle:init' to generate the necessary tasks. ${e.message}` ); } catch (e) { throw new AggregateCreateNodesError( @@ -50,7 +50,7 @@ export async function getProjectReportLines( [ gradlewFile, new Error( - `Could not run 'projectReportAll' or 'projectReport' task. Please run 'nx generate @nx/gradle:init' to generate the necessary tasks.` + `Could not run 'projectReportAll' or 'projectReport' task. Please run 'nx generate @nx/gradle:init' to generate the necessary tasks. ${e.message}` ), ], ],