forked from GuilhE/KMP-ComposeUIViewController
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
52 lines (45 loc) · 1.6 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
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.ksp)
id("org.jetbrains.compose") version "1.5.10-rc02"
}
compose {
kotlinCompilerPlugin.set("1.5.3-rc01")
}
kotlin {
jvm()
val iosX64 = iosX64()
val iosArm64 = iosArm64()
val iosSimulatorArm64 = iosSimulatorArm64()
applyDefaultHierarchyTemplate()
sourceSets {
val commonMain by getting {
dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material3)
implementation(compose.ui)
}
}
val jvmMain by getting {
dependencies {
implementation(compose.preview)
}
}
val iosMain by getting {
dependencies {
implementation(libs.composeuiviewcontroller.annotations)
}
}
listOf(iosX64, iosArm64, iosSimulatorArm64).forEach { target ->
target.binaries.framework { baseName = "SharedComposables" }
val targetName = target.name.replaceFirstChar { it.uppercaseChar() }
dependencies.add("ksp$targetName", libs.composeuiviewcontroller.ksp)
// all {
// //https://kotlinlang.org/docs/ksp-quickstart.html#make-ide-aware-of-generated-code
// kotlin.srcDir("build/generated/ksp/${target.targetName}/${target.targetName}Main/kotlin")
// }
}
}
}
tasks.matching { it.name == "embedAndSignAppleFrameworkForXcode" }.configureEach { finalizedBy(":addFilesToXcodeproj") }