While there’s a command line option to exclude a (dependent) task from execution ("-x/–exclude-task"), there nothing like that for the project-level in multi-project builds AFAIK.
Background: Our settings.gradle file contains the main app and examples. Usually, a developer wants to locally build both. For example, running “./gradlew lint” should run “lint” on “app” and “examples”. But sometimes, we’d like to not build the examples to speed up the build. Currently, we’re doing this by wrapping the “include ‘:examples’” directive in setting.gradle in a conditional that checks for a property, which we can set form the command line. But unfortunately this does e.g. not work with Android Studio [1]. So simply having an --exclude-project command line option would be nice.
[1] https://code.google.com/p/android/issues/detail?id=80193