Files
openclaw/apps/android/wear-shared/build.gradle.kts
Peter Steinberger 0815f6a4f9 feat(android): add Wear proxy protocol (#108835)
* feat(android): add Wear proxy protocol

Introduce a bounded, versioned phone/watch RPC contract and wire its test, lint, and build gates before either runtime endpoint lands.

Co-authored-by: Sebastian Schubotz <git@sibbl.de>

* test(android): lock Wear wire names

Cover every supported RPC method and event discriminator so phone and watch cannot silently drift.

Co-authored-by: Sebastian Schubotz <git@sibbl.net>

* fix(android): bound Wear JSON depth

Reject excessively nested Data Layer envelopes before kotlinx.serialization can recurse through them.

* fix(android): enforce Wear depth on encode

Keep outbound messages inside the same JSON nesting contract enforced by the decoder.

* fix(android): preflight Wear payload depth

Traverse arbitrary JSON payloads iteratively before serialization so deeply nested local trees fail safely.

---------

Co-authored-by: Sebastian Schubotz <git@sibbl.de>
Co-authored-by: Sebastian Schubotz <git@sibbl.net>
2026-07-16 10:21:38 -07:00

45 lines
727 B
Kotlin

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.ktlint)
alias(libs.plugins.kotlin.serialization)
}
android {
namespace = "ai.openclaw.wear.shared"
compileSdk = 37
defaultConfig {
minSdk = 31
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
lint {
warningsAsErrors = true
}
}
kotlin {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
allWarningsAsErrors.set(true)
}
}
ktlint {
android.set(true)
ignoreFailures.set(false)
filter {
exclude("**/build/**")
}
}
dependencies {
api(libs.kotlinx.serialization.json)
testImplementation(libs.junit)
}