Start by opening an issue using one of the issue templates, or propose a change by submitting a pull request (including a detailed pull request description).
- Install nvm
- Install Java version >= 21
- Select Node version:
nvm use - If using an Apple M1:
- Add
npm_arch=x64to $HOME/.gradle/gradle.properties - Add
protoc_platform=osx-x86_64to $HOME/.gradle/gradle.properties
- Add
- If using Windows:
- The extension uses
grpc-tools@1.12.xdependency which does not work out-of-the-box in Windows (check this issues for details), so you'll need to install some aditional DLLs if the project build is failed. - Download and start Build Tools for Visual Studio 2022.
- Go to the Individual Components tab and select the following:
MSVC v143 - VS 2022 C++ x64/x86 build tools (latest)(replacingx64/x86with your arch)Windows Universal CRT SDK
- Click
Installto add the components.
- The extension uses
Before proceeding with the build steps for Build Task Server & Language Server, you need to build the Gradle Build Server and its client (Gradle Project Importer) first.
cd extensiongit clone https://github.com/microsoft/build-server-for-gradle.git- Build the Importer and Build Server jars:
../gradlew buildJars
After building the Gradle Build Server and its client, proceed with the following steps.
-
Change directory to the root of the project
-
Build project files:
./gradlew build
Running the build for the first time can take a bit of time, but subsequent builds should be fast.
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:
- Run vscode launch configuration
Debug Extension & Gradle Plugin. - Run vscode launch configuration
Attach to Gradle Plugin.
Note: There is a known issue that when the Gradle project stores in a sub-folder of the root folder, the
Attach to Gradle Pluginwill fail to attach. See #1237.
- Run vscode launch configuration
Debug Gradle Server & Extension. - Run vscode launch configuration
Attach to Gradle Serverwhen you notice theGradle: Connecting...message in the bottom status bar.
Note: If
[error] Error connecting to gradle server: Failed to connect before the deadlineappears in theGradle for Javaoutput channel, it indicates that the connection attempt to the Gradle Server was too slow. The GradleBuildClient requires an active Gradle Server to successfully establish a connection. If you encounter this issue, please retry the connection promptly to avoid this error.
Open the root of the project in VS Code.
Open the Debug panel, and select one of the debug tasks, for example Debug Extension, or any of the test launch configurations.
You can also run ./gradlew build testVsCode to run all tests.
Prettier is used to lint & format most files.
- Lint:
./gradlew lint - Fix linting issues:
./gradlew format