Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
Fix buildJars task (microsoft#1481)

chore(deps): bump protobufjs from 7.2.4 to 7.2.6 in /npm-package (microsoft#1483)

Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 7.2.4 to 7.2.6.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
- [Commits](protobufjs/protobuf.js@protobufjs-v7.2.4...protobufjs-v7.2.6)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jinbo Wang <[email protected]>

chore(deps-dev): bump protobufjs from 7.2.4 to 7.2.6 in /extension (microsoft#1482)

Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 7.2.4 to 7.2.6.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
- [Commits](protobufjs/protobuf.js@protobufjs-v7.2.4...protobufjs-v7.2.6)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jinbo Wang <[email protected]>

chores: Add build server debug config (microsoft#1486)

build: Update code sign task to v5 (microsoft#1488)

refactor: Move Gradle Daemons implementation from Java into Typescript (microsoft#1489)

Fix: Append the log message to build output if it's from compilation report. (microsoft#1490)

- Store the id of the compilation task in an LRU cache.
- Append the log message to the build output if it's from the compilation task.

Signed-off-by: Sheng Chen <[email protected]>

fix: set GradleExecution jdk use java.import.gradle.java.home (microsoft#1491)

Refresh the output folders after build tasks (microsoft#1493)

Signed-off-by: Sheng Chen <[email protected]>

build: Update telemetry wrapper to 0.14.0 (microsoft#1495)

chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /extension (microsoft#1496)

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Extract api scan to a separate pipeline (microsoft#1498)

build: Prepare for 3.14.0 (microsoft#1499)

chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /npm-package (microsoft#1500)

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

gradle server muti-thread

fix- Fix the importer version and prepare for 3.14.1 (microsoft#1501)

build - Update target platform (microsoft#1502)

init named pipe

impl muti-thread and named pipe for buildServer

gradle server muti-thread

fix- Fix the importer version and prepare for 3.14.1 (microsoft#1501)

build - Update target platform (microsoft#1502)

init named pipe

test build Server named pipe connection

test build Server named pipe connection

update build/initialize sender

finish forward message demo

finish merge and named pipe

implement polling solution

Only send request after initialization (microsoft#1503)

fix - Add java 22 to compatibility matrix (microsoft#1505)

Introduce gson to simplify the object parsing (microsoft#1509)

Signed-off-by: Sheng Chen <[email protected]>

fix bug: buildServerHandler
  • Loading branch information
Jiaaming committed Jul 1, 2024
1 parent ddb31c4 commit 9006161
Show file tree
Hide file tree
Showing 52 changed files with 1,667 additions and 454 deletions.
112 changes: 112 additions & 0 deletions .azure-pipelines/vscode-gradle-apiscan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: $(Date:yyyyMMdd).$(Rev:r)
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
- repository: 1esPipelines
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
trigger: none
pr: none
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
parameters:
pool:
name: 1ES_JavaTooling_Pool
image: 1ES_JavaTooling_Windows_2022
os: windows
sdl:
sourceAnalysisPool:
name: 1ES_JavaTooling_Pool
image: 1ES_JavaTooling_Windows_2022
os: windows
spotBugs:
enabled: false
stages:
- stage: Build
jobs:
- job: Job_1
displayName: VSCode-Gradle-API-SCAN
templateContext:
outputs:
- output: pipelineArtifact
artifactName: extension
targetPath: $(Build.ArtifactStagingDirectory)
displayName: "Publish Artifact: extension"
steps:
- checkout: self
fetchTags: true
- task: JavaToolInstaller@0
displayName: Install Java 11
inputs:
versionSpec: '11'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- task: NodeTool@0
displayName: Install Node 16.14.2
inputs:
versionSpec: '16.14.2'
- task: Gradle@2
displayName: Build
inputs:
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
tasks: 'build'
- task: Gradle@2
displayName: PrepareForRelease
inputs:
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
tasks: 'prepareForRelease'
- bash: chmod +x gradle-server
workingDirectory: $(Build.SourcesDirectory)/extension/lib
displayName: Set permission
- task: DownloadBuildArtifacts@1
displayName: 'Download Build Server Artifacts'
inputs:
buildType: specific
project: 'a4d27ce2-a42d-4b71-8eef-78cee9a9728e'
pipeline: 16493
downloadType: specific
extractTars: false
- task: CopyFiles@2
displayName: 'Copy Build Server Artifacts'
inputs:
SourceFolder: '$(System.ArtifactsDirectory)/build-server/server/build/libs'
Contents: '**'
TargetFolder: $(Build.SourcesDirectory)/extension/server
- task: JavaToolInstaller@0
displayName: Install Java 17
inputs:
versionSpec: '17'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- task: Gradle@2
displayName: Build
inputs:
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
tasks: ':extension:copyJdtlsPluginJar'
- bash: npx @vscode/vsce@latest package
workingDirectory: $(Build.SourcesDirectory)/extension
displayName: Package VSIX
- task: CopyFiles@2
displayName: "Copy Files for APIScan"
inputs:
Contents: "extension/*.vsix"
TargetFolder: $(Agent.TempDirectory)/APIScanFiles
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
### Run latest version of APIScan listed at https://www.1eswiki.com/wiki/APIScan_Build_Task
- task: APIScan@2
displayName: Run APIScan
inputs:
softwareFolder: $(Agent.TempDirectory)/APIScanFiles
softwareName: "vscode-gradle"
softwareVersionNum: "$(Build.BuildId)"
isLargeApp: false
toolVersion: "Latest"
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
env:
AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret)
41 changes: 16 additions & 25 deletions .azure-pipelines/vscode-gradle-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ extends:
parameters:
pool:
name: 1ES_JavaTooling_Pool
image: 1ES_JavaTooling_Windows_2022
os: windows
image: 1ES_JavaTooling_Ubuntu-2004
os: linux
sdl:
sourceAnalysisPool:
name: 1ES_JavaTooling_Pool
Expand Down Expand Up @@ -68,10 +68,15 @@ extends:
- bash: chmod +x gradle-server
workingDirectory: $(Build.SourcesDirectory)/extension/lib
displayName: Set permission
- task: EsrpCodeSigning@2
- task: EsrpCodeSigning@5
displayName: 'ESRP CodeSigning'
inputs:
ConnectedServiceName: 'vscjavaci_esrp_codesign'
ConnectedServiceName: 'ESRP-Release-Test'
AppRegistrationClientId: '1992ee18-e9d2-42d6-ab20-94dd947a44b6'
AppRegistrationTenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47'
AuthAKVName: 'vscjavaci'
AuthCertName: 'vscjava-esrprelease-auth'
AuthSignCertName: 'VSCJava-CodeSign'
FolderPath: 'extension/lib'
Pattern: 'gradle-server.jar'
signConfigType: 'inlineSignParams'
Expand Down Expand Up @@ -143,10 +148,15 @@ extends:
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
tasks: ':extension:copyJdtlsPluginJar'
- task: EsrpCodeSigning@2
- task: EsrpCodeSigning@5
displayName: 'ESRP CodeSigning'
inputs:
ConnectedServiceName: 'vscjavaci_esrp_codesign'
ConnectedServiceName: 'ESRP-Release-Test'
AppRegistrationClientId: '1992ee18-e9d2-42d6-ab20-94dd947a44b6'
AppRegistrationTenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47'
AuthAKVName: 'vscjavaci'
AuthCertName: 'vscjava-esrprelease-auth'
AuthSignCertName: 'VSCJava-CodeSign'
FolderPath: 'extension/server'
Pattern: 'com.microsoft.gradle.bs.importer-*.jar'
signConfigType: 'inlineSignParams'
Expand All @@ -173,25 +183,6 @@ extends:
- bash: npx @vscode/vsce@latest package --pre-release
workingDirectory: $(Build.SourcesDirectory)/extension
displayName: Package VSIX
### Copy files for APIScan
- task: CopyFiles@2
displayName: "Copy Files for APIScan"
inputs:
Contents: "extension/*.vsix"
TargetFolder: $(Agent.TempDirectory)/APIScanFiles
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
### Run latest version of APIScan listed at https://www.1eswiki.com/wiki/APIScan_Build_Task
- task: APIScan@2
displayName: Run APIScan
inputs:
softwareFolder: $(Agent.TempDirectory)/APIScanFiles
softwareName: "vscode-gradle"
softwareVersionNum: "$(Build.BuildId)"
isLargeApp: false
toolVersion: "Latest"
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
env:
AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret)
- task: CopyFiles@2
displayName: Copy VSIX
inputs:
Expand Down
40 changes: 16 additions & 24 deletions .azure-pipelines/vscode-gradle-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ extends:
parameters:
pool:
name: 1ES_JavaTooling_Pool
image: 1ES_JavaTooling_Windows_2022
os: windows
image: 1ES_JavaTooling_Ubuntu-2004
os: linux
sdl:
sourceAnalysisPool:
name: 1ES_JavaTooling_Pool
Expand Down Expand Up @@ -68,10 +68,15 @@ extends:
- bash: chmod +x gradle-server
workingDirectory: $(Build.SourcesDirectory)/extension/lib
displayName: Set permission
- task: EsrpCodeSigning@2
- task: EsrpCodeSigning@5
displayName: 'ESRP CodeSigning'
inputs:
ConnectedServiceName: 'vscjavaci_esrp_codesign'
ConnectedServiceName: 'ESRP-Release-Test'
AppRegistrationClientId: '1992ee18-e9d2-42d6-ab20-94dd947a44b6'
AppRegistrationTenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47'
AuthAKVName: 'vscjavaci'
AuthCertName: 'vscjava-esrprelease-auth'
AuthSignCertName: 'VSCJava-CodeSign'
FolderPath: 'extension/lib'
Pattern: 'gradle-server.jar'
signConfigType: 'inlineSignParams'
Expand Down Expand Up @@ -138,10 +143,15 @@ extends:
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
tasks: ':extension:copyJdtlsPluginJar'
- task: EsrpCodeSigning@2
- task: EsrpCodeSigning@5
displayName: 'ESRP CodeSigning'
inputs:
ConnectedServiceName: 'vscjavaci_esrp_codesign'
ConnectedServiceName: 'ESRP-Release-Test'
AppRegistrationClientId: '1992ee18-e9d2-42d6-ab20-94dd947a44b6'
AppRegistrationTenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47'
AuthAKVName: 'vscjavaci'
AuthCertName: 'vscjava-esrprelease-auth'
AuthSignCertName: 'VSCJava-CodeSign'
FolderPath: 'extension/server'
Pattern: 'com.microsoft.gradle.bs.importer-*.jar'
signConfigType: 'inlineSignParams'
Expand All @@ -168,24 +178,6 @@ extends:
- bash: npx @vscode/vsce@latest package
workingDirectory: $(Build.SourcesDirectory)/extension
displayName: Package VSIX
- task: CopyFiles@2
displayName: "Copy Files for APIScan"
inputs:
Contents: "extension/*.vsix"
TargetFolder: $(Agent.TempDirectory)/APIScanFiles
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
### Run latest version of APIScan listed at https://www.1eswiki.com/wiki/APIScan_Build_Task
- task: APIScan@2
displayName: Run APIScan
inputs:
softwareFolder: $(Agent.TempDirectory)/APIScanFiles
softwareName: "vscode-gradle"
softwareVersionNum: "$(Build.BuildId)"
isLargeApp: false
toolVersion: "Latest"
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
env:
AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret)
- task: CopyFiles@2
displayName: Copy VSIX
inputs:
Expand Down
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,26 @@
"order": 2
}
},
{
"name": "Debug Extension & Build Server",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/extension"
],
"outFiles": [
"${workspaceFolder}/extension/dist/**/*.js"
],
"preLaunchTask": "Gradle: Build",
"presentation": {
"group": "debug",
"order": 3
},
"env": {
"DEBUG_GRADLE_BUILD_SERVER":"true"
},
},
{
"name": "Debug Language Server: Launch Extension",
"type": "extensionHost",
Expand Down
7 changes: 4 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand All @@ -32,12 +32,13 @@
"[java]": {
"editor.defaultFormatter": "redhat.java",
"editor.codeActionsOnSave": {
"source.fixAll.spotlessGradle": true
"source.fixAll.spotlessGradle": "explicit"
}
},
"[xml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true
"files.trimTrailingWhitespace": true,
"java.compile.nullAnalysis.mode": "disabled"
}
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@ All notable changes to the "vscode-gradle" extension will be documented in this
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

### 3.14.1
### What's Changed
* fix - Fix the importer version.

## 3.14.0
### What's Changed
* enhancement - Bump Gradle Wrapper to v8.5 and change Java 21 min Gradle version by @JoseLion in https://github.com/microsoft/vscode-gradle/pull/1455
* enhancement - Group the Gradle related menus in the file explorer into a submenu labeled 'Gradle' by @testforstephen in https://github.com/microsoft/vscode-gradle/pull/1474
* enhancement - Upgrade Build Server for Gradle to 0.2.0
* fix - Exclude the project itself becoming its project classpath entry by @jdneo in https://github.com/microsoft/vscode-gradle/pull/1464
* fix - Append the log message to build output if it's from compilation report. by @jdneo in https://github.com/microsoft/vscode-gradle/pull/1490
* fix - Set GradleExecution jdk use java.import.gradle.java.home by @Jiaaming in https://github.com/microsoft/vscode-gradle/pull/1491
* fix - Refresh the output folders after build tasks by @jdneo in https://github.com/microsoft/vscode-gradle/pull/1493
* build - Fix buildJars task by @donat in https://github.com/microsoft/vscode-gradle/pull/1481
* build - Add Build Server debug config by @Jiaaming in https://github.com/microsoft/vscode-gradle/pull/1486
* build - Move Gradle Daemons implementation from Java into Typescript by @Jiaaming in https://github.com/microsoft/vscode-gradle/pull/1489

## New Contributors
* @donat made their first contribution in https://github.com/microsoft/vscode-gradle/pull/1481
* @Jiaaming made their first contribution in https://github.com/microsoft/vscode-gradle/pull/1486

**Full Changelog**: https://github.com/microsoft/vscode-gradle/compare/3.13.5...3.14.0

## 3.13.5
### Added
- Implement onWillUpdate() in GradleBuildServerBuildSupport. [PR#1405](https://github.com/microsoft/vscode-gradle/pull/1405)
Expand Down
19 changes: 19 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,25 @@ The extension uses a Gradle plugin (`com.microsoft.gradle.GradlePlugin`) to get

> Note: There is a known issue that when the Gradle project stores in a sub-folder of the root folder, the `Attach to Gradle Plugin` will fail to attach. See [#1237](https://github.com/microsoft/vscode-gradle/issues/1237).
## Debugging Gradle Build Server

To debug the Extension with the [Gradle Build Server](https://github.com/microsoft/build-server-for-gradle), follow these steps:

1. Open the `extension/build-server-for-gradle` directory, which you should have [imported previously](#build-gradle-project-importer) as a separate project.
2. In the `.vscode/launch.json` of the build-server-for-gradle project, ensure you have the following configuration to attach the debugger:
```json
{
"type": "java",
"name": "Attach to Gradle Build Server",
"request": "attach",
"hostName": "localhost",
"port": "8989",
"projectName": "server"
}
```
3. In your main project (vscode-gradle), start the `Debug Extension & Build Server` launch configuration.
4. In the build-server-for-gradle project, start the `Attach to Gradle Build Server` launch configuration.

## Debugging Gradle Language Server (editing feature related)

1. Run vscode launch configuration `Debug Language Server: Launch Extension`.
Expand Down
Loading

0 comments on commit 9006161

Please sign in to comment.