chore(gradle): use -version when logging java version in e2es (#23372)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->
Java 9 has changed the version flag to single `-`
Our e2es are trying to use `--`


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Use `-version`


## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
This commit is contained in:
Colum Ferry 2024-05-15 15:16:42 +01:00 committed by GitHub
parent 5221103242
commit c8c1304738
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -97,7 +97,7 @@ function createGradleProject(
projectName: string, projectName: string,
type: 'kotlin' | 'groovy' = 'kotlin' type: 'kotlin' | 'groovy' = 'kotlin'
) { ) {
e2eConsoleLogger(`Using java version: ${execSync('java --version')}`); e2eConsoleLogger(`Using java version: ${execSync('java -version')}`);
const gradleCommand = isWindows() const gradleCommand = isWindows()
? resolve(`${__dirname}/../gradlew.bat`) ? resolve(`${__dirname}/../gradlew.bat`)
: resolve(`${__dirname}/../gradlew`); : resolve(`${__dirname}/../gradlew`);