vscode-gradle icon indicating copy to clipboard operation
vscode-gradle copied to clipboard

Multi-project does not work correctly

Open bibhas2 opened this issue 2 years ago • 2 comments

Extension Name: vscode-gradle Extension Version: v3.12.7 OS Version: Mac OS X 13.3.1 aarch64 VSCode version: 1.79.1 (Universal)

Describe the bug If you open a multi-project structured project then VSCode fails to recognize the sub-projects as part of the root project. For any Java file it gives this type of warning.

App.java is a non-project file, only syntax errors are reported

To Reproduce Create a new Gradle application with library using gradle init. I am attaching one here.

Open the root project in VSCode. Open any Java code. You will see this warning.

image

Expected behavior VSCode should recognize each sub-project and the dependencies among them.

Screenshots image

Output from "Gradle for Java"

[info] [gradle-server] Server started, listening on 54953
[info] Gradle client connected to server
[info] Java Home: /opt/homebrew/Cellar/openjdk@17/17.0.7/libexec/openjdk.jdk/Contents/Home
[info] JVM Args: --add-opens=java.base/java.util=ALL-UNNAMED,--add-opens=java.base/java.lang=ALL-UNNAMED,--add-opens=java.base/java.lang.invoke=ALL-UNNAMED,--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant
[info] Gradle User Home: /Users/bibhas/.gradle
[info] Gradle Version: 7.6
[info] > Task :buildSrc:extractPluginRequests UP-TO-DATE
> Task :buildSrc:generatePluginAdapters UP-TO-DATE
> Task :buildSrc:compileJava UP-TO-DATE
> Task :buildSrc:compileGroovy NO-SOURCE
> Task :buildSrc:compileGroovyPlugins UP-TO-DATE
> Task :buildSrc:pluginDescriptors UP-TO-DATE
> Task :buildSrc:processResources UP-TO-DATE
> Task :buildSrc:classes UP-TO-DATE
> Task :buildSrc:jar UP-TO-DATE
> Task :buildSrc:assemble UP-TO-DATE
> Task :buildSrc:compileTestJava NO-SOURCE
> Task :buildSrc:compileTestGroovy NO-SOURCE
> Task :buildSrc:pluginUnderTestMetadata UP-TO-DATE
> Task :buildSrc:processTestResources NO-SOURCE
> Task :buildSrc:testClasses UP-TO-DATE
> Task :buildSrc:test NO-SOURCE
> Task :buildSrc:validatePlugins UP-TO-DATE
> Task :buildSrc:check UP-TO-DATE
> Task :buildSrc:build UP-TO-DATE

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings

CONFIGURE SUCCESSFUL in 8s
9 actionable tasks: 9 up-to-date
[info] Found 127 tasks

Does the bug still exist if you disable all other extensions? Yes/No

Additional context The project build just fine from the command line. There are no issues with Gradle build file or code. It's just that VSCode is unable to work with multi-project structure. gtest.zip

bibhas2 avatar Jun 16 '23 15:06 bibhas2