Shivam | Spotless | Disable pre-commit hook regeneration (#3995)
This commit is contained in:
committed by
GitHub Enterprise
parent
6660e9896a
commit
c150da5e2c
@@ -30,15 +30,3 @@ spotless {
|
||||
googleJavaFormat().aosp()
|
||||
}
|
||||
}
|
||||
|
||||
task createSpotlessPreCommitHook() {
|
||||
def gitHooksDirectory = new File("$project.rootDir/.git/hooks/")
|
||||
if (!gitHooksDirectory.exists()) gitHooksDirectory.mkdirs()
|
||||
new File("$project.rootDir/.git/hooks", "pre-commit").text =
|
||||
"""#!/bin/sh
|
||||
set -e
|
||||
./gradlew -PdisableSpotlessCheck spotlessApply
|
||||
git update-index --again :/:
|
||||
"""
|
||||
"chmod +x .git/hooks/pre-commit".execute()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user