gradle: add class cycle checks

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>