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).
Gradl
In Gradle 2.12 a compileOnly configuration has been introduced. A blog post introducing this features can be found here:
Gradle latest feature: Compile only dependencies
Please be aware of one important side effect:
As a result of the addition of the “compileOnly” configuration, the “compile” configuration no longer represents a complete picture of all compile time dependencies. When needing reference a compile classpath in build scripts or custom plugins, the appropriate source set’s compileClasspath property should be used instead.