Skip folder with sub modules

My project has roughly a structure like this:


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

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.

The special flag is “-p”, hence it works for me with:

./gradlew -p app assembleRelease