-
Notifications
You must be signed in to change notification settings - Fork 446
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
JDK 13 support for Gradle #1073
Comments
JDK 13 support has not been released yet. You can start vscode-java with it but can't compile against it. You can use the latest CI build (0.50.0.*) available from https://download.jboss.org/jbosstools/jdt.ls/staging/?C=M;O=D |
Please provide a sample project reproducing this issue. It should just work if junit Jupiter is on the classpath. |
Here is a sample repro project: https://github.com/manastalukdar/dummy-java |
@fbricon Is there any workaround for the time being? Perhaps something I could manually edit in some metadata file... |
The Buildship-side seems fine to me. I've imported the sample project above (with Gradle 5.6.2, Buildship 3.1.2, Eclipse 2019-09 containing Java 13 support from the Marketplace). When I set the |
@donat you mean you switched from 13 to 1.13? Your screenshot shows 13 in build.gradle |
I meant |
Ok it works if I move the sourceCompatibility and targetCompatibility properties outside of the compileTestJava block. What I actually did before, which didn't work, was to set those properties in a compileJava block: compileJava {
sourceCompatibility = 13
targetCompatibility = 13
options.compilerArgs += ['-parameters', '-g']
} @donat looks like this a bug (similar setup is referenced in https://stackoverflow.com/a/28513930), or is that behavior no longer supported by Gradle? |
@fbricon The issue still exists with both 0.50 stable and 0.51 CI builds of the language server extension. Update: 0.50 has been explicitly marked as JDK 13 support for Eclipse, Maven only. I guess gradle support is WIP. |
@fbricon This is the expected behavior. Buildship loads the Java versions from the |
So I managed to resolve this locally from the advice here eclipse-jdtls/eclipse.jdt.ls#1196 (comment) I launched eclipse and waited the usual 20 minutes for it to start. Waited another 20 minutes for it to transition to the welcome screen. Added the snapshot to grab that update and then exited eclipse. I then searched my user directory for 'buildship' and located the following two jar files:
I then copied those two files into After that I re-opened vscode, cleaned the language server workspace and after a couple seconds I was able to work again (debug, build, test, etc.). Is this method recommended? No. I just hope it pushes things in the right direction. |
I'm testing 3.1.3 in jdt.ls builds. Hopefully we should be able to provide a CI build tomorrow |
Just updated to JDK13. None of the java imports and primitives are recognized. Any known issues with JKD13? Cleaned language server workspace with the same result.
Environment
Steps To Reproduce
Entry in .classpath file (jdk 13):
Multiple exceptions in output from Extension:
Can't convert '13' to enum type 'JavaVersion'
Caused by: java.lang.IllegalArgumentException: Cannot convert string value 'VERSION_13' to an enum value of type 'org.gradle.api.JavaVersion' (valid case insensitive values: VERSION_1_1, VERSION_1_2, VERSION_1_3, VERSION_1_4, VERSION_1_5, VERSION_1_6, VERSION_1_7, VERSION_1_8, VERSION_1_9, VERSION_1_10, VERSION_11, VERSION_12, VERSION_HIGHER)
The text was updated successfully, but these errors were encountered: