Defining a Kotlin/JVM Target
The first target that you will add support for is the JVM. This will help you get your feet wet using Kotlin Multiplatform by building on the concepts you have seen before.
Of course, if you only wanted to target Kotlin/JVM, you would be better off creating a Kotlin/JVM project, as you have before – not using the Multiplatform template. In the next two chapters, you will define Kotlin/Native and Kotlin/JS targets to make Doubloons4Gold truly multiplatform.
To add a new target to your code, you will need to take a trip to your project’s build.gradle file. As you saw in Chapter 20, this file contains information about how to build your project. Previously, you edited this file to declare dependencies ...
Get Kotlin Programming: The Big Nerd Ranch Guide, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.