2025-03-14 21:59:59 -06:00
|
|
|
# kotlinc
|
|
|
|
|
|
|
|
|
|
> Kotlin compiler.
|
2025-12-16 10:20:31 -07:00
|
|
|
> More information: <https://kotlinlang.org/docs/compiler-reference.html#common-options>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- 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}}`
|