Why does VS Code see to have issues with Java 11 and Gradle

Viewed 21

I am upgrading my project from Java 8 to 11 and my vs code throws this exception at me:

[{
    ...,
    "message": "Could not run phased build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-7.5-bin.zip'.\norg.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'wacky-app'.\nA problem occurred configuring root project 'wacky-app'.\njavaConfig.targetVersion (11) is higher than the Java version used by Gradle (1.8).\nEither useTargetCompiler must be set to true, or Gradle must be run with a newer Java.",
    "source": "Java",
    ...
}]

I set sourceCompatibility and targetCompatibility to 11. I also set useTargetCompiler but my Intellij seemed to have a problem with that.

As a matter of fact, Intellij seems to work just fine (after I got rid of that last one) with Java 11 and gradle.

Which I noticed when I tried to compile and rune my tests using intellij (wont work in vs code), in vscode it appears that my tests wont run from the debugger or the test panes.

Does vs code just have a tough time executing gradle tasks? Is there a place to set them? Other? I

I want to start using vscode for my java (spring-boot) work because all my other projects are in vs code (go, python, javascript). It just makes sense to keep everything in one IDE.

(Which has kind of been a dream of mine for the last 10 years -- one IDE, different languages, just as effective in all of them).

0 Answers
Related