android-espresso-dependencies

Add Espresso and AndroidX Test dependencies to Android project

16 stars

Best use case

android-espresso-dependencies is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Add Espresso and AndroidX Test dependencies to Android project

Teams using android-espresso-dependencies should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/android-espresso-dependencies/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/devops/android-espresso-dependencies/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/android-espresso-dependencies/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How android-espresso-dependencies Compares

Feature / Agentandroid-espresso-dependenciesStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Add Espresso and AndroidX Test dependencies to Android project

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Android Espresso Dependencies

Adds Espresso and AndroidX Test dependencies required for E2E UI testing.

## Prerequisites

- Android project with Gradle
- Kotlin DSL (build.gradle.kts)
- Minimum SDK 21+ (Espresso requirement)

## Inputs

| Input | Required | Default | Description |
|-------|----------|---------|-------------|
| project_path | Yes | . | Android project root |

## Process

### Step 1: Add Espresso Dependencies

Add to `app/build.gradle.kts`:

```kotlin
dependencies {
    // Existing dependencies...

    // Espresso core
    androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
    androidTestImplementation("androidx.test.espresso:espresso-contrib:3.5.1")
    androidTestImplementation("androidx.test.espresso:espresso-intents:3.5.1")

    // AndroidX Test
    androidTestImplementation("androidx.test:runner:1.5.2")
    androidTestImplementation("androidx.test:rules:1.5.0")
    androidTestImplementation("androidx.test.ext:junit:1.1.5")
    androidTestImplementation("androidx.test.ext:junit-ktx:1.1.5")
}
```

**Detection logic:**
- Check if dependencies already exist (don't duplicate)
- Use latest stable versions
- Keep existing test dependencies

### Step 2: Configure Test Runner (Optional)

If user wants test orchestrator for better isolation:

```kotlin
android {
    // ... existing config ...

    defaultConfig {
        // ... existing config ...
        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    }

    testOptions {
        execution = "ANDROIDX_TEST_ORCHESTRATOR"
        animationsDisabled = true
    }
}

dependencies {
    // ... existing dependencies ...
    androidTestUtil("androidx.test:orchestrator:1.4.2")
}
```

**Ask user:** "Enable test orchestrator for better test isolation? (Recommended for large test suites)"

## Verification

**MANDATORY:** Run these commands:

```bash
# Sync Gradle
./gradlew dependencies --configuration androidTestRuntimeClasspath

# Verify Espresso dependencies
./gradlew dependencies | grep espresso && echo "✓ Espresso dependencies added"

# Verify AndroidX Test dependencies
./gradlew dependencies | grep "androidx.test" && echo "✓ AndroidX Test dependencies added"
```

**Expected output:**
- ✓ Espresso dependencies added
- ✓ AndroidX Test dependencies added

## Outputs

| Output | Location | Description |
|--------|----------|-------------|
| Dependencies | app/build.gradle.kts | Espresso and AndroidX Test libs |

## Troubleshooting

### "Dependency resolution failed"
**Cause:** Version conflict with existing dependencies
**Fix:** Check for conflicting androidx.test versions, align all to same version

### "Minimum SDK too low"
**Cause:** minSdk < 21
**Fix:** Espresso requires API 21+, update minSdk in defaultConfig

## Completion Criteria

- [ ] Espresso dependencies in app/build.gradle.kts
- [ ] AndroidX Test dependencies in app/build.gradle.kts
- [ ] Test runner configured
- [ ] `./gradlew dependencies` shows espresso libraries

Related Skills

android-screen-capture

16
from diegosouzapw/awesome-omni-skill

Start Android screen mirroring using scrcpy. Displays device screen in real-time on Mac with optional console logs. Use when viewing Android screen, mirroring device, or monitoring app with logs.

android-playstore-setup

16
from diegosouzapw/awesome-omni-skill

Complete Play Store setup - orchestrates scanning, privacy policy, version management, Fastlane, and workflows (Internal track only)

android-playstore-pipeline

16
from diegosouzapw/awesome-omni-skill

Complete end-to-end Android Play Store deployment pipeline setup in one command

android-fastlane-setup

16
from diegosouzapw/awesome-omni-skill

Setup Fastlane for Play Store deployment with supply and screengrab

android-deploy-usb

16
from diegosouzapw/awesome-omni-skill

Build and deploy Android app to connected device via USB. Fast deployment (~2-5 seconds) using Gradle and ADB. Use when deploying, installing, or building Android apps to physical devices.

android-ci-tests

16
from diegosouzapw/awesome-omni-skill

Setup GitHub Actions workflow for running Android tests in CI

security-scan-dependencies

16
from diegosouzapw/awesome-omni-skill

Scan a deployed website for outdated dependencies, known CVEs, and security misconfigurations.

libraries-dependencies-mastery

16
from diegosouzapw/awesome-omni-skill

Complete mastery of essential modern web development libraries and dependencies. Cover Next.js, React, TypeScript, Tailwind CSS, Firebase, Zustand, redux-toolkit, react-hook-form, Zod, shadcn/ui, lucide-react, Stripe, and more. Learn setup, integration patterns, advanced usage, performance optimization, troubleshooting, common pitfalls, and version management. Includes quick reference guides, in-depth tutorials, complete examples for e-commerce and SaaS, configuration files, type definitions, error handling, and production patterns. Master how libraries work together and solve real-world challenges.

android

16
from diegosouzapw/awesome-omni-skill

Build, review, and refactor Android mobile apps (Kotlin) using modern Android patterns. Use for tasks like setting up Gradle modules, Jetpack Compose UI, navigation, ViewModel/state management, networking (Retrofit/OkHttp), persistence (Room/DataStore), DI (Hilt/Koin), testing, performance, release builds, and Play Store readiness.

android-watch-logs

16
from diegosouzapw/awesome-omni-skill

Start real-time log streaming from connected Android device using adb logcat. Shows only app's log messages. Use when monitoring app behavior, debugging, or viewing Android logs.

android-use

16
from diegosouzapw/awesome-omni-skill

Control Android devices via ADB commands - tap, swipe, type, navigate apps

android-supabase

16
from diegosouzapw/awesome-omni-skill

Supabase integration patterns for Android - authentication, database, realtime subscriptions. Use when setting up Supabase SDK, implementing OAuth, querying database, or setting up realtime.