1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 17:02:08 +02:00
tldr/pages/common/kotlinc.md
2021-10-17 17:01:52 -03:00

24 lines
542 B
Markdown

# kotlinc
> Kotlin compiler.
> More information: <https://kotlinlang.org/docs/command-line.html>.
- Start a REPL (interactive shell):
`kotlinc`
- Compile a Kotlin file:
`kotlinc {{path/to/file.kt}}`
- Compile several Kotlin files:
`kotlinc {{path/to/file1.kt path/to/file2.kt ...}}`
- Execute a specific Kotlin Script file:
`kotlinc -script {{path/to/file.kts}}`
- Compile a Kotlin file into a self contained jar file with the Kotlin runtime library included:
`kotlinc {{path/to/file.kt}} -include-runtime -d {{path/to/file.jar}}`