# Build System Used for alfaazplus/quranapp: Gradle with Kotlin DSL Explained

> Discover how alfaazplus/quranapp uses Gradle with Kotlin DSL for efficient builds. Learn about Android Gradle Plugin, version catalogs, and the Gradle wrapper for reproducible builds.

- Repository: [AlfaazPlus/quranapp](https://github.com/alfaazplus/quranapp)
- Tags: internals
- Published: 2026-02-24

---

**The alfaazplus/quranapp project uses Gradle with the Kotlin DSL as its build system, leveraging the Android Gradle Plugin, version catalogs for dependency management, and the Gradle wrapper for reproducible builds.**

The **build system used for alfaazplus/quranapp** is a modern Android-focused toolchain designed for scalability and maintainability. This open-source Quran application employs Gradle's Kotlin DSL (Domain Specific Language) rather than the traditional Groovy syntax, providing type-safe build configuration and superior IDE support. The setup includes multi-module architecture support, centralized dependency versioning, and automated build workflows suitable for both debug development and release distribution.

## Overview of the Gradle Build System in QuranApp

The project utilizes **Gradle** with **Kotlin DSL** (`*.gradle.kts` files) as its primary build automation tool. This configuration provides compile-time checking and autocomplete capabilities that Groovy-based builds lack.

Key components include:

- **Android Gradle Plugin** – Handles APK/AAB packaging, resource merging, and signing configurations
- **Kotlin Android Plugin** – Manages Kotlin compilation and language features
- **Gradle Version Catalog** – Centralizes dependency versions in [`libs.versions.toml`](https://github.com/alfaazplus/quranapp/blob/main/libs.versions.toml)
- **Gradle Wrapper** – Ensures consistent Gradle versions across development environments via `gradlew` scripts

## Key Build Configuration Files

### Root Project Configuration (`build.gradle.kts`)

The top-level `build.gradle.kts` file defines global build settings, Kotlin version constraints, and classpath dependencies for plugins used across modules.

```kotlin
// Located at: build.gradle.kts
plugins {
    id("com.android.application") version "8.x.x" apply false
    id("org.jetbrains.kotlin.android") version "1.x.x" apply false
    id("com.android.library") version "8.x.x" apply false
}

buildscript {
    dependencies {
        classpath(libs.android.gradle.plugin)
        classpath(libs.kotlin.gradle.plugin)
    }
}

```

### Project Settings (`settings.gradle.kts`)

The `settings.gradle.kts` file declares project structure, module inclusion, and enables the version catalog feature.

```kotlin
// Located at: settings.gradle.kts
pluginManagement {
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
    }
}

rootProject.name = "QuranApp"
include(":app")
include(":peacedesign")

```

### Application Module (`app/build.gradle.kts`)

The primary Android application module configuration resides in `app/build.gradle.kts`. This file specifies compile SDK versions, build types, signing configurations, and feature flags.

```kotlin
// Located at: app/build.gradle.kts
plugins {
    id("com.android.application")
    kotlin("android")
    kotlin("kapt")
    id("org.jetbrains.kotlin.android")
    id("kotlinx-serialization")
    alias(libs.plugins.kotlin.compose.compiler)
}

android {
    namespace = "com.quranapp.android"
    compileSdk = 34

    defaultConfig {
        applicationId = "com.quranapp.android"
        minSdk = 21
        targetSdk = 34
        versionCode = 1
        versionName = "1.0"
    }

    buildTypes {
        release {
            isMinifyEnabled = true
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
        debug {
            isDebuggable = true
        }
    }
    
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }
    
    kotlinOptions {
        jvmTarget = "17"
    }
}

dependencies {
    implementation(libs.androidx.core.ktx)
    implementation(libs.androidx.appcompat)
    implementation(libs.material)
    implementation(libs.androidx.lifecycle.runtime.ktx)
    implementation(platform(libs.androidx.compose.bom))
    // Additional dependencies managed via version catalog
}

```

### Version Catalog ([`gradle/libs.versions.toml`](https://github.com/alfaazplus/quranapp/blob/main/gradle/libs.versions.toml))

The centralized dependency management file eliminates version duplication across modules.

```toml

# Located at: gradle/libs.versions.toml

[versions]
agp = "8.2.0"
kotlin = "1.9.20"
coreKtx = "1.12.0"
lifecycleRuntimeKtx = "2.6.2"
activityCompose = "1.8.0"
composeBom = "2023.10.01"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

```

## Build Commands and Workflow

The **build system used for alfaazplus/quranapp** provides standard Gradle wrapper scripts for cross-platform builds. The wrapper ensures all contributors use the identical Gradle version specified in `gradle/wrapper/gradle-wrapper.properties`.

### Common Build Tasks

```bash

# Clone the repository

git clone https://github.com/alfaazplus/quranapp.git
cd quranapp

# Use the Gradle wrapper to assemble a debug APK

./gradlew assembleDebug

# Run unit tests

./gradlew test

# Build a release bundle (APK/AAB) with proguard/minification enabled

./gradlew assembleRelease

# Install debug build on connected device

./gradlew installDebug

# Clean build artifacts

./gradlew clean

```

### Build Variants and Signing

The `app/build.gradle.kts` defines distinct build types. The **release** build enables code shrinking via ProGuard/R8 and requires signing configuration for distribution. The **debug** build preserves debugging symbols and disables optimization for faster iteration during development.

## Module Structure and Dependencies

The project employs a multi-module architecture defined in `settings.gradle.kts`. This separation isolates concerns and enables parallel builds.

- **`:app`** – Main Android application module containing UI, business logic, and entry points
- **`:peacedesign`** – Library module providing shared UI resources, themes, and design system components (configured via `peacedesign/build.gradle`)

Dependency resolution follows the version catalog pattern, ensuring consistent library versions across both modules. The `build.gradle.kts` files reference dependencies using the `libs.` prefix (e.g., `implementation(libs.androidx.core.ktx)`), which maps to entries in [`gradle/libs.versions.toml`](https://github.com/alfaazplus/quranapp/blob/main/gradle/libs.versions.toml).

## Summary

- The **build system used for alfaazplus/quranapp** is **Gradle with Kotlin DSL**, providing type-safe build configuration and superior IDE integration compared to Groovy-based alternatives.
- Key configuration files include `build.gradle.kts` (root), `settings.gradle.kts` (project structure), `app/build.gradle.kts` (application module), and [`gradle/libs.versions.toml`](https://github.com/alfaazplus/quranapp/blob/main/gradle/libs.versions.toml) (centralized dependency management).
- The project uses the **Gradle Wrapper** (`gradlew`/`gradlew.bat`) to ensure consistent build tool versions across development environments.
- Multi-module architecture separates the main app (`:app`) from the design library (`:peacedesign`), with dependencies managed through the version catalog system.

## Frequently Asked Questions

### Why does QuranApp use Kotlin DSL instead of Groovy for Gradle builds?

QuranApp uses **Kotlin DSL** because it provides compile-time type checking, autocomplete support in Android Studio, and better refactoring capabilities compared to Groovy. The `*.gradle.kts` files in the repository allow developers to catch configuration errors during editing rather than at build time, and the syntax aligns with the Kotlin codebase used throughout the application.

### How does the Gradle Version Catalog improve dependency management in QuranApp?

The **Gradle Version Catalog** ([`gradle/libs.versions.toml`](https://github.com/alfaazplus/quranapp/blob/main/gradle/libs.versions.toml)) centralizes all dependency versions and coordinates in a single file, preventing version conflicts across the `:app` and `:peacedesign` modules. Instead of hardcoding version numbers in multiple `build.gradle.kts` files, developers reference dependencies using type-safe accessors like `libs.androidx.core.ktx`, ensuring consistent library versions throughout the **build system used for alfaazplus/quranapp**.

### What Gradle version does QuranApp use?

The specific Gradle version is defined in `gradle/wrapper/gradle-wrapper.properties` and enforced through the Gradle wrapper scripts (`gradlew` and `gradlew.bat`). While the exact version number may update with the repository, the wrapper ensures all contributors use the identical Gradle distribution specified by the `distributionUrl` property in the wrapper configuration file, eliminating "works on my machine" build failures.

### How do I build a release APK for QuranApp?

To build a release APK, run `./gradlew assembleRelease` from the project root. This command triggers the **release** build type defined in `app/build.gradle.kts`, which enables code shrinking via ProGuard/R8 and applies optimization settings. Note that building release artifacts requires proper signing configuration (keystore details) to be set up in the build configuration or via environment variables, as unsigned release builds cannot be installed on devices.