All apps/Kotlin compiler

Kotlin compiler

kotlinc

Command-line compiler for Kotlin on the JVM.

Runs as kotlinc|macOS, Linux, Windows|kotlinlang.org

Autocomplete

Fig spec, with what the manifest adds · 24 subcommands · 8 options
Published once and never changed; check the digest before caching
sha256
1a099c78d4d09a83eb1f8f9bedbe3e1deb284503b7326098f004c0b9a1399f00
Size
7237 bytes
Subcommands24 subcommands
kotlinc -version
Display the compiler version
kotlinc -nowarn
Suppress the compiler from displaying warnings during compilation
kotlinc -Werror
Turn any warnings into a compilation error
kotlinc -verbose
Enable verbose logging output which includes details of the compilation process
kotlinc -script
Evaluate a Kotlin script file. When called with this option, the compiler executes the first Kotlin script (*.kts) file among the given arguments
kotlinc -help
Display usage information and exit. Only standard options are shown. To show advanced options, use -X
kotlinc -X
Display information about the advanced options and exit. These options are currently unstable: their names and behavior may be changed without notice
kotlinc -kotlin-home
Specify a custom path to the Kotlin compiler used for the discovery of runtime libraries
kotlinc -P
Pass an option to a Kotlin compiler plugin. Available plugins and their options are listed in the Tools > Compiler plugins section of the documentation
kotlinc -language-version
Provide source compatibility with the specified version of Kotlin
kotlinc -api-version
Allow using declarations only from the specified version of Kotlin bundled libraries
kotlinc -progressive
Enable the progressive mode for the compiler. In the progressive mode, deprecations and bug fixes for unstable code take effect immediately, instead of going through a graceful migration cycle. Code written in the progressive mode is backward compatible; however, code written in a non-progressive mode may cause compilation errors in the progressive mode
kotlinc -opt-in
Enable usages of API that requires opt-in with a requirement annotation specified by the given fully qualified name
kotlinc -classpath
Search for class files in the specified paths. Separate elements of the classpath with system path separators (; on Windows, : on macOS/Linux). The classpath can contain file and directory paths, ZIP, or JAR files
kotlinc -d
Place the generated class files into the specified location. The location can be a directory, a ZIP, or a JAR file
kotlinc -include-runtime
Include the Kotlin runtime into the resulting JAR file. Makes the resulting archive runnable on any Java-enabled environment
kotlinc -jdk-home
Use a custom JDK home directory to include into the classpath if it differs from the default JAVA_HOME
kotlinc -jvm-target
Specify the target version of the generated JVM bytecode. Possible values are 1.8, 9, 10, ..., 21. The default value is 1.8
kotlinc -java-parameters
Generate metadata for Java 1.8 reflection on method parameters
kotlinc -module-name
Set a custom name for the generated .kotlin_module file
kotlinc -no-jdk
Don't automatically include the Java runtime into the classpath
kotlinc -no-reflect
Don't automatically include the Kotlin reflection (kotlin-reflect.jar) into the classpath
kotlinc -no-stdlib
Don't automatically include the Kotlin/JVM stdlib (kotlin-stdlib.jar) and Kotlin reflection (kotlin-reflect.jar) into the classpath
kotlinc -script-templates
Script definition template classes. Use fully qualified class names and separate them with commas (,)
OptionsOn kotlinc itself
-d
Directory, ZIP or JAR for the generated class files. <dest>
-include-runtime
Include Kotlin runtime
-classpath
Classpath <classpath>
-jvm-target
JVM target <jvm_target>
-module-name
Module name <module_name>
-nowarn
Suppress warnings
-Werror
Warnings as errors
-verbose
Verbose
ArgumentsPositional, in order
<sources>
· optional · repeatable · filepaths