Ziqi Liu
Ziqi Liu

Reputation: 3171

vscode java doesn't work with multi-project layout gradle project

java vscode doesn't work well with multi-project layout gradle project. I can simply reproduce this with the sample project generated by gradle init.

The error msg looks like some building task dependency issues: Cannot use Gradle object after build has finished

I've described the issue here https://github.com/redhat-developer/vscode-java/issues/1984

Just want see if anyone have met such issue before and any idea for a workaround?

Upvotes: 1

Views: 2337

Answers (1)

Molly Wang-MSFT
Molly Wang-MSFT

Reputation: 9521

I create a demo gradle project by Spring Initializr Java Support, with build.gradle and settings.gradle generated automatically, so when i run gradle init, it would throw > Task :init SKIPPED because settings file and build file already existed.

After i delete them manually, gradle init could be executed successfully and re-generate build.gradle and settings.gradle:

enter image description here

I've noticed the comment below your github issue:

This issue seems similar to another one I'm seeing with eclipse buildship, so most likely it's an issue happening in latest gradle version

And I'm using Gradle 7.0.2, there's no error shown. You may have a try.

Upvotes: 1

Related Questions