HaiXin Tie
HaiXin Tie

Reputation: 2079

How to pass build.gradle directory to gradlew?

./gradlew can be run in the same directory as the build.gradle file, but how can I run gradlew (standard Gradle wrapper) from another directory? For Make, one can pass "-C DIRECTORY" to "Change to DIRECTORY before doing anything.". Is there an equivalent parameter in Gradle?

Upvotes: 62

Views: 29545

Answers (1)

HaiXin Tie
HaiXin Tie

Reputation: 2079

Just found it from Appendix D. Gradle Command Line.

The answer is -p <your project directory>, which defaults to the current directory.

Upvotes: 93

Related Questions