-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
69 lines (62 loc) · 1.9 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
import org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED
import org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED
import org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_OUT
import org.gradle.api.tasks.testing.logging.TestLogEvent.STARTED
// Kotlin DSL syntax for project level build.gradle
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath(GradleOldWayPlugins.ANDROID_GRADLE)
classpath(GradleOldWayPlugins.KOTLIN_GRADLE)
classpath(GradleOldWayPlugins.HILT)
}
}
plugins {
detekt
id(GradlePluginId.GIT_HOOKS)
id(GradlePluginId.KTLINT)
id(GradlePluginId.UPDATE_DEPENDENCIES)
id(GradlePluginId.JACOCO)
}
allprojects {
repositories {
google()
mavenCentral()
}
}
subprojects {
plugins.apply(GradlePluginId.SPOTLESS)
plugins.apply(GradlePluginId.KTLINT)
tasks {
withType<Test> {
testLogging {
// set options for log level LIFECYCLE
events = setOf(
FAILED,
STARTED,
PASSED,
SKIPPED,
STANDARD_OUT
)
exceptionFormat = FULL
showExceptions = true
showCauses = true
showStackTraces = true
}
maxParallelForks =
(Runtime.getRuntime().availableProcessors() / 2).takeIf { it > 0 } ?: 1
}
}
}
// JVM target applied to all Kotlin tasks across all sub-projects
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString()
}
tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}