Skip to content

Commit

Permalink
Update OpenJDK to v17 (#2698)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow authored Jan 9, 2024
1 parent 5900080 commit 6abd275
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
9 changes: 2 additions & 7 deletions scripts/azure-templates-bootstrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'], ''))
Expand Down
5 changes: 2 additions & 3 deletions scripts/install-openjdk.ps1
Original file line number Diff line number Diff line change
@@ -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
)

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 6abd275

Please sign in to comment.