My gradle project includes gradlew and gradlew.bat files inside of the repository, should they be pushed to git or not? I did not see anybody say they should be removed here. What is the purpose of these files?
NOT Really. Reason being if someone download or clone your repo and try to run your application through command line and they do not have gradle installed on their local machine, they have to install and configure Gradle and then run it. The gradlew provides a convenient way to run a gradle build with installing it.
Here is what Gradle documentation says:
Most tools require installation on your computer before you can use them. If the installation is easy, you may think that’s fine. But it can be an unnecessary burden on the users of the build. Equally importantly, will the user install the right version of the tool for the build? What if they’re building an old version of the software?
The Gradle Wrapper (henceforth referred to as the “Wrapper”) solves both these problems and is the preferred way of starting a Gradle build.
The Wrapper is something you should check into version control. By distributing the Wrapper with your project, anyone can work with it without needing to install Gradle beforehand.
The wrapper guarantees you’ll be using the version of Gradle required by the project. you can easily update the project to a newer version of Gradle, and push those changes to version control so other team members use the newer version.
© 2022 - 2024 — McMap. All rights reserved.