A .gradle file is a build script used by the Gradle build automation tool, which is the standard build system for Android development and widely used in Java and Kotlin projects. These files are written using a domain-specific language (DSL) based on Groovy or Kotlin. They define the project's build configuration, including dependencies, plugins, task definitions, and build logic. When a developer runs a build command, Gradle executes the instructions contained within these files to compile source code, run tests, package applications, and manage library dependencies. Because they are script-based, they allow for highly customizable and complex build processes that can be automated across different environments, making them essential for modern continuous integration and continuous deployment (CI/CD) pipelines in software engineering.