Comments (8)
If you download a gradle distribution and unzip it, then point at that, it will work.
Also if you paste the url to a download zip on the internet, that should also work (it will be downloaded and unzipped on your behalf).
Also... the recommended way of specifying which gradle version to use is to add the gradle wrapper to your build itself so that your build is 'self contained' and doesn't depend whichever random gradle installation is the default in a users particular environment to match what your build expects.
Nevertheless changing how we 'validate' a local gradle installation isn't unreasonable or hard to do. Do you have a good suggestion of what files we should look for to recognize with some certainty that what the user pointed to is in fact a gradle installation and not some random folder?
I'll gladly change those few lines of code if you have a better idea.
from eclipse-integration-gradle.
Just wanted to make something clear. The tools don't actually need the gradle.sh or bat scripts. So they don't need to actually know where they are. The checks are in a sense not necessary. They are just there to validate to some degree the user points to a real gradle installation.
So indeed it is not hard to change these checks. The only tricky bit is finding some other thing to look for that you would expect to see that would give you good confidence the installation is not just a random folder.
In my defense.. I think the checks do meet a distribution as it is downloaded. If the checks fail it means you have modified it by moving or removing files. Why can't you just leave the distribution intact? Instead of moving the binary scripts around to different places, you should be able to symlink them instead.
from eclipse-integration-gradle.
Specifiying gradle wrapper is the correct solution for most cases, I will not argue with that. This was exactly my problem as the project which I was messing with specified an older verson of gradle in its gradlew.properties. Thank you.
But the reason for specifying system gradle distribution might be the following: gradle somehow creates different caches for different versions. You might want to use a single cache if you do not want to download libs for all the different versions. In any case you might want to override gradlew settings in favor of system settings (just like you can use gradle instead of gradlew in console).
Also if you paste the url to a download zip on the internet, that should also work (it will be downloaded and unzipped on your behalf).
This sounds like a good solution too.
Why can't you just leave the distribution intact?
I am installing from a package made for my system (Archlinux). It does not contain any unnecessary files for the system and, as is the standard in linux, distributes files across different system folders.
I'll gladly change those few lines of code if you have a better idea.
Maybe it would be enough to just check for bin/gradle file?
from eclipse-integration-gradle.
Is the bin gradle file inside the gradle distribution folder? I understood from your earlier message that is not, but it is moved to another bin folder? If it is in fact in the gradle distribution then I could change the validity check to look for either the gradle shell or gradle.bat so that if either one is there it counts as 'valid'.
from eclipse-integration-gradle.
I understood that shell or bat are not necessary. Is it so? If so it could be ok to check just for bin/gradle file? In my case bin/gradle and lib are in one place, so that just removing the check for gradle.bat would solve the problem.
from eclipse-integration-gradle.
I will change the check so if either shell or bat script is there it passes. After all if you have a case where you remove the .bat file some people on windows might think of doing the opposite thing and only keep the .bat file.
from eclipse-integration-gradle.
Good idea.
(I got confused a little before because I missed the fact that bin/gradle IS the shell file. I have another gradle.sh in a different location that adjusted some bash env vars. Sorry for that.)
from eclipse-integration-gradle.
I've raised a ticket here:
https://issuetracker.springsource.com/browse/STS-3746
We don't really use github issues as our 'real' issue tracker. So I'm closing the github issue now as a 'duplicate'.
from eclipse-integration-gradle.
Related Issues (20)
- Could not find tools.jar HOT 1
- “refresh all” update the eclipse .project file by force
- Classpath sorting removes test folder HOT 1
- Gradle-STS-to-Buildship message HOT 2
- Fail to initialize EclipseModelBuilder in gradle 2.14.1 if "Use Custom Tooling Model" is checked. HOT 4
- Alternative Update Sites Link To AccessDenied XML HOT 1
- import Gradle project HOT 1
- Trying to import project HOT 1
- Tooling API version older than 3.0 in sts 3.9.1.201710100515-RELEASE HOT 2
- Mark Gradle's build directories as derived resources HOT 3
- http proxy Ineffective HOT 5
- ":..:DependentProject" not supported in settings.gradle HOT 1
- I don't have an extension tab HOT 2
- Gradle IDE upgrade from 3.6.4 to 3.7.0 fails for missing dependencies HOT 4
- What is the roadmap for this plugin with the presence of the BuildShip plugin? HOT 2
- Remap Jars to Gradle Projects ignores version HOT 5
- Offline installation requires HOT 4
- Gradle plugin trying to download gradle.zip from internet even though Gradle Home pointed to local folder HOT 6
- "Updating Gradle Classpath" happens during/after "Building workspace" HOT 1
- NPE during Eclipse Gradle project refresh HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eclipse-integration-gradle.