Академический Документы
Профессиональный Документы
Культура Документы
If you are on macOS and already using either brew or port, see either Listing 1-5 or 1-6
for the terminal commands to get Kotlin.
Listing 1-5. Install Kotlin Using HomeBrew
$ brew update
$ brew install kotlin
Chapter 1 GettinG into Kotlin
11
Listing 1-6. Install Kotlin Using MacPorts
$ sudo port install kotlin
Using a Zipped Installer
If you go to the Kotlin website, http://kotlinglang.org then “learn” ➤ “tutorials” ➤
“getting started” ➤ “working with the command line compiler”, you’ll find a web page 2
that might look like the one shown in Figure 1-3. The zipped installer can be downloaded
by following the link “GitHub releases” (also shown in Figure 1-3).
The link should take you to the GitHub page of JetBrains/Kotlin 3 (Figure 1-4). At the
time of writing, Kotlin was on version 1.2.10; it might be a different version by the time
you are reading this, but just download the latest stable version.
2Working with the command line compiler: https://kotlinlang.org/docs/tutorials/
command-line.html
3JetBrains/Kotlin GitHub page: https://github.com/JetBrains/kotlin/releases/tag/v1.2.10