Fail build if Code Coverage to low

Hi,
is there a better way now (in gradle 2.5), to fail the build if the code coverage is to low, then How to fail the build on insufficient code coverage? ?