-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
build.gradle.kts
62 lines (53 loc) · 1.75 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath(libs.com.android.tools.build)
classpath(libs.com.google.gms)
classpath(libs.com.google.firebase.gradle)
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath(libs.kotlin.gradlePlugin)
classpath(libs.kotlin.allopen)
classpath(libs.kotlin.serialization)
}
}
plugins {
alias(libs.plugins.klint)
alias(libs.plugins.moduleDependencyGraph)
alias(libs.plugins.ksp)
}
allprojects {
repositories {
google()
mavenCentral()
maven("https://maven.google.com")
maven("https://jitpack.io")
}
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn")
freeCompilerArgs.add("-opt-in=kotlin.ExperimentalUnsignedTypes")
freeCompilerArgs.add("-Xjvm-default=all") //Support @JvmDefault
jvmTarget.set(Versions.jvmTarget)
}
}
gradle.projectsEvaluated {
tasks.withType<JavaCompile> {
val compilerArgs = options.compilerArgs
compilerArgs.add("-Xlint:deprecation")
compilerArgs.add("-Xlint:unchecked")
}
}
apply(plugin = "org.jlleitschuh.gradle.ktlint")
apply(plugin = "jacoco")
}
// Setup all reports aggregation
apply(from = "jacoco_aggregation.gradle.kts")
tasks.register<Delete>("clean").configure {
delete(rootProject.layout.buildDirectory)
}