-
Notifications
You must be signed in to change notification settings - Fork 53
/
build.gradle
80 lines (73 loc) · 2.53 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
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
70
71
72
73
74
75
76
77
78
79
80
buildscript {
ext.compileVersion = 34
ext.minVersion = 21
}
plugins {
alias libs.plugins.mavenPublish apply false
alias libs.plugins.android.application apply false
alias libs.plugins.android.library apply false
alias libs.plugins.kotlin.android apply false
alias libs.plugins.dokka
alias libs.plugins.kover apply false
alias libs.plugins.detekt
alias libs.plugins.dependencyGraph
alias libs.plugins.emerge apply false
// Removing from here gives an error
// The request for this plugin could not be satisfied because the plugin is already on the classpath with an
// unknown version, so compatibility cannot be checked.
alias libs.plugins.kotlin.parcelize apply false
}
dependencies {
detektPlugins libs.detekt.formatting
detektPlugins libs.detekt.compose
}
allprojects {
repositories {
mavenCentral()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
task detektAll(type: io.gitlab.arturbosch.detekt.Detekt) {
description = "Runs over whole code base without the starting overhead for each module."
buildUponDefaultConfig = true
autoCorrect = true
parallel = true
setSource(files(rootDir))
include("**/*.kt")
include("**/*.kts")
exclude("**/build/**")
exclude("**/test/**/*.kt")
exclude("**/testDefaults/**/*.kt")
exclude("**/testCustomEntitlementComputation/**/*.kt")
config.setFrom(files("$rootDir/config/detekt/detekt.yml"))
baseline.set(file("$rootDir/config/detekt/detekt-baseline.xml"))
reports {
xml.enabled = true
xml.destination = file("build/reports/detekt/detekt.xml")
html.enabled = false
txt.enabled = false
}
}
task detektAllBaseline(type: io.gitlab.arturbosch.detekt.DetektCreateBaselineTask) {
description = "Overrides current top level baseline with issues found on this run." +
"Issues found on the baseline will be ignored on detekt runs."
buildUponDefaultConfig.set(true)
ignoreFailures.set(true)
parallel.set(true)
setSource(files(rootDir))
config.setFrom(files("$rootDir/config/detekt/detekt.yml"))
baseline.set(file("$rootDir/config/detekt/detekt-baseline.xml"))
include("**/*.kt")
include("**/*.kts")
exclude("**/build/**")
exclude("**/test/**/*.kt")
exclude("**/testDefaults/**/*.kt")
exclude("**/testCustomEntitlementComputation/**/*.kt")
}
tasks.dokkaHtmlMultiModule.configure {
outputDirectory.set(file("docs/" + project.property("VERSION_NAME")))
includes.from("README.md")
}