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 pageshowhide
explore
- JVM Packaging Plugins31 questions
- Application Plugin5 questions
- installDist and Start Scripts5 questions
- distZip and distTar Archives5 questions
- Distribution Plugin5 questions
- Custom Distributions and Arbitrary Content5 questions
- Shadow Plugin (Fat/Uber Jar)6 questions
- Ecosystem Plugins Overview31 questions
- Android Gradle Plugin Overview5 questions
- AGP Build Variants and Flavors5 questions
- Kotlin Gradle Plugin Overview5 questions
- KGP Multiplatform Targets5 questions
- Spring Boot Plugin Overview5 questions
- Jib Container Image Plugin6 questions
questions
62 · 2 sectionsHow do you configure Gradle's 'application' plugin to launch an executable JVM app, and what is the minimal configuration required?
basics
~10 sApply 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.
What are the distZip and distTar tasks, and where do they come from in a Gradle build?
basics
~10 sdistZip 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.
What does applying the Gradle `distribution` plugin give you, and what is the `main` distribution?
basics
~10 sApplying 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.
What does the installDist task produce, and what is the layout of its output directory?
basics
~10 sinstallDist 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.
What does the Shadow plugin's shadowJar task produce, and why would you reach for it instead of the standard jar task?
basics
~10 sshadowJar 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.
What is the android { } DSL block, and what is its role once AGP is applied?
basics
~20 sandroid { } 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.
What is the Android Gradle Plugin (AGP), and how does it relate to Gradle itself?
basics
~20 sAGP 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.
What are build types in the Android Gradle Plugin (AGP), and what do the default `debug` and `release` build types represent?
basics
~10 sBuild 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).
What is the Jib Gradle plugin and how does it build a container image differently from a typical Dockerfile-based build?
basics
~10 sJib 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.
What is the Kotlin Multiplatform Gradle plugin, and how do you declare the platforms a module should compile for?
basics
~10 sApply 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.