Skip to content
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

Disabling the gradle wrapper doesn't work in some cases #1044

Closed
fbricon opened this issue May 16, 2019 · 1 comment · Fixed by #1045
Closed

Disabling the gradle wrapper doesn't work in some cases #1044

fbricon opened this issue May 16, 2019 · 1 comment · Fixed by #1045
Assignees
Milestone

Comments

@fbricon
Copy link
Contributor

fbricon commented May 16, 2019

If the gradle wrapper is disabled and no gradle home variable is defined, the GradleProjectImporter.getGradleDistribution returns the wrapper anyways, instead of the default gradle distro (DEFAULT_DISTRIBUTION == GradleDistribution.fromBuild() == wrapper):
https://github.com/eclipse/eclipse.jdt.ls/blob/43a78f7c339f41d7cb3c4d6d23e3fe18b74c29ef/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/managers/GradleProjectImporter.java#L120-L124.

And if the GradleProjectImporterTest.testDisableGradleWrapper runs in an environment which defines a gradle home, then the test fails L109:

https://github.com/eclipse/eclipse.jdt.ls/blob/43a78f7c339f41d7cb3c4d6d23e3fe18b74c29ef/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/managers/GradleProjectImporterTest.java#L107-L109

@fbricon
Copy link
Contributor Author

fbricon commented May 16, 2019

should be

DEFAULT_DISTRIBUTION = GradleDistribution.forVersion(GradleVersion.current().getVersion());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants