Target (Gradle Kotlin-MP)
Target is a part of the build responsible for compiling, testing, and packaging a piece of software aimed at one of the supported platforms. - reference
Notes
Target: encompasses BOTH 1) What you are building for. And 2) How the code is built.
The term 'target' in Kotlin Multiplatform refers to both:
- The platform you are targeting (e.g., JVM, JS, iOS, etc.).
- The configuration and associated tasks (like compiling, testing, and packaging) required to build and test for that specific platform.
In short, 'target' encompasses:
- What you are building for (the platform).
- How the code is built for that platform (the build and test tasks).
For example:
kotlin {
jvm() // JVM target: Defines that the code will be built for the JVM and configures the necessary build steps.
js() // JS target: Similarly, defines and configures for JavaScript environments.
}
This means that 'target' encapsulates both the destination platform and the process of building for that platform.
Backlinks