I am trying to understand how the Gradle Wrapper works. In many source repos, I see the following structure:
projectRoot/
src/
build.gradle
gradle.properties
settings.gradle
gradlew
gradlew.bat
gradle/
wrapper/
gradle-wrapper.jar
gradle-wrapper.properties
My questions:
- How/when does one generate
gradlew
/gradlew.bat
? Are you supposed to generate them only one time when the project is first created, do you generate them every time you commit/push changes? And how are they generated?
- Same question above, but for the
gradle/wrapper/*
files (gradle-wrapper.jar
and gradle-wrapper.properties
)?
- Some times I see other
*.gradle
files inside the project's gradle
directory. What are these additional Gradle files and what do they represent/do? Custom plugins?
- What is the difference in properties that go into
settings.gradle
vs what should be defined inside gradle.properties
?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…