-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathbuild.gradle.kts
98 lines (91 loc) · 2.88 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
import org.jetbrains.compose.compose
plugins {
kotlin("multiplatform")
id("org.jetbrains.compose")
id("com.android.library")
}
group = "com.example"
version = "1.0-SNAPSHOT"
kotlin {
android()
jvm("desktop") {
compilations.all {
kotlinOptions.jvmTarget = "11"
}
}
wasm {
browser()
}
sourceSets {
val commonMain by getting {
dependencies {
api(compose.runtime)
api(compose.foundation)
api(compose.material)
}
}
val nonAndroidMain by creating {
dependsOn(commonMain)
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val androidMain by getting {
dependencies {
api("androidx.appcompat:appcompat:1.5.1")
api("androidx.core:core-ktx:1.9.0")
implementation(libs.coil.kt.compose)
implementation(libs.androidx.navigation.compose)
// implementation(libs.androidx.compose.material.iconsExtended)
// implementation(libs.androidx.compose.ui.tooling.preview)
// implementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.compose.ui.util)
implementation(libs.androidx.lifecycle.viewModelCompose)
implementation(libs.androidx.constraintlayout.compose)
implementation(libs.kotlinx.coroutines.android)
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.lifecycle.viewModelCompose)
implementation(libs.androidx.lifecycle.runtime.compose)
}
}
val androidUnitTest by getting {
dependencies {
implementation("junit:junit:4.13.2")
}
}
val desktopMain by getting {
dependsOn(nonAndroidMain)
dependencies {
api(compose.preview)
}
}
val desktopTest by getting
val wasmJsMain by getting {
dependsOn(nonAndroidMain)
}
}
}
compose.experimental {
web.application {}
}
android {
compileSdk = 34
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
defaultConfig {
minSdk = 24
targetSdk = 33
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
compose {
val composeVersion = project.property("compose.version") as String
kotlinCompilerPlugin.set(composeVersion)
val kotlinVersion = project.property("kotlin.version") as String
kotlinCompilerPluginArgs.add("suppressKotlinVersionCompatibilityCheck=$kotlinVersion")
}