-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
38 lines (37 loc) · 1.38 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlinAndroid) apply false
alias(libs.plugins.googleServices) apply false
alias(libs.plugins.kotlinSerialization) apply false
alias(libs.plugins.secret) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.kotlinPowerAssert) apply false
alias(libs.plugins.githook)
alias(libs.plugins.compose.compiler) apply false
}
githook {
hooks {
create("pre-push") {
shell = """
killall -9 java
echo "Running detekt check..."
OUTPUT="/tmp/detekt-${'$'}(date +%s)"
./gradlew detekt > ${'$'}OUTPUT
EXIT_CODE=${'$'}?
if [ ${'$'}EXIT_CODE -ne 0 ]; then
cat ${'$'}OUTPUT
rm ${'$'}OUTPUT
echo "***********************************************"
echo " detekt failed "
echo " Please fix the above issues before committing "
echo "***********************************************"
exit ${'$'}EXIT_CODE
fi
rm ${'$'}OUTPUT
killall -9 java
""".trimIndent()
}
}
}