Skip to content

Simple Android Project with Jetpack Compose, Hilt, and CircleCI Integration

License

Notifications You must be signed in to change notification settings

waffiqaziz/HiltTestActivity

Repository files navigation

HiltTestActivity

CircleCI codecov GitHub License

This repository contains a simple Android project demonstrating the use of Jetpack Compose for building UI, Hilt for dependency injection, and CircleCI for continuous integration and testing. The project focuses on instrumented testing (UI testing) using Jetpack Compose Test APIs.

🛠️ Tech Stack

  • Kotlin: 100% Kotlin codebase.
  • Jetpack Compose: For declarative UI development.
  • Hilt: For managing dependencies.
  • Jetpack Compose Test APIs: For UI and instrumented testing.
  • CircleCI: For CI/CD pipeline.

📁 Project Structure

├── app/                    # Main application module 
│ ├── src/main/             # Source files for the app 
│ ├── src/androidTest/      # Instrumentation (UI) tests 
├── .circleci/              # CircleCI configuration 
│ └── config.yml            # CircleCI pipeline setup 
└── build.gradle            # Project-level Gradle file

🖥️ Setup Instructions

  1. Clone the repository:

    git clone https://github.com/waffiqaziz/HiltTestActivity.git
  2. Open the project in Android Studio.

  3. Sync Gradle dependencies:

    Go to File > Sync Project with Gradle Files.

  4. Run the application:

    Select a device/emulator and click on Run ▶️. Run UI tests:

  5. Execute the instrumented tests with:

    ./gradlew connectedAndroidTest

🔗 CI/CD with CircleCI

This project includes a .circleci/config.yml file for automating builds and tests. To use CircleCI:

  1. Push the repository to GitHub or another supported VCS.
  2. Set up the project on CircleCI.
  3. Customize the config.yml file if needed.
  4. Monitor builds and test results on the CircleCI dashboard.

🤝 Contributing

Contributions are welcome! Please read this page.