ened
(Sebastian Roth)
July 17, 2015, 10:37am
1
My project has roughly a structure like this:
/
/app
/app/component1
/app/component2
/app/component3
/tests
/tests/testapp1
/tests/testapp2
/tests/testapp3
And when I run ./gradlew assembleRelease, all app components and test components will be compiled.
How may I skip all test components during this ./gradlew call?
You can simply run the build form the ‘/app’ directory. Since you’re using the wrapper you’ll have to do something like this
$ cd app
$ ../gradlew assembleRelease
ened
(Sebastian Roth)
July 18, 2015, 8:01am
3
Thank you Mark, but I was looking for a way to handle this without changing the current directory.
At least, that is my plan until the gradle plugin for the Jenkins continuous integration server supports switching the directory.
ened
(Sebastian Roth)
July 20, 2015, 9:19am
4
The special flag is “-p”, hence it works for me with:
./gradlew -p app assembleRelease