Prerequisites
Required software
Install JDK 21
Nimaz requires Java Development Kit (JDK) 21.Download:
- Eclipse Temurin JDK 21 (recommended)
- Oracle JDK 21
Install Android Studio
Download and install Android Studio Ladybug or newer.During installation, ensure these components are selected:
- Android SDK
- Android SDK Platform
- Android Virtual Device (for testing)
Install Android SDK components
Open Android Studio and navigate to Settings → Appearance & Behavior → System Settings → Android SDK.Install:
- SDK Platforms: Android 15.0 (API 36) - required for compilation
- SDK Tools:
- Android SDK Build-Tools
- Android SDK Command-line Tools
- Android Emulator (optional, for testing)
The project compiles against API 36 (Android 15) and supports devices running API 29 (Android 10) and above.
Optional tools
- Git: For version control (download)
- Fastlane: For automated builds and deployment (requires Ruby)
Clone the repository
Project configuration
Build system overview
Nimaz uses Gradle with Kotlin DSL for build configuration:- Root build file:
build.gradle.kts- Defines plugins for all modules - App build file:
app/build.gradle.kts- Main application configuration - Settings:
settings.gradle.kts- Project structure and repositories - Properties:
gradle.properties- Build properties and JVM settings
Key build configuration
Major dependencies
- Jetpack Compose: Modern UI toolkit
- Hilt: Dependency injection
- Room: Local database
- WorkManager: Background tasks
- Adhan: Prayer time calculations
- CameraX: Qibla compass
- Media3 ExoPlayer: Audio playback
- Glance: App widgets
app/build.gradle.kts:63-141 for the complete dependency list.
Building the app
Using Android Studio
Wait for Gradle sync
Android Studio will automatically sync Gradle. This downloads all dependencies and may take several minutes on first run.
Select build variant
In the Build Variants panel (View → Tool Windows → Build Variants), you can select:
- debug: Development build with debugging enabled
- release: Production build with optimizations
Using Gradle command line
Debug build
Release build
To create a signed release build, you need:- A keystore file for signing
- Environment variables configured:
Build bundle (AAB)
For Google Play distribution:Common Gradle tasks
Installing on a device
Using Android Studio
- Connect your Android device via USB or start an emulator
- Enable USB debugging on your device (Settings → Developer Options)
- Click the Run button (or press Shift+F10)
- Select your device from the deployment target dialog
Using ADB
Troubleshooting
Gradle sync fails
Problem: Dependencies can’t be downloaded Solutions:Out of memory errors
Problem: Gradle runs out of memory during build Solution: Increase heap size ingradle.properties:
SDK version mismatch
Problem: “Failed to find target with hash string ‘android-36’” Solution: Install Android SDK Platform 36 via Android Studio SDK Manager.Build fails after git pull
Problem: Stale build cache after pulling changes Solution:KSP annotation processing fails
Problem: Hilt or Room compilation errors Solution:Nimaz uses KSP (Kotlin Symbol Processing) instead of kapt for faster annotation processing. Hilt and Room are processed with KSP.
Using Fastlane
Nimaz includes Fastlane configuration for automated builds:Setup
Available lanes
fastlane/Fastfile for complete lane definitions.
CI/CD
Nimaz uses GitHub Actions for continuous integration:- PR Checks (
.github/workflows/pr_checks.yml): Runs tests and lint on pull requests - Build and Release (
.github/workflows/build_and_release.yml): Creates release builds - Deploy (
.github/workflows/deploy.yml): Deploys to Play Store internal track
Next steps
Now that you can build Nimaz:- Learn about Testing to write and run tests
- Read Contributing guidelines to start contributing
- Explore the codebase and start making changes!