-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support quickfix for gradle jpms projects #2304
Conversation
5761d47
to
6272c08
Compare
@rgrunber @testforstephen @jdneo I have addressed the conflicts and updated the descriptions. feel free to review and comment :) |
6272c08
to
14e131e
Compare
...src/org/eclipse/jdt/ls/core/internal/corrections/proposals/GradleCompatibilityProcessor.java
Show resolved
Hide resolved
...src/org/eclipse/jdt/ls/core/internal/corrections/proposals/GradleCompatibilityProcessor.java
Show resolved
Hide resolved
...eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/managers/GradleProjectImporter.java
Outdated
Show resolved
Hide resolved
try { | ||
ClasspathResult result = ProjectCommand.getClasspathsFromJavaProject(javaProject, new ProjectCommand.ClasspathOptions()); | ||
IModuleDescription moduleDescription = javaProject.getModuleDescription(); | ||
if (moduleDescription == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest extracting the code in if-else blocks to methods separately - for better readiness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in daf2a76
Signed-off-by: Shi Chen <chenshi@microsoft.com>
Signed-off-by: Shi Chen <chenshi@microsoft.com>
80188ac
to
daf2a76
Compare
Since this issue related to the Gradle versions under Gradle 7, which do not support the current test environment (Java 17), so the test cases can't be added until we support running tests in another Java version. |
Signed-off-by: Shi Chen <chenshi@microsoft.com>
Signed-off-by: Shi Chen chenshi@microsoft.com
related to redhat-developer/vscode-java#2773
Gradle provides better JPMS support since 7.0, see: gradle/gradle#890 (comment), which means the Gradle versions under 7.0 might cause some issues, and the user will see errors such as "xxx is not accessible".
See gradle/gradle#16922, Gradle 7.0.1 added an extra fix about JPMS projects, so 7.0.1 is a better recommendation version IMO.
this PR provides a quickfix to help users upgrade the gradle version.
action.mp4