-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.gradle
26 lines (24 loc) · 1.04 KB
/
build.gradle
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
buildscript {
dependencies {
classpath "com.google.dagger:hilt-android-gradle-plugin:${Versions.hilt}"
classpath("com.diffplug.spotless:spotless-plugin-gradle:${Versions.spotless}")
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.3.1' apply false
id 'com.android.library' version '8.3.1' apply false
id 'org.jetbrains.kotlin.android' version '1.9.23' apply false
id 'com.google.devtools.ksp' version "1.9.23-1.0.19" apply false
id 'com.diffplug.spotless' version '6.25.0' apply false
}
apply from: "$project.rootDir/spotless.gradle"
tasks.register('createSpotlessPreCommitHook') {
def gitHooksDirectory = new File("$project.rootDir/.git/hooks/")
if (!gitHooksDirectory.exists()) gitHooksDirectory.mkdirs()
new File("$project.rootDir/.git/hooks", "pre-commit").text = """
#!/bin/bash
echo "Running spotless check"
./gradlew spotlessApply
"""
"chmod +x .git/hooks/pre-commit".execute()
}