Introducing Gradle
When writing a KMM application, you'll be using Gradle to build your shared code. For this reason, it's paramount that you at least know the basics, in order to start developing KMM apps.
Gradle is an open source build automation tool and dependency manager. It is similar to CocoaPods on iOS, while covering a broader purpose than pure dependency management, and it is the build tool on which Kotlin Multiplatform (KMP) is also based.
Gradle provides its own domain-specific language (DSL) for writing build scripts, and this DSL is available both in Groovy and Kotlin: build.gradle
is a build script written in Groovy, while build.gradle.kts
is written in Kotlin.
We will not have an in-depth description of Gradle as it is a huge topic, and without a doubt, many of us as Android developers use it as someone uses a lightbulb: without extensive knowledge on how it works, it still proves to be useful. If you want to gain a more in-depth view of Gradle, I...