-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
68 lines (59 loc) · 2.07 KB
/
build.gradle.kts
File metadata and controls
68 lines (59 loc) · 2.07 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
import org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED
import org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED
import org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_OUT
import org.gradle.api.tasks.testing.logging.TestLogEvent.STARTED
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import extensions.applyDefaults
/* BUILD SCRIPT */
buildscript {
repositories {
google()
mavenCentral()
maven(url = "https://jitpack.io")
}
dependencies {
classpath(PluginsDeps.kotlin_serialization)
classpath(PluginsDeps.kotlin_gradle_plugin)
classpath(PluginsDeps.tool_build_gradle)
classpath(PluginsDeps.navigation_safe_args)
classpath(PluginsDeps.dagger_hilt_compiler)
classpath(PluginsDeps.ksp)
}
}
allprojects {
repositories.applyDefaults()
configurations.all {
resolutionStrategy {
force("androidx.lifecycle:lifecycle-viewmodel:2.5.1")
force("androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1")
}
}
}
subprojects {
tasks.withType<KotlinCompile>().all {
kotlinOptions.freeCompilerArgs += listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=kotlin.OptIn",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=kotlinx.coroutines.ObsoleteCoroutinesApi",
"-opt-in=kotlinx.coroutines.FlowPreview",
)
}
tasks.withType<Test> {
testLogging {
// set options for log level LIFECYCLE
events = setOf(FAILED, STARTED, PASSED, SKIPPED, STANDARD_OUT)
exceptionFormat = FULL
showExceptions = true
showCauses = true
showStackTraces = true
}
maxParallelForks =
(Runtime.getRuntime().availableProcessors() / 2).takeIf { it > 0 } ?: 1
}
}
tasks.register("clean", Delete::class) {
delete(rootProject.layout.buildDirectory)
}