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-coreKtx version 1.15.0 provides Kotlin extensions for Android APIs
  • androidx-appcompat version 1.7.0 ensures backward compatibility
  • androidx-constraintlayout version 2.2.0 for complex view positioning
  • androidx-browser version 1.8.0 for embedded browser functionality
  • androidx-webkit version 1.12.1 for WebView support
  • androidx-media version 1.7.0 for media handling
  • androidx-legacySupport version 1.0.0 for legacy support libraries

Lifecycle Components

  • lifecycle-service, lifecycle-runtime, and lifecycle-viewmodel-compose all 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-runtime and compose-ui
  • compose-foundation and compose-foundation-layout
  • compose-material3 for Material Design 3 components
  • compose-runtime-livedata for LiveData integration
  • compose-ui-tooling for 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:

  • exoplayerCore for base playback functionality
  • exoplayerUI for player interface components
  • extensionMediasession for MediaSession integration and background control

REST API Communication

Networking relies on Retrofit with Kotlinx Serialization:

  • retrofit version 2.9.0 for the HTTP client
  • kotlinxSerialization version 1.4.1 for JSON parsing
  • kotlinxRetrofit version 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:

  • srlCore for base functionality
  • srlExtClassics, srlExtMaterial, srlExtDynamicRebound for different visual styles
  • srlExtHorizontal and srlExtTwoLevel for specialized behaviors
  • srlExtUtil for helper utilities

Common Utilities

  • apache-commons version 3.12.0 for general utilities
  • guava version 32.0.1-jre for Google's core libraries
  • commonsCompress version 1.24.0 for compression handling
  • viewbinding version 8.8.0 for view binding generation
  • workManager version 2.8.1 for background work scheduling
  • dataStore version 1.1.7 for persistent data storage

Testing Dependencies

  • junit:junit:4.13.2 for unit testing
  • androidx.test.ext:junit:1.1.5 for AndroidX test extensions
  • androidx.test.espresso:espresso-core:3.5.1 for 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 coordinates
  • app/build.gradle.kts – Module-level build script where dependencies are declared using the libs catalog
  • peacedesign/build.gradle – Separate module containing UI components, referenced as implementation(project(":peacedesign"))
  • settings.gradle.kts – Declares the project structure including :app and :peacedesign modules
  • gradle/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.toml to 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 :peacedesign module 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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →