Pergunta

Is there a plugin or some nice way to make gradle compile and test my application in the background?

I know there are some plugins for intellij and eclipse(infinitest amongst others), but I am looking for a general gradle solution regardless of the IDE.

It would be nice to start a testing-deamon and make it use growl or some other notification tool to let me know that the code is not compiling or the tests are failing.

Foi útil?

Solução

Continuous compilation/testing/etc. are features planned for future versions of Gradle. They will be based on the existing Gradle Daemon.

Update:

Gradle introduced the continuous build feature in version 2.5. The feature is still incubating, but we can already use it in our daily development. The continuous build feature means Gradle will not shut down after a task is finished, but keeps running and looks for changes to files to re-run tasks automatically. It applies perfectly for a scenario where we want to re-run the test task while we write our code. With the continuous build feature we start Gradle once with the test task and Gradle will automatically recompile source files and run tests if a source file changes.

To use the continuous build feature we must use the command line option --continuous or the shorter version -t. With this option Gradle will start up in continuous mode. To stop Gradle we must use the Ctrl+D key combination.

http://mrhaki.blogspot.com.au/2015/08/gradle-goodness-using-continuous-build.html

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top