-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
62 lines (53 loc) · 1.92 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
plugins {
id "st-base-conventions" apply false
}
def launchTask = getGradle()
.getStartParameter()
.getTaskRequests()
.toString()
.toLowerCase()
ext.isReleaseBuild = launchTask.contains("bundlerelease") || launchTask.contains("assemblerelease")
ext.isDebugBuild = !isReleaseBuild
subprojects {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = [
'-opt-in=kotlin.contracts.ExperimentalContracts',
'-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi',
]
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext.kotlinTest = { dependencies ->
dependencies.testImplementation libs.kluent
dependencies.testImplementation libs.kotlin.test
dependencies.testImplementation libs.mockk
dependencies.testImplementation libs.kotlin.coroutines.test
}
ext.kotlinFixtures = { dependencies ->
dependencies.testFixturesImplementation libs.mockk
dependencies.testFixturesImplementation libs.kluent
dependencies.testFixturesImplementation libs.kotlin.coroutines
}
ext.androidImportFixturesWorkaround = { project, fixtures ->
project.dependencies.testImplementation(project.dependencies.testFixtures(fixtures))
project.dependencies.testImplementation fixtures.files("build/libs/${fixtures.name}-test-fixtures.jar")
project.dependencies.testImplementation fixtures.files("build/libs/${fixtures.name}.jar")
}
ext.isFoss = {
return rootProject.hasProperty("foss")
}
ext.firebase = { dependencies, name ->
if (isFoss()) {
dependencies.implementation(project(":domains:firebase:$name-noop"))
} else {
dependencies.implementation(project(":domains:firebase:$name"))
}
}
if (launchTask.contains("codeCoverageReport".toLowerCase())) {
apply from: 'tools/coverage.gradle'
}