Skip to content

Commit

Permalink
Update JDK
Browse files Browse the repository at this point in the history
I left pack using 17 since that's what ships with VS.  The other step I moved to 21 since we seem to be using newer cmdline-tools which require it.
  • Loading branch information
Redth committed Aug 22, 2024
1 parent 214ccc7 commit 4e3d912
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions eng/pipelines/common/pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ steps:
${{ pair.key }}: ${{ pair.value }}

- pwsh: |
if ($env:JAVA_HOME_11_X64) {
$env:JAVA_HOME = $env:JAVA_HOME_11_X64
if ($env:JAVA_HOME_17_X64) {
$env:JAVA_HOME = $env:JAVA_HOME_17_X64
} else {
$path = (Get-ChildItem $env:ProgramFiles\Microsoft\jdk-11.*\bin\java.exe) | Select-Object -First 1
if ($path -and (Test-Path $path)) {
Expand Down
8 changes: 4 additions & 4 deletions eng/pipelines/common/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ steps:

# Setup JDK Paths (gradle needs it)
- bash: |
echo "##vso[task.setvariable variable=JI_JAVA_HOME]$(JAVA_HOME_11_X64)"
echo "##vso[task.setvariable variable=JAVA_HOME]$(JAVA_HOME_11_X64)"
echo "##vso[task.setvariable variable=JI_JAVA_HOME]$(JAVA_HOME_21_X64)"
echo "##vso[task.setvariable variable=JAVA_HOME]$(JAVA_HOME_21_X64)"
displayName: 'Setup JDK Paths'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
# Configure VS Mac for Xcode
Expand Down Expand Up @@ -90,8 +90,8 @@ steps:
SKIP_ANDROID_API_IMAGES: 'true'

- pwsh: |
if ($env:JAVA_HOME_11_X64) {
$env:JAVA_HOME = $env:JAVA_HOME_11_X64
if ($env:JAVA_HOME_21_X64) {
$env:JAVA_HOME = $env:JAVA_HOME_21_X64
} else {
$path = (Get-ChildItem $env:ProgramFiles\Microsoft\jdk-11.*\bin\java.exe) | Select-Object -First 1
if ($path -and (Test-Path $path)) {
Expand Down

0 comments on commit 4e3d912

Please sign in to comment.