-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
64 lines (57 loc) · 1.63 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
plugins {
id(Config.Plugins.androidApplication) apply false
id(Config.Plugins.androidLibrary) apply false
kotlin(Config.Plugins.kotlinAndroid) apply false
id(Config.Plugins.ktLint) version (Versions.ktLintVersion)
id(Config.Plugins.detekt) version (Versions.detektVersion)
id(Config.Plugins.benManes) version (Versions.benManesVersion)
}
apply(from = "gradle/jacoco.gradle")
allprojects {
group = appId
repositories {
google()
mavenCentral()
}
}
subprojects {
apply {
plugin(Config.Plugins.ktLint)
plugin(Config.Plugins.detekt)
plugin(Config.Plugins.benManes)
}
ktlint {
debug.set(true)
version.set(Versions.ktLintSnapshotVersion)
verbose.set(true)
android.set(false)
outputToConsole.set(true)
ignoreFailures.set(false)
enableExperimentalRules.set(true)
filter {
exclude("**/generated/**")
include("**/kotlin/**")
}
}
detekt {
config.setFrom(rootProject.files("config/detekt/detekt.yml"))
tasks.detekt {
reports {
html {
outputLocation.set(file("build/reports/detekt.html"))
required.set(true) // reports can also be enabled and disabled at the task level as needed
}
}
}
}
}
tasks {
register("clean", Delete::class.java) {
delete(rootProject.buildDir)
}
withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask> {
rejectVersionIf {
candidate.version.isStableVersion().not()
}
}
}