-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
48 lines (43 loc) · 1.95 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
48 lines (43 loc) · 1.95 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
buildscript {
dependencies {
classpath(libs.android.shortcut.gradle)
}
}
plugins {
alias(androidx.plugins.application) apply false
alias(androidx.plugins.library) apply false
alias(androidx.plugins.test) apply false
alias(androidx.plugins.kmp.library) apply false
alias(kotlinx.plugins.compose.compiler) apply false
alias(kotlinx.plugins.serialization) apply false
alias(libs.plugins.aboutLibraries) apply false
alias(libs.plugins.aboutLibrariesAndroid) apply false
alias(libs.plugins.moko) apply false
alias(libs.plugins.sqldelight) apply false
// Required for Spotless 8.x multi-project shared task service (diffplug/spotless#2877).
alias(libs.plugins.spotless) apply false
}
// Dynamically loaded extension APKs are compiled against the kotlinx.coroutines classes that
// are bundled inside the app APK, so those classes are part of the app's public ABI. If any
// module or transitive dependency resolves a different coroutines version, extensions break at
// runtime with linkage errors such as
// `NoSuchMethodError: kotlinx.coroutines.BuildersKt.runBlockingK$default`.
// Pin the version declared in gradle/kotlinx.versions.toml for every project and configuration,
// so the bundled ABI cannot drift through dependency resolution.
val coroutinesVersion = kotlinx.coroutines.bom.get().version
?: error("kotlinx-coroutines-bom must declare an explicit version")
allprojects {
configurations.configureEach {
resolutionStrategy.eachDependency {
if (requested.group == "org.jetbrains.kotlinx" && requested.name.startsWith("kotlinx-coroutines")) {
useVersion(coroutinesVersion)
because("Extensions link against the coroutines ABI bundled in the app APK")
}
}
}
}
val buildLogic = gradle.includedBuild("build-logic")
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
dependsOn(buildLogic.task(":clean"))
}