Git Product home page Git Product logo

Comments (8)

kdvolder avatar kdvolder commented on April 27, 2024

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.

kdvolder avatar kdvolder commented on April 27, 2024

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.

jimmytheneutrino avatar jimmytheneutrino commented on April 27, 2024

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.

kdvolder avatar kdvolder commented on April 27, 2024

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.

jimmytheneutrino avatar jimmytheneutrino commented on April 27, 2024

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.

kdvolder avatar kdvolder commented on April 27, 2024

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.

jimmytheneutrino avatar jimmytheneutrino commented on April 27, 2024

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.

kdvolder avatar kdvolder commented on April 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.