Dependencies for the alfaazplus/quranapp Android Project: Complete Technical Guide
The alfaazplus/quranapp Android project manages all third-party libraries through a centralized Gradle version catalog in gradle/libs.versions.toml and declares them in app/build.gradle.kts, utilizing Jetpack Compose, ExoPlayer, Retrofit, and AndroidX libraries with core library desugaring enabled for API 23+ compatibility.
The alfaazplus/quranapp repository is an open-source Quran application built for Android using modern development practices. Understanding the dependencies for the alfaazplus/quranapp Android project is essential for contributors looking to extend functionality or troubleshoot build issues. The project employs a version catalog approach to maintain consistent library versions across the main app module and the :peacedesign UI component library.
Dependency Management Architecture
The project uses Gradle's version catalog feature to centralize dependency versions. All version numbers are defined in gradle/libs.versions.toml, while the actual declarations reside in app/build.gradle.kts【/cache/repos/github.com/alfaazplus/quranapp/master/app/build.gradle.kts#L85-L122】.
This approach ensures that updating a library version in one location propagates consistently throughout the build. The app module references libraries using the libs prefix, such as implementation(libs.androidx.coreKtx) or implementation(libs.exoplayerCore).
Core AndroidX and Lifecycle Dependencies
The foundation of the app relies on modern AndroidX libraries with specific version constraints.
AndroidX Core and Compatibility
androidx-coreKtxversion 1.15.0 provides Kotlin extensions for Android APIsandroidx-appcompatversion 1.7.0 ensures backward compatibilityandroidx-constraintlayoutversion 2.2.0 for complex view positioningandroidx-browserversion 1.8.0 for embedded browser functionalityandroidx-webkitversion 1.12.1 for WebView supportandroidx-mediaversion 1.7.0 for media handlingandroidx-legacySupportversion 1.0.0 for legacy support libraries
Lifecycle Components
lifecycle-service,lifecycle-runtime, andlifecycle-viewmodel-composeall use version 2.8.7- These provide lifecycle-aware components and ViewModel integration with Jetpack Compose
Jetpack Compose UI Stack
The app adopts a Compose-first architecture using the Bill of Materials (BOM) to synchronize component versions.
The project imports compose-bom version 2024.09.02 in app/build.gradle.kts, which automatically synchronizes compatible versions for all Compose libraries【/cache/repos/github.com/alfaazplus/quranapp/master/app/build.gradle.kts#L92-L100】. This includes:
compose-runtimeandcompose-uicompose-foundationandcompose-foundation-layoutcompose-material3for Material Design 3 componentscompose-runtime-livedatafor LiveData integrationcompose-ui-toolingfor development tools
Additionally, the project includes material version 1.12.0 for traditional Material Components where needed.
Media Playback and Networking
Audio Recitation with ExoPlayer
The project uses ExoPlayer version 2.19.1 for audio playback, specifically:
exoplayerCorefor base playback functionalityexoplayerUIfor player interface componentsextensionMediasessionfor MediaSession integration and background control
REST API Communication
Networking relies on Retrofit with Kotlinx Serialization:
retrofitversion 2.9.0 for the HTTP clientkotlinxSerializationversion 1.4.1 for JSON parsingkotlinxRetrofitversion 0.8.0 for the Retrofit converter integration
Utility Libraries and Desugaring
Pull-to-Refresh Functionality
The app incorporates SmoothRefreshLayout version 1.7.2.4 through multiple modules:
srlCorefor base functionalitysrlExtClassics,srlExtMaterial,srlExtDynamicReboundfor different visual stylessrlExtHorizontalandsrlExtTwoLevelfor specialized behaviorssrlExtUtilfor helper utilities
Common Utilities
apache-commonsversion 3.12.0 for general utilitiesguavaversion 32.0.1-jre for Google's core librariescommonsCompressversion 1.24.0 for compression handlingviewbindingversion 8.8.0 for view binding generationworkManagerversion 2.8.1 for background work schedulingdataStoreversion 1.1.7 for persistent data storage
Testing Dependencies
junit:junit:4.13.2for unit testingandroidx.test.ext:junit:1.1.5for AndroidX test extensionsandroidx.test.espresso:espresso-core:3.5.1for UI testing
Java Language Features
The build enables core library desugaring with version 2.1.4, allowing the application to use modern Java language APIs (such as streams and time APIs) on older Android devices running API level 23 and above. This is configured in app/build.gradle.kts with isCoreLibraryDesugaringEnabled = true.
Key Configuration Files
Understanding the build structure requires familiarity with these specific files:
gradle/libs.versions.toml– Central version catalog defining all library versions and coordinatesapp/build.gradle.kts– Module-level build script where dependencies are declared using thelibscatalogpeacedesign/build.gradle– Separate module containing UI components, referenced asimplementation(project(":peacedesign"))settings.gradle.kts– Declares the project structure including:appand:peacedesignmodulesgradle/wrapper/gradle-wrapper.properties– Specifies the Gradle distribution for build execution
Adding New Dependencies
To extend the project with additional libraries, modify both the version catalog and the module build file:
# In gradle/libs.versions.toml
[versions]
coil = "2.6.0"
[libraries]
coil-ktx = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
// In app/build.gradle.kts
dependencies {
implementation(libs.coil.ktx) // adds Coil image loading library
}
This pattern ensures version consistency and makes dependency updates manageable across the entire project.
Summary
- The alfaazplus/quranapp project uses a centralized version catalog in
gradle/libs.versions.tomlto manage dependency versions consistently across modules. - Jetpack Compose drives the UI using BOM version 2024.09.02, with Material 3 components and lifecycle-aware ViewModels.
- ExoPlayer 2.19.1 handles audio recitation playback with MediaSession integration for background control.
- Retrofit 2.9.0 with Kotlinx Serialization provides type-safe networking for remote Quran resources.
- Core library desugaring enables modern Java APIs on devices back to API level 23.
- The modular architecture separates UI components into the
:peacedesignmodule while the main app resides in:app.
Frequently Asked Questions
Where are the dependency versions defined in the QuranApp project?
All dependency versions are centralized in the gradle/libs.versions.toml file using Gradle's version catalog feature. This file maps aliases like androidx-coreKtx to specific coordinates and versions, which are then referenced in app/build.gradle.kts using the libs prefix (e.g., implementation(libs.androidx.coreKtx)).
How does the project manage Jetpack Compose versions?
The project uses a Bill of Materials (BOM) approach. It imports compose-bom version 2024.09.02 in app/build.gradle.kts, which automatically synchronizes compatible versions for all Compose libraries including compose-material3, compose-ui, and compose-runtime. This eliminates version conflicts between Compose components.
What audio playback library does QuranApp use for recitations?
The project uses ExoPlayer version 2.19.1 for audio playback. Specifically, it includes exoplayerCore for base functionality, exoplayerUI for interface components, and extensionMediasession for MediaSession integration, enabling proper background playback and media controls.
Why does the project enable core library desugaring?
Core library desugaring (version 2.1.4) allows the application to use modern Java language APIs (such as streams and time APIs) on older Android devices running API level 23 and above. This is configured in app/build.gradle.kts with isCoreLibraryDesugaringEnabled = true, ensuring broader device compatibility while using contemporary Java features.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →