-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
58 lines (50 loc) · 1.79 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
dependencies {
classpath(libs.sqldelight.gradle)
classpath(libs.google.gmsGoogleServices)
classpath(libs.google.crashlyticsGradle)
classpath(libs.google.appDistribution)
//android & kotlin gradle plugins in buildSrc/build.gradle.kts
}
}
plugins {
alias(kotlinx.plugins.serialization) apply false
}
subprojects {
tasks.withType(KotlinCompile::class.java).configureEach {
kotlinOptions {
freeCompilerArgs += arrayOf(
// Enable experimental coroutines APIs, including Flow, context receivers
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=kotlinx.coroutines.FlowPreview",
"-opt-in=kotlin.Experimental",
"-Xcontext-receivers",
)
// Set JVM target to 1.11
jvmTarget = JavaVersion.VERSION_11.toString()
}
}
configurations.configureEach {
// We forcefully exclude AppCompat + MDC from any transitive dependencies.
// This is a Compose app, so there's no need for these.
exclude(group = "androidx.appcompat")
exclude(group = "com.google.android.material", module = "material")
resolutionStrategy.eachDependency {
if (requested.group == "org.jetbrains.kotlinx"
&& requested.module.name == "kotlinx-collections-immutable-jvm"
) {
// kotlinx-collections-immutable-jvm 0.3.4+ is available on Maven Central
useVersion("0.3.4")
}
}
}
}
tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}