-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
95 lines (87 loc) · 3.21 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
95 lines (87 loc) · 3.21 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
buildscript {
repositories {
google()
mavenCentral()
gradlePluginPortal()
maven(url = "https://jitpack.io")
maven(url = "https://repo.gradle.org/gradle/libs-releases")
}
dependencies {
// plugins that lack standard plugin markers
classpath("com.ahasbini.tools:android-opencv-gradle-plugin:0.1.3-dev")
// needed at configuration time by :libs:emojis build script
classpath(libs.kotlinx.serialization.json)
}
}
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.kotlin.ksp) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.google.services) apply false
alias(libs.plugins.firebase.perf) apply false
alias(libs.plugins.bugsnag.android) apply false
alias(libs.plugins.bugsnag.gradle) apply false
alias(libs.plugins.secrets) apply false
alias(libs.plugins.navigation.safeargs) apply false
alias(libs.plugins.protobuf) apply false
alias(libs.plugins.androidx.room) apply false
alias(libs.plugins.screenshot) apply false
alias(libs.plugins.kover)
}
allprojects {
configurations.all {
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk7")
resolutionStrategy {
force(libs.kotlinx.serialization.core.get().toString())
force(libs.kotlinx.serialization.json.get().toString())
force(libs.kotlin.metadata.jvm.get().toString())
}
}
tasks.matching { it.name.contains("kapt") }.configureEach {
enabled = false
}
}
dependencies {
subprojects.forEach { subproject ->
subproject.afterEvaluate {
if (subproject.plugins.hasPlugin("org.jetbrains.kotlinx.kover")
&& (subproject.path.startsWith(":apps:flipcash")
|| subproject.path.startsWith(":services:flipcash")
|| subproject.path.startsWith(":services:opencode")
|| subproject.path.startsWith(":libs:")
|| subproject.path.startsWith(":ui:")
|| subproject.path.startsWith(":definitions:"))
) {
kover(subproject)
}
}
}
}
tasks.register("clean", Delete::class) {
delete(rootProject.layout.buildDirectory)
}
tasks.register("flipcashTestDebug") {
description = "Run testDebug for all Flipcash modules"
}
subprojects.filter {
it.path.startsWith(":apps:flipcash")
|| it.path == ":services:flipcash"
|| it.path == ":services:opencode"
}.forEach { sub ->
sub.afterEvaluate {
val taskName = when {
sub.plugins.hasPlugin("com.android.library") || sub.plugins.hasPlugin("com.android.application") -> "testDebugUnitTest"
sub.plugins.hasPlugin("org.jetbrains.kotlin.jvm") -> "test"
else -> null
}
if (taskName != null) {
rootProject.tasks.named("flipcashTestDebug").configure {
dependsOn(tasks.named(taskName))
}
}
}
}