microsoft / vscode-java-pack

VS Code extensions for Java developers.
Other
291 stars 133 forks source link

Bug Compilation errors in Gradle Integration Testing #522

Open rsrini7 opened 3 years ago

rsrini7 commented 3 years ago

Environment:

Step to Reproduce: Clone and open with code https://github.com/Jet-C/spring-demo

Expected Behavior: No compilation issue in "Integration" folder. Tested with Intellij idea and no errors reported.

Actual Behavior: Compilation issue in "Integration" folder.

Related Issues:

akaroml commented 3 years ago

Thanks for reaching out @rsrini7 @testforstephen please take a look.

testforstephen commented 3 years ago

@rsrini7 you're using some custom configuration scope integration in your build.gradle, and the gradle tooling buildship used by vscode java extension doesn't recognize it by default. You have to add the following section in your build.gradle file. Learn more from FAQ at buildship and https://github.com/eclipse/buildship/issues/371.

eclipse {
    classpath {
        plusConfigurations += [ configurations.developmentOnly, configurations.runtimeClasspath, configurations.integrationRuntimeClasspath, configurations.integrationCompileClasspath ]
    }
}