-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
104 lines (90 loc) · 2.47 KB
/
build.gradle.kts
File metadata and controls
104 lines (90 loc) · 2.47 KB
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
97
98
99
100
101
102
103
104
buildscript {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath(libs.tools.gradle)
classpath(libs.kotlin.gradle)
classpath(libs.kotlin.serialization)
classpath(libs.detekt.gradle)
classpath(libs.dokka)
}
}
// Build configuration - centralized in config.gradle.kts
apply(from = "config.gradle.kts")
plugins {
alias(libs.plugins.kotlin.binary.compatibility)
alias(libs.plugins.gradle.maven.publish) apply false
}
// Note: apiValidation configuration should be here
// For now, commented out to allow build to proceed
// This will need to be configured properly after successful migration
// apiValidation {
// ignoredProjects.add("sample")
// }
allprojects {
repositories {
google()
mavenLocal()
mavenCentral()
}
}
subprojects {
apply(from = "$rootDir/detekt.gradle")
apply(from = "$rootDir/dokka.gradle")
}
gradle.projectsEvaluated {
subprojects.forEach { subproject ->
val apiCheckTask = subproject.tasks.findByName("apiCheck")
if (apiCheckTask != null) {
subproject.tasks.matching { it.name.startsWith("publish") }.configureEach {
dependsOn(apiCheckTask)
}
}
}
}
apply(from = "deploy.gradle.kts")
tasks.withType<JavaCompile> {
options.compilerArgs.addAll(listOf("--release", "8"))
}
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}
tasks.register("lintAll") {
dependsOn(
":sentinel:lintRelease",
":sentinel-no-op:lintRelease",
":tool-chucker:lintRelease",
":tool-collar:lintRelease",
":tool-dbinspector:lintRelease",
":tool-leakcanary:lintRelease",
":tool-appgallery:lintRelease",
":tool-googleplay:lintRelease"
)
group = "Verification"
description = "Run Detekt on all modules"
}
tasks.register("detektAll") {
dependsOn(
":sentinel:detekt",
":sentinel-no-op:detekt",
":tool-chucker:detekt",
":tool-collar:detekt",
":tool-dbinspector:detekt",
":tool-leakcanary:detekt",
":tool-appgallery:detekt",
":tool-googleplay:detekt"
)
group = "Verification"
description = "Run Detekt on all modules"
}
tasks.register("runStaticChecks") {
dependsOn(
":lintAll",
":detektAll"
)
group = "Verification"
description = "Run static checks on all modules"
}