From ab6fc6c495c86cdd717974b913536bc306404c2f Mon Sep 17 00:00:00 2001 From: Deepak Goyal Date: Thu, 19 Feb 2026 12:49:10 +0530 Subject: [PATCH 1/4] chore: downgrade Java version from 21 to 17 and Node.js version from 20 to 18 in HR release workflow Signed-off-by: Deepak Goyal --- .github/workflows/hr-release.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/hr-release.yml b/.github/workflows/hr-release.yml index a037d8b12..31a8e5aee 100644 --- a/.github/workflows/hr-release.yml +++ b/.github/workflows/hr-release.yml @@ -79,9 +79,8 @@ jobs: - name: Set Up Java uses: actions/setup-java@v4 with: - # Tycho is built with Java 21 (class file version 65) - java-version: "21" - distribution: "temurin" + java-version: "17" + distribution: "adopt" - name: Build JDT-LS if: "${{ inputs.JDT_LS_VERSION == '' }}" run: | @@ -93,7 +92,7 @@ jobs: - name: Set Up NodeJS uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "18" - name: Install NodeJS dependencies run: npm install -g typescript "@vscode/vsce" "ovsx" - name: Download JDT-LS Release From 33d8e861b56688d2fc57d22cc3444017cae797af Mon Sep 17 00:00:00 2001 From: Deepak Goyal Date: Thu, 19 Feb 2026 13:05:00 +0530 Subject: [PATCH 2/4] build Signed-off-by: Deepak Goyal --- .github/workflows/hr-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hr-release.yml b/.github/workflows/hr-release.yml index 31a8e5aee..07af02987 100644 --- a/.github/workflows/hr-release.yml +++ b/.github/workflows/hr-release.yml @@ -92,7 +92,7 @@ jobs: - name: Set Up NodeJS uses: actions/setup-node@v4 with: - node-version: "18" + node-version: "20" - name: Install NodeJS dependencies run: npm install -g typescript "@vscode/vsce" "ovsx" - name: Download JDT-LS Release From d3e9f002837e3d25c0f05d6cf8fc747e638a433a Mon Sep 17 00:00:00 2001 From: Deepak Goyal Date: Thu, 19 Feb 2026 14:34:56 +0530 Subject: [PATCH 3/4] chore: modify setGradleWrapperChecksum to auto-trust Gradle wrapper without user prompt Updated the setGradleWrapperChecksum function to remove the security warning dialog and automatically set the Gradle wrapper as trusted by default. This change simplifies the user experience by eliminating the need for user interaction when handling Gradle wrapper checksums. Signed-off-by: Deepak Goyal --- src/settings.ts | 67 +++++++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 25 deletions(-) diff --git a/src/settings.ts b/src/settings.ts index fc6eeb592..4a08fbdf7 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -294,31 +294,48 @@ export function setGradleWrapperChecksum(wrapper: string, sha256?: string) { return; } gradleWrapperPromptDialogs.push(sha256); - const allow = 'Trust'; - const disallow = 'Do not trust'; - window.showErrorMessage(`"Security Warning! The gradle wrapper '${wrapper}'" [sha256 '${sha256}'] [could be malicious](https://github.com/redhat-developer/vscode-java/wiki/Gradle-Support#suspicious.wrapper). Should it be trusted?";`, disallow, allow) - .then(async selection => { - let allowed; - if (selection === allow) { - allowed = true; - } else if (selection === disallow) { - allowed = false; - } else { - unregisterGradleWrapperPromptDialog(sha256); - return false; - } - const key = "java.imports.gradle.wrapper.checksums"; - let property: any = workspace.getConfiguration().inspect(key).globalValue; - if (!Array.isArray(property)) { - property = []; - } - const entry = property.filter(p => (p.sha256 === sha256)); - if (entry === null || entry.length === 0) { - property.push({ sha256: sha256, allowed: allowed }); - workspace.getConfiguration().update(key, property, ConfigurationTarget.Global); - } - unregisterGradleWrapperPromptDialog(sha256); - }); + /* + * HackerRank_Specific: + * Commented out the original Gradle wrapper trust prompt dialog. + * Instead of showing a security warning pop-up and asking the user to trust/distrust, + * we silently auto-trust the wrapper by directly writing allowed: true to the configuration. + */ + // const allow = 'Trust'; + // const disallow = 'Do not trust'; + // window.showErrorMessage(`"Security Warning! The gradle wrapper '${wrapper}'" [sha256 '${sha256}'] [could be malicious](https://github.com/redhat-developer/vscode-java/wiki/Gradle-Support#suspicious.wrapper). Should it be trusted?";`, disallow, allow) + // .then(async selection => { + // let allowed; + // if (selection === allow) { + // allowed = true; + // } else if (selection === disallow) { + // allowed = false; + // } else { + // unregisterGradleWrapperPromptDialog(sha256); + // return false; + // } + // const key = "java.imports.gradle.wrapper.checksums"; + // let property: any = workspace.getConfiguration().inspect(key).globalValue; + // if (!Array.isArray(property)) { + // property = []; + // } + // const entry = property.filter(p => (p.sha256 === sha256)); + // if (entry === null || entry.length === 0) { + // property.push({ sha256: sha256, allowed: allowed }); + // workspace.getConfiguration().update(key, property, ConfigurationTarget.Global); + // } + // unregisterGradleWrapperPromptDialog(sha256); + // }); + const key = "java.imports.gradle.wrapper.checksums"; + let property: any = workspace.getConfiguration().inspect(key).globalValue; + if (!Array.isArray(property)) { + property = []; + } + const entry = property.filter(p => (p.sha256 === sha256)); + if (entry === null || entry.length === 0) { + property.push({ sha256: sha256, allowed: true }); + workspace.getConfiguration().update(key, property, ConfigurationTarget.Global); + } + unregisterGradleWrapperPromptDialog(sha256); } function unregisterGradleWrapperPromptDialog(sha256: string) { From 29725f3c7f5295ad69fa13e83c5544db10b571e0 Mon Sep 17 00:00:00 2001 From: Deepak Goyal Date: Thu, 19 Feb 2026 15:39:56 +0530 Subject: [PATCH 4/4] chore: update HR release workflow to limit packaging to linux-x64 platform Modified the hr-release.yml workflow to comment out multiple platform targets and focus solely on the linux-x64 platform for packaging the vscode-java extension. This change streamlines the build process for the specified environment. Signed-off-by: Deepak Goyal --- .github/workflows/hr-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hr-release.yml b/.github/workflows/hr-release.yml index 07af02987..0b6e5fb6b 100644 --- a/.github/workflows/hr-release.yml +++ b/.github/workflows/hr-release.yml @@ -131,7 +131,8 @@ jobs: echo "publishPreReleaseFlag=--pre-release" >> $GITHUB_ENV - name: Package vscode-java run: | - platforms=("win32-x64" "linux-x64" "linux-arm64" "darwin-x64" "darwin-arm64") + # platforms=("win32-x64" "linux-x64" "linux-arm64" "darwin-x64" "darwin-arm64") + platforms=("linux-x64") for platform in ${platforms[@]}; do npx gulp download_jre --target ${platform} --javaVersion 17 vsce package ${{ env.publishPreReleaseFlag }} --target ${platform} -o java-${platform}-${{ env.EXT_VERSION }}-${GITHUB_RUN_NUMBER}.vsix