Created
April 30, 2022 13:15
-
-
Save Barros9/a97f11d5c6009bff39598209f415aa23 to your computer and use it in GitHub Desktop.
Gradle task pre commit ktlintCheck
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task installGitHook(type: Copy) { | |
from new File(rootProject.rootDir, 'githook/pre-commit') | |
into { new File(rootProject.rootDir, '../.git/hooks') } | |
fileMode 0777 | |
} | |
tasks.getByPath(':app:preBuild').dependsOn installGitHook |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment