diff --git a/build.gradle b/build.gradle index 0b85042..ed3adf1 100644 --- a/build.gradle +++ b/build.gradle @@ -62,6 +62,9 @@ spotless { tasks.register("updateGitHooks", Copy) { from "./scripts/pre-commit" into ".git/hooks" - - compileJava.dependsOn(this) -} \ No newline at end of file +} +tasks.register("executableGitHooks", Exec) { + commandLine "chmod", "ug+x", ".git/hooks/pre-commit" + dependsOn(updateGitHooks) +} +compileJava.dependsOn(executableGitHooks) \ No newline at end of file