DevOps / Gradle8 Interview Questions
What is a build.gradle file used for?
build.gradle (Groovy DSL) or build.gradle.kts (Kotlin DSL) is where a project's actual build configuration lives — which plugins to apply, which dependencies to pull in, and any custom tasks or overrides needed beyond what the applied plugins already provide by convention.
plugins { id 'java' } repositories { mavenCentral() } dependencies { implementation 'org.apache.commons:commons-lang3:3.14.0' testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2' }
Every top-level block in that file — plugins, repositories, dependencies, tasks — is really just a Groovy or Kotlin closure/lambda handed to a configuration object, which is why the syntax reads declaratively even though it's executable code underneath. This is the single file most Gradle interview questions and day-to-day project changes revolve around.
More Related questions...
