This message was deleted.
# community-support
s
This message was deleted.
v
What do you need it installed and in the PATH for? Practically any project should contain the 4 wrapper files that should be used to run the build. You only need a compatible Java version installed for that. Only if you bootstrap a new project or could be useful and for that your can either use the one integrated in your IDE, any wrapper of a different project, or if installed but not in the PATH just used fully qualified.
m
When I'm bootstrapping a new Gradle project, here's what I do: 1. Download (and extract) the version of Gradle I want from https://gradle.org/releases/ 2. Navigate to the root directory where my Gradle project will live. 3. Run
gradle init
, using the absolute path to Gradle (e.g.,
/home/mike/Downloads/gradle-8.5/bin/gradle init
). After that, like @Vampire said, you will always run
./gradlew
from the root directory of your project. For existing Gradle projects, those wrapper files (including
gradlew
) are almost always checked into source control; you shouldn't need to run
gradle init
for existing projects. (I guess you could add
gradle
to your
PATH
, but I don't use
gradle init
that frequently, so I just use the absolute path on the rare occasion I need to run it.)
v
I just do
Copy code
mkdir newproject
cd newproject
../oldproject/gradlew init --gradle-version 8.5
gw init
🙂
e
I often just
Copy code
cp -a oldproject/gradle* newproject/
and then clean up references (
gradle.properties
,
gradle/libs.versions.toml
) 😃