Recall & Review
beginner
What is the purpose of the
src/main/kotlin directory in a Kotlin project?It holds the main Kotlin source code files that make up the application logic.
Click to reveal answer
beginner
What file typically defines the build configuration in a Kotlin project using Gradle?
The
build.gradle.kts file defines dependencies, plugins, and build tasks.Click to reveal answer
beginner
Why do Kotlin projects often have a
src/test/kotlin directory?It contains test code to verify that the main application code works correctly.
Click to reveal answer
intermediate
What is the role of the
gradlew script in a Kotlin project?It runs Gradle tasks using the project's specified Gradle version, ensuring consistent builds.
Click to reveal answer
beginner
What does the
dependencies block in build.gradle.kts do?It lists libraries and tools the project needs to compile and run.
Click to reveal answer
Where should you put your Kotlin source files in a standard Gradle project?
✗ Incorrect
The main Kotlin source files go in src/main/kotlin.
Which file controls the build process in a Kotlin Gradle project?
✗ Incorrect
build.gradle.kts defines the build configuration.
What is the purpose of the
src/test/kotlin folder?✗ Incorrect
src/test/kotlin holds test source files.
What does the Gradle wrapper (
gradlew) ensure?✗ Incorrect
Gradle wrapper ensures the same Gradle version is used everywhere.
In
build.gradle.kts, where do you specify external libraries?✗ Incorrect
The dependencies block lists external libraries.
Describe the typical folder structure of a Kotlin project using Gradle and explain the purpose of each main folder.
Think about where your code, tests, and build settings live.
You got /4 concepts.
Explain how the Gradle build system works in a Kotlin project and why the Gradle wrapper is useful.
Focus on build configuration and consistent environment.
You got /4 concepts.