diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index d91959017d..ab003209e0 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -129,13 +129,8 @@ jobs: condition: and(succeeded(), eq(variables['DOWNLOAD_EXTERNALS'], '')) # install the bits needed for Android on macOS and Windows - ${{ if and(eq(parameters.installAndroidSdk, 'true'), not(endsWith(parameters.name, '_linux'))) }}: - # install the correct version of the JDK for .NET 6 - - pwsh: | - if ("$env:JAVA_HOME_11_X64") { - echo "##vso[task.setvariable variable=JAVA_HOME]$env:JAVA_HOME_11_X64" - } else { - .\scripts\install-openjdk.ps1 - } + # install the correct version of the JDK + - pwsh: .\scripts\install-openjdk.ps1 displayName: Install OpenJDK retryCountOnTaskFailure: 3 condition: and(succeeded(), eq(variables['DOWNLOAD_EXTERNALS'], '')) diff --git a/scripts/install-openjdk.ps1 b/scripts/install-openjdk.ps1 index 227e9c7030..9291f86cb8 100644 --- a/scripts/install-openjdk.ps1 +++ b/scripts/install-openjdk.ps1 @@ -1,5 +1,6 @@ Param( - [string] $Version = '11.0.14.9.1', + [string] $Version = '17.0.8.1', + [string] $FolderVersion = '17.0.8.1+1', [string] $InstallDestination = $null ) @@ -44,8 +45,6 @@ if ($IsMacOS -or $IsLinux) { } # set the JAVA_HOME -$VersionParts = $Version.Split(".") -$FolderVersion = "$($VersionParts[0]).$($VersionParts[1]).$($VersionParts[2])+$($VersionParts[3])" if ($IsMacOS) { $java_home = Join-Path "$jdk" "jdk-$FolderVersion/Contents/Home" } else {