skip to content

Ecosystem and Interop

Where core Gradle stops and the large ecosystem plugins begin: JVM packaging and distributions, plus the Android, Kotlin, and Spring Boot plugins. Interviewers ask to see that you can tell plugin behavior apart from Gradle behavior.

on this pageshow

explore

questions

62 · 2 sections

How do you configure Gradle's 'application' plugin to launch an executable JVM app, and what is the minimal configuration required?

level: juniorimportance: must knowfreq 70%
basics
~10 s

Apply the 'application' plugin and set the entry point: application { mainClass = "com.example.Main" }. Then run ./gradlew run to compile and launch the app's main method.

open as a page

What are the distZip and distTar tasks, and where do they come from in a Gradle build?

level: juniorimportance: must knowfreq 60%
basics
~10 s

distZip and distTar are tasks added by Gradle's application (and distribution) plugin. They bundle your app's jar, dependencies, and start scripts into a redistributable .zip or .tar archive in build/distributions.

open as a page

What does applying the Gradle `distribution` plugin give you, and what is the `main` distribution?

level: juniorimportance: must knowfreq 55%
basics
~10 s

Applying the distribution plugin adds a distributions {} container with one default distribution named main. It auto-creates distZip, distTar, and installDist tasks that bundle whatever you put under src/main/dist into an archive or folder.

open as a page

What does the installDist task produce, and what is the layout of its output directory?

level: juniorimportance: must knowfreq 60%
basics
~10 s

installDist assembles a runnable, unpacked installation under build/install/<name>/ with two folders: bin/ holding the generated start scripts and lib/ holding the application jar plus all runtime dependency jars.

open as a page

What does the Shadow plugin's shadowJar task produce, and why would you reach for it instead of the standard jar task?

level: juniorimportance: must knowfreq 70%
basics
~10 s

shadowJar builds a single 'fat'/'uber' jar that bundles your compiled classes plus all runtime dependencies, so the app can run with java -jar alone — the standard jar only contains your own classes.

open as a page

What is the android { } DSL block, and what is its role once AGP is applied?

level: juniorimportance: must knowfreq 60%
basics
~20 s

android { } is the configuration extension AGP registers when you apply it. Inside it you set things like compileSdk, namespace, and defaultConfig. It configures AGP's tasks; without AGP applied, the block does not exist.

open as a page

What is the Android Gradle Plugin (AGP), and how does it relate to Gradle itself?

level: juniorimportance: must knowfreq 70%
basics
~20 s

AGP is a Gradle plugin you apply with com.android.application (or com.android.library). Gradle is the generic build engine; AGP teaches Gradle how to build an Android app — compile, package an APK/AAB, and run Android-specific tasks.

open as a page

What are build types in the Android Gradle Plugin (AGP), and what do the default `debug` and `release` build types represent?

level: juniorimportance: must knowfreq 70%
basics
~10 s

Build types are AGP configurations for how an app is built. AGP ships two by default: debug (debuggable, no shrinking) and release (optimizable, shrinkable, signable for distribution).

open as a page

What is the Jib Gradle plugin and how does it build a container image differently from a typical Dockerfile-based build?

level: juniorimportance: must knowfreq 55%
basics
~10 s

Jib is a Gradle plugin (com.google.cloud.tools.jib) that builds an OCI/Docker image for a JVM app directly from your build, with no Dockerfile and no Docker daemon. You run a task like jib or jibDockerBuild.

open as a page

What is the Kotlin Multiplatform Gradle plugin, and how do you declare the platforms a module should compile for?

level: juniorimportance: must knowfreq 60%
basics
~10 s

Apply the org.jetbrains.kotlin.multiplatform plugin, then open a kotlin { } block and call target functions like jvm(), js(), and iosX64(). Each call adds a platform the module compiles for.

open as a page