-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.gradle.kts
51 lines (44 loc) · 1.32 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
39
40
41
42
43
44
45
46
47
48
49
50
51
buildscript {
extra.apply {
set("kotlin_version", "1.7.20")
}
val kotlinVersion = extra.get("kotlin_version") as String
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath("org.jlleitschuh.gradle:ktlint-gradle:11.0.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3")
}
}
plugins {
id("com.android.application") version ("7.3.0") apply (false)
id("com.android.library") version ("7.3.0") apply (false)
id("org.jetbrains.kotlin.android") version ("1.8.0") apply (false)
id("com.google.dagger.hilt.android") version ("2.44") apply (false)
id("org.jlleitschuh.gradle.ktlint") version ("11.0.0")
}
subprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
ktlint {
filter {
exclude("**/*.md")
}
debug.set(true)
disabledRules.set(setOf("final-newline"))
}
}
task<Copy>("installGitHook") {
from(File(rootProject.rootDir, "pre-commit"))
into { File(rootProject.rootDir, ".git/hooks") }
fileMode = "0777".toInt()
}
task<Delete>("clean") {
delete(rootProject.buildDir)
}
tasks.register(":presentation:preBuild") {
dependsOn("installGitHook")
}