-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
207 lines (188 loc) · 6.23 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
plugins {
alias(libs.plugins.org.jetbrains.kotlin.multiplatform)
alias(libs.plugins.org.jetbrains.compose)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.org.jetbrains.kotlin.plugin.serialization)
alias(libs.plugins.com.android.application)
}
version = "1.0-SNAPSHOT"
kotlin {
androidTarget()
jvm("desktop")
js(IR) {
browser()
binaries.executable()
}
macosX64 {
binaries {
executable {
entryPoint = "main"
freeCompilerArgs += listOf(
"-linker-option", "-framework", "-linker-option", "Metal"
)
}
}
}
macosArm64 {
binaries {
executable {
entryPoint = "main"
freeCompilerArgs += listOf(
"-linker-option", "-framework", "-linker-option", "Metal"
)
}
}
}
iosX64("uikitX64") {
binaries {
executable {
entryPoint = "main"
freeCompilerArgs += listOf(
"-linker-option", "-framework", "-linker-option", "Metal",
"-linker-option", "-framework", "-linker-option", "CoreText",
"-linker-option", "-framework", "-linker-option", "CoreGraphics"
)
}
}
}
iosArm64("uikitArm64") {
binaries {
executable {
entryPoint = "main"
freeCompilerArgs += listOf(
"-linker-option", "-framework", "-linker-option", "Metal",
"-linker-option", "-framework", "-linker-option", "CoreText",
"-linker-option", "-framework", "-linker-option", "CoreGraphics"
)
}
}
}
sourceSets {
val commonMain by getting {
dependencies {
implementation(project(":client"))
implementation(project(":secret-std-msgs"))
implementation(compose.ui)
implementation(compose.foundation)
implementation(compose.material3)
implementation(compose.runtime)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.serialization.json)
implementation(libs.kotlinx.datetime)
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val androidMain by getting {
dependsOn(commonMain)
kotlin.srcDirs("src/jvmMain/kotlin")
dependencies {
implementation(libs.androidx.appcompat)
implementation(libs.androidx.activity.compose)
}
}
val desktopMain by getting {
dependencies {
implementation(compose.desktop.currentOs)
}
}
val jsMain by getting {
dependsOn(commonMain)
dependencies {
implementation(npm("@metamask/detect-provider", "^1.2.0"))
implementation(npm("web3", "^1.7.0"))
implementation(npm("@walletconnect/web3-provider", "^1.8.0"))
implementation(npm("@walletconnect/client", "^1.8.0"))
implementation(npm("@keplr-wallet/wc-client", "^0.11.63"))
implementation(npm("@keplr-wallet/wc-qrcode-modal", "^0.11.63"))
implementation(npm("@cosmostation/wc-modal", "^0.0.5"))
implementation(npm("@babel/core", "^7.18.13"))
implementation(npm("events", "^3.3.0"))
implementation(npm("assert", "^2.0.0"))
implementation(npm("stream-http", "^3.2.0"))
implementation(npm("https-browserify", "^1.0.0"))
implementation(npm("vm-browserify", "^1.1.2"))
implementation(npm("url", "^0.11.0"))
}
}
val nativeMain by creating {
dependsOn(commonMain)
}
val macosMain by creating {
dependsOn(nativeMain)
}
val macosX64Main by getting {
dependsOn(macosMain)
}
val macosArm64Main by getting {
dependsOn(macosMain)
}
val uikitMain by creating {
dependsOn(nativeMain)
}
val uikitX64Main by getting {
dependsOn(uikitMain)
}
val uikitArm64Main by getting {
dependsOn(uikitMain)
}
}
}
compose.desktop {
application {
mainClass = "Main_desktopKt"
}
}
compose.experimental {
web.application {}
// uikit.application {
// bundleIdPrefix = "io.eqoty.secretk"
// projectName = "secretk sample"
// deployConfigurations {
// simulator("IPhone8") {
// //Usage: ./gradlew iosDeployIPhone8Debug
// device = IOSDevices.IPHONE_8
// }
// simulator("IPad") {
// //Usage: ./gradlew iosDeployIPadDebug
// device = IOSDevices.IPAD_MINI_6th_Gen
// }
// connectedDevice("Device") {
// //First need specify your teamId here, or in local.properties (compose.ios.teamId=***)
// //teamId="***"
// //Usage: ./gradlew iosDeployDeviceRelease
// }
// }
// }
}
compose.desktop.nativeApplication {
targets(kotlin.targets.getByName("macosArm64"))
distributions {
targetFormats(TargetFormat.Dmg)
packageName = "secretk sample"
packageVersion = "1.0.0"
}
}
//compose {
// // workaround to use kotlin 1.8.22
// // https://github.com/JetBrains/compose-jb/blob/master/VERSIONING.md#using-jetpack-compose-compiler
// kotlinCompilerPlugin.set("androidx.compose.compiler:compiler:1.4.8")
//}
android {
compileSdk = 34
defaultConfig {
minSdk = 24
targetSdk = 34
}
sourceSets {
named("main") {
manifest.srcFile("src/androidMain/AndroidManifest.xml")
res.srcDirs("src/androidMain/res", "src/commonMain/resources")
}
}
namespace = "io.eqoty.secretk.sample"
}