forked from Kotlin/kotlin-wasm-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
39 lines (37 loc) · 1.5 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
plugins {
// this is necessary to avoid the plugins to be loaded multiple times
// in each subproject's classloader
kotlin("jvm") apply false
kotlin("multiplatform") apply false
kotlin("android") apply false
id("com.android.application") apply false
id("com.android.library") apply false
id("org.jetbrains.compose") apply false
}
allprojects {
repositories {
google()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
mavenLocal()
maven("https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental")
}
configurations.all {
val conf = this
// Currently it's necessary to make the android build work properly
conf.resolutionStrategy.eachDependency {
val isWasm = conf.name.contains("wasm", true)
val isJs = conf.name.contains("js", true)
val isComposeGroup = requested.module.group.startsWith("org.jetbrains.compose")
val isComposeCompiler = requested.module.group.startsWith("org.jetbrains.compose.compiler")
if (isComposeGroup && !isComposeCompiler && !isWasm && !isJs) {
val composeVersion = project.property("compose.version") as String
useVersion(composeVersion)
}
if (requested.module.name.startsWith("kotlin-stdlib")) {
val kotlinVersion = project.property("kotlin.version") as String
useVersion(kotlinVersion)
}
}
}
}