This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
82 lines (74 loc) · 2.22 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.application) apply false
alias(libs.plugins.library) apply false
alias(libs.plugins.android) apply false
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.kotlin.qa)
alias(libs.plugins.taskTree)
jacoco
alias(libs.plugins.dokka)
}
subprojects {
apply(plugin = "org.danilopianini.gradle-kotlin-qa")
apply(plugin = "jacoco")
apply(plugin = "org.jetbrains.dokka")
configurations.all {
resolutionStrategy.eachDependency {
if (requested.group == "org.jetbrains.kotlin" && requested.name.startsWith("kotlin")) {
useVersion(org.jetbrains.kotlin.config.KotlinCompilerVersion.VERSION)
because(
"All Kotlin modules should use the same version, and " +
"compiler uses ${org.jetbrains.kotlin.config.KotlinCompilerVersion.VERSION}",
)
}
}
}
tasks {
withType<Test> {
useJUnitPlatform()
testLogging {
showCauses = true
showStackTraces = true
showStandardStreams = true
events(*org.gradle.api.tasks.testing.logging.TestLogEvent.values())
}
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
allWarningsAsErrors = true
freeCompilerArgs += listOf("-opt-in=kotlin.RequiresOptIn", "-Xinline-classes")
}
}
}
}
tasks.test {
finalizedBy(tasks.jacocoTestReport)
}
tasks.jacocoTestReport {
dependsOn(tasks.test)
reports {
xml.required.set(true)
}
}
tasks.dokkaHtmlMultiModule {
outputDirectory.set(buildDir.resolve("docs/partial"))
}
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath(libs.build.gradle)
classpath(libs.gradle.plugin)
classpath(libs.google.services)
classpath(libs.firebase.crashlytics.gradle)
classpath(libs.org.jacoco.core)
}
}
kotlin {
jvmToolchain(17)
}