‫Welcome back in Android Studio.
‫Gradle scripts folder contains important Gradle build scripts used for configuring and building your
‫Android project.
‫These scripts are essential for defining the build process, dependencies and other project specific
‫configurations.
‫From these files we are interested in two files Build.gradle dot kts project level and Build.gradle
‫KTS module level.
‫Let's start with the project level.
‫Double click on it and this file is responsible for configuring the build process for your entire Android
‫project.
‫It specifies settings and dependencies that are common to all modules within the project.
‫In this file, you might define the build script repositories and other project wide settings.
‫The dot kts extension indicates that it's written in Kotlin, and uses the Kotlin DSL domain specific
‫language.
‫For Gradle.
‫The Kotlin DSL is an alternative to the additional groovy based DSL used in Gradle scripts.
‫The second file is build.gradle kts, but it is at the level of the module.
‫This file configures the specific build settings for your Android app module.
‫It includes dependencies, compile options, and other module specific configurations similar to the
‫project level build script.
‫This file is written in Kotlin using the Kotlin DSL, and focuses on settings relevant to the app module.
‫These build scripts are crucial for Android app development because they define how your app is built,
‫including which libraries and dependencies are used, how resources and assets are processed, and more.
‫The adoption of Kotlin based DSL Build.gradle kts for Gradle build scripts in Android Studio offers
‫benefits such as improved code completion, type checking, and better readability compared to the older
‫groovy based DSL.
‫It also aligns well with the Kotlin programming language, which is officially supported by Google for
‫Android development.
‫However, you can still find Android projects using the groovy based DSL, which is gradually being
‫phased out in favor of Kotlin based DSL.
‫When working on an Android project in Android Studio, it's essential to understand how to modify and
‫configure these build scripts as they directly affect your code and your app and how it's packaged and
‫deployed.