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 authored and rmarinho committed Oct 22, 2024
1 parent 51e25f0 commit 837de85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 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
9 changes: 4 additions & 5 deletions eng/pipelines/common/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ steps:

# Setup JDK Paths (gradle needs it)
- bash: |
echo "##vso[task.setvariable variable=JI_JAVA_HOME]$(JAVA_HOME_17_X64)"
echo "##vso[task.setvariable variable=JAVA_HOME]$(JAVA_HOME_17_X64)"
# brew install --cask microsoft-openjdk@17
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 @@ -100,8 +99,8 @@ steps:
INSTALL_DEFAULT_ANDROID_API: 'true'

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

0 comments on commit 837de85

Please sign in to comment.