Skip to content

build - Update java to 21 #1767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 3, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .azure-pipelines/vscode-java-test-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ extends:
- checkout: self
fetchTags: false
- task: JavaToolInstaller@0
displayName: Use Java 17
displayName: Use Java 21
inputs:
versionSpec: "17"
versionSpec: "21"
jdkArchitectureOption: x64
jdkSourceOption: PreInstalled
- task: Npm@1
Expand Down
12 changes: 6 additions & 6 deletions .azure-pipelines/vscode-java-test-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ extends:
version: '20.x'
# The image does not have jdk preinstalled, we need to download it first.
- task: PowerShell@2
displayName: Download JDK 17
displayName: Download JDK 21
inputs:
targetType: 'inline'
script: |-
New-Item -ItemType Directory -Path "$env:AGENT_TEMPDIRECTORY\downloadjdk"
Invoke-WebRequest -Uri "https://aka.ms/download-jdk/microsoft-jdk-17-windows-x64.zip" -OutFile "$env:AGENT_TEMPDIRECTORY\downloadjdk\microsoft-jdk-17-windows-x64.zip"
Invoke-WebRequest -Uri "https://aka.ms/download-jdk/microsoft-jdk-21-windows-x64.zip" -OutFile "$env:AGENT_TEMPDIRECTORY\downloadjdk\microsoft-jdk-21-windows-x64.zip"
- task: JavaToolInstaller@0
displayName: Use Java 17
displayName: Use Java 21
inputs:
versionSpec: "17"
versionSpec: "21"
jdkArchitectureOption: x64
jdkSourceOption: LocalDirectory
jdkFile: $(Agent.TempDirectory)/downloadjdk/microsoft-jdk-17-windows-x64.zip
jdkDestinationDirectory: $(Agent.ToolsDirectory)/ms-jdk17
jdkFile: $(Agent.TempDirectory)/downloadjdk/microsoft-jdk-21-windows-x64.zip
jdkDestinationDirectory: $(Agent.ToolsDirectory)/ms-jdk21
- script: java --version
displayName: 'Check Java installation'
- task: Npm@1
Expand Down
12 changes: 6 additions & 6 deletions .azure-pipelines/vscode-java-test-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@ extends:
version: '20.x'
# The image does not have jdk preinstalled, we need to download it first.
- task: PowerShell@2
displayName: Download JDK 17
displayName: Download JDK 21
inputs:
targetType: 'inline'
script: |-
New-Item -ItemType Directory -Path "$env:AGENT_TEMPDIRECTORY\downloadjdk"
Invoke-WebRequest -Uri "https://aka.ms/download-jdk/microsoft-jdk-17-windows-x64.zip" -OutFile "$env:AGENT_TEMPDIRECTORY\downloadjdk\microsoft-jdk-17-windows-x64.zip"
Invoke-WebRequest -Uri "https://aka.ms/download-jdk/microsoft-jdk-21-windows-x64.zip" -OutFile "$env:AGENT_TEMPDIRECTORY\downloadjdk\microsoft-jdk-21-windows-x64.zip"
- task: JavaToolInstaller@0
displayName: Use Java 17
displayName: Use Java 21
inputs:
versionSpec: "17"
versionSpec: "21"
jdkArchitectureOption: x64
jdkSourceOption: LocalDirectory
jdkFile: $(Agent.TempDirectory)/downloadjdk/microsoft-jdk-17-windows-x64.zip
jdkDestinationDirectory: $(Agent.ToolsDirectory)/ms-jdk17
jdkFile: $(Agent.TempDirectory)/downloadjdk/microsoft-jdk-21-windows-x64.zip
jdkDestinationDirectory: $(Agent.ToolsDirectory)/ms-jdk21
- script: java --version
displayName: 'Check Java installation'
- task: Npm@1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 16
node-version: 20

- name: Install Node.js modules
run: npm install
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 16
node-version: 20

- name: Install Node.js modules
run: npm install
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 16
node-version: 20

- name: Install Node.js modules
run: npm install
Expand Down
2 changes: 2 additions & 0 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ async function main(): Promise<void> {
cp.spawnSync(cli, [...args, '--install-extension', 'redhat.java', '--pre-release'], {
encoding: 'utf-8',
stdio: 'inherit',
shell: true,
});

cp.spawnSync(cli, [...args, '--install-extension', 'vscjava.vscode-java-debug', '--pre-release'], {
encoding: 'utf-8',
stdio: 'inherit',
shell: true,
});

// The folder containing the Extension Manifest package.json
Expand Down
Loading