Add gradle test pre-commit hook.