Can someone please give me a simple build.gradle example of how I can specify compile-time-only classes that are not included in the runtime deployment (war).
The OP apparently didn't look for an Android answer, but some answers are specific to Android. So I suggest you look at this page : http://tools.android.com/tech-docs/new-build-system
Version 0.9.0 introduced a provided scope. So, just use