Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jdneo authored Nov 12, 2024
2 parents 17279c8 + 28eb056 commit a0bce15
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 17 deletions.
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.17.0
## What's Changed
* enhancement - Support onBuildShowMessage for BSP client by @jdneo in https://github.com/microsoft/vscode-gradle/pull/1583
* enhancement - Extract classes.jar from *.aar by @Tanish-Ranjan in https://github.com/microsoft/vscode-gradle/pull/1594
* enhancement - Gradle project view keeps project hierarchy by @jjohannes in https://github.com/microsoft/vscode-gradle/pull/1612
* fix - java generate Random pipe path by @Jiaaming in https://github.com/microsoft/vscode-gradle/pull/1582
* fix - Gradle test debug not working on version 8.5 and higher by @jdneo in https://github.com/microsoft/vscode-gradle/pull/1586
* fix - Correct the gradle java version to jdt parsing by @jdneo in https://github.com/microsoft/vscode-gradle/pull/1590
* fix - Fallback to /tmp/ when named pipe is too long by @jdneo in https://github.com/microsoft/vscode-gradle/pull/1591
* fix - Add root project folder to each key in projectTreeItemMap by @jjohannes in https://github.com/microsoft/vscode-gradle/pull/1617
* fix - Discover Gradle builds by looking for setting.gradle(.kts) by @jjohannes in https://github.com/microsoft/vscode-gradle/pull/1618
* fix - Cannot see Delegate Test to Gradle option in VS Code by @jdneo in https://github.com/microsoft/vscode-gradle/pull/1622
* docs - architecture image typo by @Jiaaming in https://github.com/microsoft/vscode-gradle/pull/1599
* gbs - Parallelize source set retrieval. by @Arthurm1 in https://github.com/microsoft/build-server-for-gradle/pull/168
* gbs - Find compatible GradleJavaHome and notify client in case of incompatibility by @Tanish-Ranjan in https://github.com/microsoft/build-server-for-gradle/pull/165
* gbs - Handle java source/target defined at extension level by @Arthurm1 in https://github.com/microsoft/build-server-for-gradle/pull/188

## New Contributors
* @Tanish-Ranjan made their first contribution in https://github.com/microsoft/vscode-gradle/pull/1594
* @jjohannes made their first contribution in https://github.com/microsoft/vscode-gradle/pull/1612

**Full Changelog**: https://github.com/microsoft/vscode-gradle/compare/3.16.4...3.17.0

## 3.16.4
## What's Changed
* fix - closeConnection will fail if pipe server hasn't been started by @Jiaaming in https://github.com/microsoft/vscode-gradle/pull/1579
Expand Down
4 changes: 2 additions & 2 deletions extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-gradle",
"displayName": "Gradle for Java",
"description": "Manage Gradle Projects, run Gradle tasks and provide better Gradle file authoring experience in VS Code",
"version": "3.16.4",
"version": "3.17.0",
"private": true,
"publisher": "vscjava",
"aiKey": "b4aae7d0-c65b-4819-92bf-1d2f537ae7ce",
Expand Down
46 changes: 32 additions & 14 deletions extension/src/Extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,20 +239,7 @@ export class Extension {
}

private async activate(): Promise<void> {
const testExtension = vscode.extensions.getExtension("vscjava.vscode-java-test");
if (testExtension) {
testExtension.activate().then((api: any) => {
if (api) {
const testRunner: GradleTestRunner = this.buildServerController.getGradleTestRunner(api);
api.registerTestProfile("Delegate Test to Gradle", vscode.TestRunProfileKind.Run, testRunner);
api.registerTestProfile(
"Delegate Test to Gradle (Debug)",
vscode.TestRunProfileKind.Debug,
testRunner
);
}
});
}
this.registerGradleTestRunner();
const activated = !!(await this.rootProjectsStore.getProjectRoots()).length;
if (!this.server.isReady()) {
await this.server.start();
Expand Down Expand Up @@ -399,4 +386,35 @@ export class Extension {
public getApi(): Api {
return this.api;
}

private async registerGradleTestRunner(): Promise<void> {
// To register the Gradle test runner, we need to wait for the Test Runner extension to be activated.
// The Test Runner extension depends on the Java extension, VS Code has an issue that it doesn't
// activate the Java extension before the Test Runner extension if we call activate() for the test extension.
// Thus here we need to activate the Java extension first.
const javaLsExtension = vscode.extensions.getExtension("redhat.java");
if (!javaLsExtension) {
return;
}

const javaLsApi = await javaLsExtension.activate();
if (!javaLsApi.serverReady) {
return;
}

await javaLsApi.serverReady();
const testExtension = vscode.extensions.getExtension("vscjava.vscode-java-test");
if (testExtension) {
const testRunnerApi = await testExtension.activate();
if (testRunnerApi) {
const testRunner: GradleTestRunner = this.buildServerController.getGradleTestRunner(testRunnerApi);
testRunnerApi.registerTestProfile("Delegate Test to Gradle", vscode.TestRunProfileKind.Run, testRunner);
testRunnerApi.registerTestProfile(
"Delegate Test to Gradle (Debug)",
vscode.TestRunProfileKind.Debug,
testRunner
);
}
}
}
}

0 comments on commit a0bce15

Please sign in to comment.