Skip to content

Commit

Permalink
build: Update rc.yml and release related documents (#1421)
Browse files Browse the repository at this point in the history
Signed-off-by: Sheng Chen <[email protected]>
  • Loading branch information
jdneo authored Sep 26, 2023
1 parent 5a395b6 commit 14310ac
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 1 deletion.
53 changes: 53 additions & 0 deletions .azure-pipelines/vscode-gradle-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,59 @@ steps:
inputs:
artifact: 'NOTICE.txt'
path: $(Build.SourcesDirectory)/extension
- task: DownloadBuildArtifacts@1
displayName: 'Download Build Server Artifacts'
inputs:
buildType: specific
project: 'a4d27ce2-a42d-4b71-8eef-78cee9a9728e'
pipeline: 15024
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'
- task: EsrpCodeSigning@2
displayName: 'ESRP CodeSigning'
inputs:
ConnectedServiceName: 'vscjavaci_codesign'
FolderPath: 'extension/server'
Pattern: 'com.microsoft.gradle.bs.importer-*.jar'
signConfigType: 'inlineSignParams'
inlineOperation: |
[
{
"KeyCode" : "CP-447347-Java",
"OperationCode" : "JavaSign",
"Parameters" : {
"SigAlg" : "SHA256withRSA",
"Timestamp" : "-tsa http://sha256timestamp.ws.digicert.com/sha256/timestamp"
},
"ToolName" : "sign",
"ToolVersion" : "1.0"
},
{
"KeyCode" : "CP-447347-Java",
"OperationCode" : "JavaVerify",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
}
]
- bash: |
cd $(Build.SourcesDirectory)/extension
npx @vscode/vsce@latest package
Expand Down
11 changes: 11 additions & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Architecture Overview

This extension contains three major components:
- [A Gradle server](./gradle-server) that runs in the background and provides project & task information, and runs Gradle tasks.
- [A Gradle language server](./gradle-language-server) that provides language features such as code completion and diagnostics for gradle script files.
- [A Gradle project importer](./extension/jdtls.ext/com.microsoft.gradle.bs.importer) that imports Gradle projects detected by the [Gradle Build Server](https://github.com/microsoft/build-server-for-gradle) into the workspace. This importer works with the Language Support for Java extension.

# Gradle Server and Gradle Language Server

<img src="images/gradle-tasks-architecture.svg" />

The extension uses client/server architecture using [gRPC](https://grpc.io/) as the interface between the client and server. It uses TypeScript (Node.js) on the client and Java on the server. A long running server provides very good performance.
Expand Down Expand Up @@ -33,3 +40,7 @@ Tasks are run via the `runBuild` gRPC method. Similar to getting project data, G
Gradle is used as the build system for the extension, for both the client and the server. Gradle compiles the Java & Protobuf files and runs the relevant tasks to download & build all the dependencies of the project. The builds should work on Linux/MacOS & Windows.

Getting started on this extension is as simple as `./gradlew build`.

## Gradle Project Importer

The Gradle project importer works as a client of the [Gradle Build Server](https://github.com/microsoft/build-server-for-gradle). The importer communicates with the Gradle build server via Build Server Protocol, and convert the build targets into Java Projects of JDT Language Server.
9 changes: 8 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Start by opening an issue using one of the issue templates, or propose a change

## Running the Project

### Build Gradle Server and Gradle Language Server.
1. Install [nvm](https://github.com/nvm-sh/nvm)
2. Install [Java version >= 8](https://adoptopenjdk.net/)
2. Install [Java version >= 8](https://adoptium.net/)
3. Change directory to the root of the project
4. Select Node version: `nvm use`
5. If using an Apple M1:
Expand All @@ -17,6 +18,12 @@ Start by opening an issue using one of the issue templates, or propose a change

Running the build for the first time can take a bit of time, but subsequent builds should be fast.

### Build Gradle Project Importer
1. Install [Java version >= 17](https://adoptium.net/)
2. `cd extension`
3. `git clone https://github.com/microsoft/build-server-for-gradle.git `
4. Build the Importer and Build Server jars: `../gradlew buildJars`

## Debugging Gradle plugin

The extension uses a Gradle plugin (`com.microsoft.gradle.GradlePlugin`) to get a lot of information from your project's Gradle build. If you want to debug the Gradle plugin, you can follow these steps:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ This extension contributes the following settings:
- `gradle.disableConfirmations`: Disable the warning confirm messages when performing batch actions (eg clear tasks, stop daemons etc) (boolean)
- `gradle.allowParallelRun`: Allow to run tasks in parallel, each running will create a new terminal. This configuration will override `gradle.reuseTerminals` and always create new task terminals when running or debugging a task.
- `gradle.projectOpenBehaviour`: Specify the default method of opening newly created project ("Interactive", "Open" or "Add to Workspace")
- `java.gradle.buildServer.enabled`: Whether to use build server to synchronize Gradle project ("on" or "off")
- `java.gradle.buildServer.openBuildOutput`: Controls when the build output should open ("neverOpen", "openOnBuildStart" or "openOnBuildFailure")

## Gradle & Java Settings

Expand Down

0 comments on commit 14310ac

Please sign in to comment.