Ships v0.5.0 via kmp-manager 6-phase flow. 13 plan tasks (D1, T1-T10, D3, D4), 14 agent calls, 6 P-groups. 107 → 207 tests on iosSimulatorArm64. Toolchain (D1): - Kotlin 2.1.0 → 2.3.21 - Compose-Multiplatform 1.8.0 → 1.11.0 - Android Gradle Plugin 8.7.3 → 9.2.0 - Gradle 8.11.1 → 9.5.1 - coroutines 1.9.0 → 1.11.0, kotlin-test → 2.3.21 - Drop kotlinx-datetime; use stdlib kotlin.time.Clock - Drop iosX64 target (Compose-MP 1.11.0 has no ios_x64 variant) Architecture (T1-T6, T10): - TieredBuffer.snapshotWindow: bisect-based windowed snapshot - New lod/ package: LodStrategy interface + MinMax/Lttb/MinMaxLttb impls (MinMaxLttb SOTA per arXiv 2305.00332, 1.80× faster than pure LTTB) - New render/SignalRenderer: public interface + LineSignalRenderer object - New render/AxisFormatter: 4 default impls (Time, Decimal, DateTime, Unit) - HARD BREAK: deleted LodMode, LodDecimator, ChartConfig.targetFps - ChartConfig split: DataConfig + AxisConfig + RenderConfig + FrameRate sealed - @Immutable/@Stable on all public types (0 unstable) - RealtimeChartState.clear() API Interaction layer (T7): - New interaction/ package - ChartInteractionState + rememberChartInteractionState() - ViewportMode sealed: Following / Frozen / History(anchorMs) - Pinch zoom + drag pan + tap crosshair gestures - Swipe-to-edge resumes Following - InverseProjection: pixel → ms + bisect nearest-sample Perf finishing (T8, T9, D3): - LineSignalRenderer Stroke cache, AxisRenderer TextStyle cache - resolveYRange Pair<Float,Float> → FloatArray out-param - RealtimeChartState.signalsArray cached (invalidated on add/remove only) - LTTB upper-bound aligned to half-open [start, start+windowMs) semantic Correctness (D4): - NumberFormat.formatFixed Long overflow guard @ |v|≥1e19 ABI baseline regenerated: - chart-realtime.api: 161 → 428 LOC - chart-realtime.klib.api: 211 → 501 LOC Modules touched: chart-realtime (lib), app (consumer), gradle (toolchain), .paul (state). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
99 lines
2.6 KiB
Kotlin
99 lines
2.6 KiB
Kotlin
import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
alias(libs.plugins.android.library)
|
|
alias(libs.plugins.compose.multiplatform)
|
|
alias(libs.plugins.compose.compiler)
|
|
`maven-publish`
|
|
}
|
|
|
|
group = "dev.dtrentin"
|
|
version = "0.5.0-SNAPSHOT"
|
|
|
|
composeCompiler {
|
|
reportsDestination = layout.buildDirectory.dir("compose_compiler_reports")
|
|
metricsDestination = layout.buildDirectory.dir("compose_compiler_metrics")
|
|
}
|
|
|
|
kotlin {
|
|
applyDefaultHierarchyTemplate()
|
|
explicitApi()
|
|
|
|
androidTarget {
|
|
compilations.all {
|
|
compileTaskProvider.configure {
|
|
compilerOptions {
|
|
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
|
|
}
|
|
}
|
|
}
|
|
publishLibraryVariants("release")
|
|
}
|
|
|
|
val xcf = XCFramework("ChartRealtime")
|
|
listOf(
|
|
iosArm64(),
|
|
iosSimulatorArm64()
|
|
).forEach { target ->
|
|
target.binaries.framework {
|
|
baseName = "ChartRealtime"
|
|
xcf.add(this)
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
commonMain.dependencies {
|
|
implementation(compose.runtime)
|
|
implementation(compose.ui)
|
|
implementation(compose.foundation)
|
|
implementation(compose.material3)
|
|
implementation(libs.coroutines.core)
|
|
}
|
|
androidMain.dependencies {
|
|
implementation(libs.androidx.core)
|
|
}
|
|
commonTest.dependencies {
|
|
implementation(libs.kotlin.test)
|
|
}
|
|
}
|
|
}
|
|
|
|
android {
|
|
namespace = "dev.dtrentin.chart"
|
|
compileSdk = 35
|
|
|
|
defaultConfig {
|
|
minSdk = 26
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
// KMP plugin auto-creates per-target publications.
|
|
// Run: ./gradlew publishToMavenLocal
|
|
publications.withType<MavenPublication>().configureEach {
|
|
pom {
|
|
name.set("chart-realtime")
|
|
description.set("KMP real-time line chart for high-frequency sensor data (200Hz+ multi-signal, bounded memory).")
|
|
url.set("https://github.com/davide-trentin/KMPCharts")
|
|
licenses {
|
|
license {
|
|
name.set("MIT License")
|
|
url.set("https://opensource.org/licenses/MIT")
|
|
distribution.set("repo")
|
|
}
|
|
}
|
|
developers {
|
|
developer {
|
|
id.set("dtrentin")
|
|
name.set("Davide Trentin")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|