From 2e069535502085a71999df56c0be504ae39b6a03 Mon Sep 17 00:00:00 2001 From: Preventnetworkhacking Date: Fri, 27 Feb 2026 15:21:05 -0800 Subject: [PATCH] fix: Android CI blockers - trailing whitespace and Cargo.toml deps - Remove trailing whitespace in build.gradle.kts, SIZE.md, README.md - Add rt-multi-thread feature to tokio dependency - Add tracing-subscriber for logging support Part of Android Phase 3 integration work. --- clients/android-bridge/Cargo.toml | 3 ++- clients/android/README.md | 2 +- clients/android/SIZE.md | 2 +- clients/android/app/build.gradle.kts | 28 ++++++++++++++-------------- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/clients/android-bridge/Cargo.toml b/clients/android-bridge/Cargo.toml index ffa926b4e..5a39f3ce5 100644 --- a/clients/android-bridge/Cargo.toml +++ b/clients/android-bridge/Cargo.toml @@ -14,12 +14,13 @@ name = "zeroclaw_android" # zeroclaw = { path = "../.." } uniffi = { version = "0.27" } # Minimal tokio - only what we need -tokio = { version = "1", default-features = false, features = ["rt", "sync"] } +tokio = { version = "1", default-features = false, features = ["rt", "rt-multi-thread", "sync"] } anyhow = "1" serde = { version = "1", default-features = false, features = ["derive"] } serde_json = "1" # Minimal tracing for mobile tracing = { version = "0.1", default-features = false } +tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "env-filter"] } [[bin]] name = "uniffi-bindgen" diff --git a/clients/android/README.md b/clients/android/README.md index 6bd3f6621..e0ef82b3d 100644 --- a/clients/android/README.md +++ b/clients/android/README.md @@ -5,7 +5,7 @@ Native Android client for ZeroClaw - run your autonomous AI assistant on Android ## Features - 🚀 **Native Performance** - Kotlin/Jetpack Compose, not a webview -- 🔋 **Battery Efficient** - WorkManager, Doze-aware, minimal wake locks +- 🔋 **Battery Efficient** - WorkManager, Doze-aware, minimal wake locks - 🔐 **Security First** - Android Keystore for secrets, sandboxed execution - 🦀 **ZeroClaw Core** - Full Rust binary via UniFFI/JNI - 🎨 **Material You** - Dynamic theming, modern Android UX diff --git a/clients/android/SIZE.md b/clients/android/SIZE.md index 883b538fb..b45675a7a 100644 --- a/clients/android/SIZE.md +++ b/clients/android/SIZE.md @@ -15,7 +15,7 @@ ```toml [profile.release] opt-level = "z" # Optimize for size -lto = true # Link-time optimization +lto = true # Link-time optimization codegen-units = 1 # Better optimization panic = "abort" # No unwinding overhead strip = true # Remove symbols diff --git a/clients/android/app/build.gradle.kts b/clients/android/app/build.gradle.kts index 698ec1624..9873b3702 100644 --- a/clients/android/app/build.gradle.kts +++ b/clients/android/app/build.gradle.kts @@ -15,7 +15,7 @@ android { versionName = "0.1.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - + vectorDrawables { useSupportLibrary = true } @@ -43,7 +43,7 @@ android { applicationIdSuffix = ".debug" } } - + // Split APKs by ABI - users only download what they need splits { abi { @@ -77,15 +77,15 @@ android { excludes += "/META-INF/{AL2.0,LGPL2.1}" } } - + // Task to build native library before APK tasks.register("buildRustLibrary") { doLast { exec { workingDir = rootProject.projectDir.parentFile.parentFile // zeroclaw root - commandLine("cargo", "ndk", + commandLine("cargo", "ndk", "-t", "arm64-v8a", - "-t", "armeabi-v7a", + "-t", "armeabi-v7a", "-t", "x86_64", "-o", "clients/android/app/src/main/jniLibs", "build", "--release", "-p", "zeroclaw-android-bridge") @@ -100,7 +100,7 @@ dependencies { implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0") implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0") implementation("androidx.activity:activity-compose:1.8.2") - + // Compose - minimal set implementation(platform("androidx.compose:compose-bom:2024.02.00")) implementation("androidx.compose.ui:ui") @@ -108,32 +108,32 @@ dependencies { implementation("androidx.compose.material3:material3") // NOTE: Using material-icons-core (small) instead of extended (5MB+) // Add individual icons via drawable if needed - + // Navigation implementation("androidx.navigation:navigation-compose:2.7.7") - + // DataStore (preferences) implementation("androidx.datastore:datastore-preferences:1.0.0") - + // WorkManager (background tasks) implementation("androidx.work:work-runtime-ktx:2.9.0") - + // Security (Keystore) implementation("androidx.security:security-crypto:1.1.0-alpha06") - + // Coroutines implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") - + // NOTE: Serialization removed - not used yet, saves ~300KB // Add back when needed: implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2") - + // Testing testImplementation("junit:junit:4.13.2") androidTestImplementation("androidx.test.ext:junit:1.1.5") androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") androidTestImplementation(platform("androidx.compose:compose-bom:2024.02.00")) androidTestImplementation("androidx.compose.ui:ui-test-junit4") - + // Debug debugImplementation("androidx.compose.ui:ui-tooling") debugImplementation("androidx.compose.ui:ui-test-manifest")