gradle / gradle

Adaptable, fast automation for all
https://gradle.org
Apache License 2.0
16.77k stars 4.69k forks source link

gradlew should not download gradle if it is already installed #30816

Open soloturn opened 1 week ago

soloturn commented 1 week ago

Expected Behavior

if one has a gradle version in the path, gradlew should just use it instead of redownloading it again.

Current Behavior (optional)

it downloads again.

$ gradle --version

Welcome to Gradle 8.10.2!

$ ./gradlew clean build
Downloading https://services.gradle.org/distributions/gradle-8.10.2-bin.zip

Context

while it is true one can choose to call gradle or gradlew, some people build gradlew into scripts to make it run for sure. an example is terasology. when the internet connection is not good, such unnecessary re-downloads are painful.

ov7a commented 6 days ago

This issue needs a decision from the team responsible for that area. They have been informed. Response time may vary.


There might be security implications with that approach, however, they can be mitigated by the checksums. May be we should update the docs to be explicit about requiring Gradle installations to be isolated and managed by Gradle.