-
Notifications
You must be signed in to change notification settings - Fork 50
/
build.gradle.kts
55 lines (46 loc) · 1.66 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
52
53
54
55
import com.avito.logger.LogLevel
plugins {
base
// accessing version catalog here is blocked by IDE false-positive error
// https://youtrack.jetbrains.com/issue/KTIJ-19369
id("com.autonomousapps.dependency-analysis") version "0.78.0"
id("convention.dependency-updates")
id("convention.detekt-root")
id("com.avito.android.gradle-logger")
id("com.avito.android.build-verdict")
}
buildscript {
/**
* workaround to load plugin classes once:
* https://youtrack.jetbrains.com/issue/KT-31643#focus=Comments-27-3510019.0-0
*/
dependencies {
classpath(libs.androidGradle)
classpath(libs.kotlinGradle)
/**
* com.autonomousapps.dependency-analysis depends on older version of okio, and it's resolved for
* our instrumentation-tests plugin in subprojects in runtime
*/
classpath(libs.okio)
// TODO Delete when update sentry in infra
classpath(libs.jacksonCore)
}
}
gradleLogger {
fileHandler.set(LogLevel.INFO)
printlnHandler(true, LogLevel.INFO)
}
val taskGroup = "Avito Android build"
tasks.register<Exec>("installGitHooks") {
group = "Build Setup"
description = "Install local repository git hooks"
commandLine("git")
args("config", "core.hooksPath", ".git_hooks")
onlyIf { !project.hasProperty("ci") }
}
val initialTaskNames: List<String> = project.gradle.startParameter.taskNames
project.gradle.startParameter.setTaskNames(initialTaskNames + listOf("installGitHooks"))
tasks.named("check") {
dependsOn(gradle.includedBuild("build-logic").task(":check"))
dependsOn(gradle.includedBuild("build-logic-settings").task(":check"))
}