This repository is an Android application that appears to be a Rick and Morty themed app built with modern Android tooling.
- Kotlin-based Android app (Compose UI).
- Uses Jetpack Compose, Navigation Compose, and Hilt for dependency injection.
- Project structure follows a single
appmodule layout.
- Kotlin
- Jetpack Compose
- Navigation Compose
- Hilt (Dagger) for DI
- Gradle (wrapper)
- Ktlint for code formatting
- Detekt for static analysis (configuration present in
config/detekt)
Requirements
- Android Studio (recommended) or command-line Gradle
- JDK 11+ (match the project's Gradle/JDK configuration)
- An Android device or emulator
Open in Android Studio (recommended)
- Open the project folder in Android Studio.
- Let Gradle sync and the IDE index the project.
- Run the
appconfiguration on a connected device or emulator.
Command-line build
- Build:
./gradlew build - Assemble debug APK:
./gradlew :app:assembleDebug - Install debug APK to a connected device:
./gradlew :app:installDebug
Static analysis
- Run detekt:
./gradlew detekt
app/— main Android app modulesrc/main/java/com/aliyuce/rickandmorty— application codeMainActivity.kt— app entrypoint and host for ComposeRMApp.kt— application class for Hilt setupdi/— Hilt dependency injection modulesdata/— data layer (repositories, data sources, models)domain/— domain layer (use cases, business logic)features/— Compose screensnavigation/— navigation host and navigation graphwork/— background workui/— Compose theme and common UI components
build.gradle.kts— module build configuration
Top-level Gradle files and wrappers are present for reproducible builds.
UI is built with Jetpack Compose. The app contains an episode list, an episode detail view (character ids), and a character detail screen with an Export action. Keep the visuals simple and accessible — the assessment focuses on functionality.
A short demo/asset video is included in the repository for reference:
- Path:
./rickAndMorty.mp4
Recommended tests: unit tests for ViewModels/use-cases (missing use-case tests) and Compose UI tests for screens. Typical commands:
# unit tests
./gradlew test
# instrumentation / UI tests (on device/emulator)
./gradlew :app:connectedAndroidTest- Start an emulator or connect an Android device.
- Build and install the debug APK:
./gradlew :app:assembleDebug
./gradlew :app:installDebug- Run connected instrumentation tests (UI tests):
./gradlew :app:connectedAndroidTest- Run unit tests locally without a device:
./gradlew test- Follow existing code style and architecture.
- Run
./gradlew buildand./gradlew detektbefore submitting changes. - Add tests for your new features and ensure existing tests pass.
- If Gradle sync fails, try
File -> Sync Project with Gradle Filesin Android Studio. - If build issues persist, run
./gradlew clean build --stacktraceto get more details.
This project is licensed under the Apache License 2.0 — see the LICENSE file for details.