Skip to content

Commit a29e99d

Browse files
committed
setup-jdk-variables ARM64 fix
1 parent f792b4e commit a29e99d

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

build-tools/automation/yaml-templates/setup-jdk-variables.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
parameters:
2-
jdkMajorVersion: $(DefaultJavaSdkMajorVersion)
3-
useAgentJdkPath: true
2+
jdkMajorVersion: $(DefaultJavaSdkMajorVersion) # Generally 11|17|21
3+
useAgentJdkPath: true # true to use preinstalled agent JDK, false to use 'android-toolchain/jdk-NN'
44

55
steps:
66
- pwsh: |
77
$agentOS="$(Agent.OS)"
8-
$agentArch="$(Agent.OSArchitecture)"
8+
$agentArch="$(Agent.OSArchitecture)" -eq "ARM64" ? "arm64" : "$(Agent.OSArchitecture)"
99
$jdkMajorVersion="${{ parameters.jdkMajorVersion }}"
1010
$xaPrepareJdkPath="$env:HOME/android-toolchain/jdk-$jdkMajorVersion"
1111
if ("$agentOS" -eq "Windows_NT") {

build-tools/automation/yaml-templates/setup-test-environment.yaml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,6 @@ steps:
2727
jdkMajorVersion: ${{ parameters.jdkMajorVersion }}
2828
useAgentJdkPath: ${{ parameters.useAgentJdkPath }}
2929

30-
# If an explicit Java SDK path wasn't provided, choose JDK-17 for the appropriate architecture
31-
- pwsh: |
32-
Write-Host "##vso[task.setvariable variable=JI_JAVA_HOME]$env:JAVA_HOME_17_X64"
33-
displayName: set JI_JAVA_HOME to JAVA_HOME_17_X64
34-
condition: and(succeeded(), eq('${{ parameters.jdkTestFolder }}', ''), eq(variables['agent.osarchitecture'], 'X64'))
35-
36-
- pwsh: |
37-
Write-Host "##vso[task.setvariable variable=JI_JAVA_HOME]$env:JAVA_HOME_17_arm64"
38-
displayName: set JI_JAVA_HOME to JAVA_HOME_17_arm64
39-
condition: and(succeeded(), eq('${{ parameters.jdkTestFolder }}', ''), eq(variables['agent.osarchitecture'], 'ARM64'))
40-
41-
- script: |
42-
echo $(JI_JAVA_HOME)
43-
displayName: print JI_JAVA_HOME
44-
4530
# Install latest .NET
4631
- template: /build-tools/automation/yaml-templates/use-dot-net.yaml
4732
parameters:

0 commit comments

Comments
 (0)