-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
88 lines (78 loc) · 2.66 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
88 lines (78 loc) · 2.66 KB
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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidApplication)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
}
kotlin {
androidTarget {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}
listOf(
iosArm64(),
iosSimulatorArm64(),
).forEach { iosTarget ->
iosTarget.binaries.framework {
baseName = "ComposeApp"
isStatic = true
}
}
sourceSets {
commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material3)
implementation(compose.ui)
implementation(libs.ktor.client.core)
// Demo traffic is served by MockEngine so the sample works offline
// and mirrors the design's deterministic IoT data.
implementation(libs.ktor.client.mock)
// KMP no-op swap pattern: `-Psharingan.noop` builds the sample
// against the no-op artifact, proving API parity and zero UI payload.
if (providers.gradleProperty("sharingan.noop").isPresent) {
implementation(project(":sharingan-noop"))
} else {
implementation(project(":sharingan"))
}
}
androidMain.dependencies {
implementation(libs.androidx.activity.compose)
}
// Capture-notification E2E (needs the real app + zero-setup init):
// ./gradlew :sample:composeApp:connectedDebugAndroidTest
androidInstrumentedTest.dependencies {
implementation(libs.junit)
implementation(libs.androidx.test.runner)
implementation(libs.androidx.test.rules)
implementation(libs.androidx.test.ext.junit)
}
}
}
android {
namespace = "dev.sharingan.sample"
compileSdk = libs.versions.android.compileSdk.get().toInt()
defaultConfig {
applicationId = "dev.sharingan.sample"
minSdk = libs.versions.android.minSdk.get().toInt()
targetSdk = libs.versions.android.targetSdk.get().toInt()
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
buildTypes {
release {
isMinifyEnabled = false
}
}
lint {
// AGP 8.13's bundled lint can't read Kotlin 2.4 metadata yet.
checkReleaseBuilds = false
}
}