title: Gradle: compile tests but do not run them
body: <p>I would like to run a Gradle build that compiles the tests (JUnit tests in the <code>src/test/java</code> directory) but does not run them.</p>
  <p><code>./gradlew build</code> compiles and runs the tests, while <code>./gradlew build -x test</code> does not compile the tests. I also tried <code>./gradlew build -x testClasses</code>, but that does not yield the desired result as it builds and runs the tests.</p>
  <p>Is there a way to achieve this?</p>