blob: 1dcf4dbb02ed63ed4069236b681a00c135dd2f38 (
plain) (
blame)
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
|
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.android.kmp.library)
}
kotlin {
jvmToolchain(21)
jvm()
androidLibrary {
namespace = "coffee.liz.rookery.core"
compileSdk = 37
minSdk = 26
}
sourceSets {
commonMain.dependencies {
implementation(libs.coroutines.core)
api(libs.serialization.json)
implementation(libs.kable) // Bluetooth LE on desktop (macOS, Windows, Linux) and Android
}
commonTest.dependencies {
implementation(kotlin("test"))
implementation(libs.coroutines.test)
}
// Plain-JVM code that desktop and Android share: files, tnoodle, AES.
val jvmShared by creating {
dependsOn(commonMain.get())
dependencies {
implementation(libs.tnoodle.scrambles)
implementation(libs.tnoodle.min2phase) // two-phase solver, for smart-cube scramble corrections
}
}
jvmMain {
dependsOn(jvmShared)
dependencies {
// BlueZ over D-Bus: Linux desktop only
implementation(libs.dbus.java.core)
implementation(libs.dbus.java.transport.native)
}
}
androidMain { dependsOn(jvmShared) }
}
}
// Same heap cap as the desktop app, so tests catch scramblers that outgrow it.
tasks.withType<Test>().configureEach { maxHeapSize = "256m" }
|