One of the most compelling features of cmake is the out-of-tree build paradigm, that enables one to build variants of a project into separate folders thus making it quicker to switch between build configurations.
Is there such a mechanism in android + gradle? Ideally, not a single file would be created or modified in the source tree.
EDIT - What I mean by out of tree is this:
My source folder looks something like:
/work/project/build.gradle
/work/project/src/...
/work/project/res/...
When I run gradle build, I end up with new folders like:
/work/project/.gradle/...
/work/project/build/..
/work/project/res/...
I would like to build the project using gradle so that thewe new folders and generated files are in a folder outside of project such as:
/work/build-project/.gradle/...
/work/build-project/build/..
/work/build-project/res/...
Here's a good find as to the philosphy behind it: http://voices.canonical.com/jussi.pakkanen/2013/04/16/why-you-should-consider-using-separate-build-directories/
You have to add to your root project's build.gradle
file:
allprojects {
buildDir = "/external/path/${rootProject.name}/${project.name}"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With