-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathbuild.gradle.kts
96 lines (84 loc) · 2.72 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
* Unitto is a calculator for Android
* Copyright (c) 2024 Elshan Agaev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import dev.iurysouza.modulegraph.Theme
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.android.gradlePlugin) apply false
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.room) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.android.test) apply false
alias(libs.plugins.serialization) apply false
alias(libs.plugins.detekt) apply true
alias(libs.plugins.dev.iurysouza.modulegraph) apply true
}
tasks.register("detektProjectReport", Detekt::class) {
description = "Generate detekt report"
buildUponDefaultConfig = true
ignoreFailures = false
parallel = false
config = rootProject.files("/detekt/config.yml")
baseline = rootProject.file("/detekt/baseline.xml")
setSource(files(rootDir))
include("**/*.kt")
exclude(
"**/*.kts",
"**/resources/**",
"**/build/**",
"**/icons/symbols/**",
"**/evaluatto/**",
"**/graphing/**",
)
reports {
xml.required = false
txt.required = false
md.required = false
sarif.required = false
html.required = true
html.outputLocation = rootProject.file("/detekt/report.html")
}
}
tasks.register("detektProjectBaseline", DetektCreateBaselineTask::class) {
description = "Update detekt baseline"
buildUponDefaultConfig = true
ignoreFailures = true
parallel = false
config = rootProject.files("/detekt/config.yml")
baseline = rootProject.file("/detekt/baseline.xml")
setSource(files(rootDir))
include("**/*.kt")
exclude(
"**/*.kts",
"**/resources/**",
"**/build/**",
"**/icons/symbols/**",
"**/evaluatto/**",
"**/graphing/**",
)
}
// Use createModuleGraph
moduleGraphConfig {
readmePath.set("./ARCHITECTURE.md")
heading = "## Module Graph"
theme.set(Theme.DARK)
}
tasks.register("clean", Delete::class) { delete(rootProject.layout.buildDirectory) }