wear-widgets
Installation
SKILL.md
Wear OS widgets use androidx.glance.wear (GlanceWearWidget and
GlanceWearWidgetService) with androidx.compose.remote (Remote Compose).
They serialize declarative UI and state documents to the watch host process.
Prerequisites and setup
- Resolve library versions : Resolve the latest versions for
{GLANCE_WEAR_VERSION}(androidx.glance.wear),{COMPOSE_REMOTE_VERSION}(androidx.compose.remote), and{WEAR_COMPOSE_REMOTE_VERSION}(androidx.wear.compose.remote). Include-alpha,-beta, or-rcreleases when no stable version exists yet. Don't run./gradlew dependenciesto resolve versions:- Use an available dependency lookup tool if present.
- Otherwise, fetch the latest version from Google Maven metadata (Glance Wear metadata, Compose Remote metadata, Wear Compose Remote metadata).
- SDK and Compose compiler requirements : Ask permission before modifying repo-wide Gradle files unless the user requested widget creation, tile migration, or dependency setup. Set
compileSdk = 37or higher and enablebuildFeatures { compose = true }. Keep the project's existing Android and Kotlin Gradle plugin declarations intact.