-
Notifications
You must be signed in to change notification settings - Fork 441
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
Gradle should respect system setup #232
Comments
Does your project contain a Gradle wrapper? |
Nope, I supposed that was it at first, but I removed it.
Does anyhow this plugin run a Gradle instance to have Gradle support? |
I've got the phantom Gradle also on Windows (output from
|
so what happens is, if no wrapper is found, then we let BuildShip use whichever default version of Gradle it has defined. I reckon we could do
For .2, is it enough to check for the GRADLE_HOME env var? |
For n. 2 I suppose the best would be to check
|
@ItachiSan @fbricon How do you guys specify I have a valid installation in I need to specify a recent version because of a syntax error in my Thanks! |
I ran into the same issue. Having gradle available on the path and/or setting GRADLE_HOME does not make vscode use anything other than gradle-3.5 that comes with buildship (I think). Note that as a workaround, having a gradle wrapper in your project does make vscode use the gradle version of choice (that the wrapper is). @fbricon I think this issue needs to be revisited. |
This is supposed to work https://github.com/eclipse/eclipse.jdt.ls/blob/a617c5a630d01ae35b01bdaa29fa7725bc1a45d9/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/managers/GradleProjectImporter.java#L89 :-) Anyone having the issue on Windows/Linux or is this just a Mac problem? |
@mikegleasonjr @rubin55 see https://apple.stackexchange.com/questions/106355/setting-the-system-wide-path-environment-variable-in-mavericks if code is opened from CLI, I expect it'd inherit the environment variables available in the terminal. |
I've checked on Windows; if i start a terminal within vscode and do set | findstr GRADLE_HOME, i see it set correctly. Regardless, vscode ignores it as I can tell from the .log file where I see BuildShip trying to parse my incompatible with 3.x build.gradle using Gradle 3.5 instead of the 4.2 I have on my path and referenced in GRADLE_HOME. |
I am aware of the workaround (I personally opted for using the wrapper). Still I think code should check PATH first and handle this more intuitively, as in:
In that order. |
@rubin55 we could indeed parse the $PATH environment variable to find the gradle executable, but I'm assuming you'd find it only when $PATH has been set when starting a terminal. So if you don't find $GRADLE_HOME, you won't find gradle in $PATH either. What eclipse-jdtls/eclipse.jdt.ls#411 does is check if the server has been started with a -DGRADLE_HOME parameter, so you need to add it to the |
Fixed within #383 |
The background Gradle daemon run for supporting Gradle projects doesn't respect system settings.
Environment
Steps To Reproduce
Current Result
You can find a running Gradle instance in such a way
Expected Result
Additional Informations
The Gradle options I would like to be respected are these ones:
export GRADLE_OPTS="-Xmx64m -Dorg.gradle.jvmargs='-Xmx256m -XX:MaxPermSize=64m'"
Running Gradle from a terminal does respect them.
The text was updated successfully, but these errors were encountered: