4.0 KiB
4.0 KiB
Android Project Setup Summary
Project Configuration
Build System
- Gradle: 8.2 with Kotlin DSL
- Android Gradle Plugin: 8.2.0
- Kotlin: 1.9.20
SDK Configuration
- Minimum SDK: 24 (Android 7.0)
- Target SDK: 34 (Android 14)
- Compile SDK: 34
Dependencies Configured
Core Android
- androidx.core:core-ktx:1.12.0
- androidx.lifecycle:lifecycle-runtime-ktx:2.6.2
- androidx.activity:activity-compose:1.8.1
Jetpack Compose
- Compose BOM: 2023.10.01
- Material3
- UI components (ui, ui-graphics, ui-tooling-preview)
- Navigation Compose: 2.7.5
- ViewModel Compose: 2.6.2
- Runtime Compose: 2.6.2
Dependency Injection
- Hilt Android: 2.48
- Hilt Navigation Compose: 1.1.0
Coroutines
- kotlinx-coroutines-android: 1.7.3
- kotlinx-coroutines-core: 1.7.3
Computer Vision
- OpenCV: 4.8.0
Testing
- JUnit: 4.13.2
- Kotest (runner, assertions, property): 5.8.0
- MockK: 1.13.8
- Coroutines Test: 1.7.3
- AndroidX Test (JUnit, Espresso)
- Compose UI Test
Project Structure
PanoramaStitcher/
├── app/
│ ├── src/
│ │ ├── main/
│ │ │ ├── java/com/panorama/stitcher/
│ │ │ │ ├── data/ # Data layer (repositories)
│ │ │ │ ├── domain/ # Domain layer (use cases)
│ │ │ │ ├── presentation/ # Presentation layer (UI)
│ │ │ │ │ ├── theme/ # Compose theme
│ │ │ │ │ └── MainActivity.kt
│ │ │ │ └── PanoramaApplication.kt
│ │ │ ├── res/
│ │ │ │ ├── values/
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ ├── themes.xml
│ │ │ │ │ └── colors.xml
│ │ │ │ ├── mipmap-*/ # App icons
│ │ │ │ └── drawable/
│ │ │ └── AndroidManifest.xml
│ │ ├── test/ # Unit tests
│ │ └── androidTest/ # Instrumented tests
│ ├── build.gradle.kts
│ └── proguard-rules.pro
├── gradle/
│ └── wrapper/
│ └── gradle-wrapper.properties
├── build.gradle.kts
├── settings.gradle.kts
├── gradle.properties
├── gradlew
├── gradlew.bat
├── .gitignore
└── README.md
Key Features Configured
1. Clean Architecture Layers
- Presentation: UI components, ViewModels, Compose screens
- Domain: Business logic, use cases
- Data: Repositories, data sources, OpenCV integration
2. Hilt Dependency Injection
- Application class annotated with
@HiltAndroidApp - MainActivity annotated with
@AndroidEntryPoint - Ready for module configuration
3. Jetpack Compose UI
- Material3 theme configured
- Custom color scheme (Purple theme)
- Typography configuration
- MainActivity with Compose setup
4. Permissions
- READ_MEDIA_IMAGES (API 33+)
- READ_EXTERNAL_STORAGE (API 32-)
- WRITE_EXTERNAL_STORAGE (API 28-)
5. Testing Framework
- JUnit 5 for unit tests
- Kotest for property-based testing (100+ iterations per property)
- MockK for mocking
- Compose UI testing
- Instrumented tests with AndroidX Test
Next Steps
The project is now ready for implementation of:
- Core data models (Task 2)
- OpenCV initialization (Task 3)
- Feature detection (Task 4)
- Feature matching (Task 5)
- Image alignment (Task 6)
- Blending engine (Task 7)
- And subsequent tasks...
Build Commands
# Build the project
./gradlew build
# Run unit tests
./gradlew test
# Install debug APK
./gradlew installDebug
# Run instrumented tests (requires device/emulator)
./gradlew connectedAndroidTest
Notes
- The project uses Kotlin DSL for Gradle configuration
- OpenCV 4.8.0 is configured as a Maven dependency
- ProGuard rules include OpenCV and Hilt keep rules
- The project follows Material3 design guidelines
- Minimum SDK 24 ensures broad device compatibility while supporting modern APIs