android-espresso-dependencies_skill

This skill adds Espresso and AndroidX Test dependencies to your Android project and guides optional test runner configuration.
  • Shell

1

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill hitoshura25/claude-devtools --skill android-espresso-dependencies

  • SKILL.md3.2 KB

Overview

This skill adds Espresso and AndroidX Test dependencies and optional test orchestrator configuration to an Android Gradle project using Kotlin DSL. It ensures required test libraries are present, avoids duplicate entries, and verifies installation via Gradle dependency checks. The skill targets projects with minSdk 21+ and Kotlin-based build.gradle.kts files.

How this skill works

The skill inspects app/build.gradle.kts for existing androidTest dependencies and injects Espresso and AndroidX Test artifacts only if they aren’t already present. It can also modify defaultConfig and testOptions to set the AndroidJUnitRunner and enable the AndroidX Test Orchestrator, and it adds androidTestUtil for the orchestrator when requested. After changes it runs Gradle dependency queries to confirm the libraries are visible on the androidTest runtime classpath.

When to use it

  • You want to add end-to-end UI testing support with Espresso.
  • Setting up CI or local test runs that require AndroidX Test runner and rules.
  • Migrating or upgrading test dependencies to current stable Espresso and AndroidX Test versions.
  • Enabling test isolation via AndroidX Test Orchestrator for flaky or large test suites.

Best practices

  • Run this on projects using Kotlin DSL (build.gradle.kts) and with minSdkVersion >= 21.
  • Detect existing androidTest dependencies first to avoid duplicates or version conflicts.
  • Pin AndroidX Test and Espresso versions consistently across modules to prevent resolution issues.
  • Consider enabling the orchestrator only for larger suites; it adds apk-level isolation and requires androidTestUtil.
  • After modification, run the provided Gradle verification commands to ensure dependencies are resolved.

Example use cases

  • Add espresso-core, espresso-contrib, espresso-intents and AndroidX Test libs to a new app module.
  • Enable AndroidJUnitRunner and orchestrator for CI to reduce cross-test interference.
  • Audit a legacy app’s test deps and upgrade to the stable Espresso 3.5.1 and AndroidX Test 1.5.x versions.
  • Automate dependency injection in a monorepo script that updates multiple app modules.

FAQ

This skill is designed for Kotlin DSL (build.gradle.kts). For Groovy builds you can apply the same dependency coordinates manually or convert the script to Kotlin DSL first.

Gradle dependency resolution failed after adding, what should I check?

Check for conflicting androidx.test or espresso versions across modules and align them. Also confirm minSdk >= 21 and that the dependency was added to the app module, then rerun ./gradlew dependencies --configuration androidTestRuntimeClasspath.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
android-espresso-dependencies skill by hitoshura25/claude-devtools | VeilStrat