How to pass build.gradle directory to gradlew?

BuildGradle

Build Problem Overview


./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?

Build Solutions


Solution 1 - Build

Just found it from Appendix D. Gradle Command Line.

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionHaiXin TieView Question on Stackoverflow
Solution 1 - BuildHaiXin TieView Answer on Stackoverflow