We currently create a Gradle plugin for the Frege JVM language (https://github.com/Frege/frege-gradle-plugin) and would like to be a good citizen in the Gradle world, esp. making our compile, test, and documentation tasks play nicely with the Gradle lifecycle and conventions.
For example: how to make sure that tests are picked up from src/test/frege and be compiled to $buildDir/classes/test/frege and running the tests triggers that compilation first and the frege tests are called when all tests are run, etc.
What would be the best way to go about this? Is there any good example to copy from or a documentation of such a case?