| Usage: kotlinc-jvm <options> <source files> | |
| where possible options include: | |
| -classpath (-cp) <path> List of directories and JAR/ZIP archives to search for user class files. | |
| -d <directory|jar> Destination for generated class files. | |
| -expression (-e) Evaluate the given string as a Kotlin script. | |
| -include-runtime Include the Kotlin runtime in the resulting JAR. | |
| -java-parameters Generate metadata for Java 1.8 reflection on method parameters. | |
| -jdk-home <path> Include a custom JDK from the specified location in the classpath instead of the default 'JAVA_HOME'. | |
| -jvm-default {enable|no-compatibility|disable} | |
| Emit JVM default methods for interface declarations with bodies. The default is 'enable'. | |
| -jvm-default=enable Generate default methods for non-abstract interface declarations, as well as 'DefaultImpls' classes with | |
| static methods for compatibility with code compiled in the 'disable' mode. | |
| This is the default behavior since language version 2.2. | |
| -jvm-default=no-compatibility Generate default methods for non-abstract interface declarations. Do not generate 'DefaultImpls' classes. | |
| -jvm-default=disable Do not generate JVM default methods. This is the default behavior up to language version 2.1. | |
| -jvm-target <version> The target version of the generated JVM bytecode (1.8 and 9–28), with 1.8 as the default. | |
| -module-name <name> Name of the generated '.kotlin_module' file. | |
| -no-jdk Don't automatically include the Java runtime in the classpath. | |
| -no-reflect Don't automatically include the Kotlin reflection dependency in the classpath. | |
| -no-stdlib Don't automatically include the Kotlin/JVM stdlib and Kotlin reflection dependencies in the classpath. | |
| -script-templates <fully qualified class name[,]> | |
| Script definition template classes. | |
| -P plugin:<pluginId>:<optionName>=<value> | |
| Pass an option to a plugin. | |
| -api-version <version> Allow using declarations from only the specified version of bundled libraries. | |
| -kotlin-home <path> Path to the Kotlin compiler home directory used for the discovery of runtime libraries. | |
| -language-version <version> Provide source compatibility with the specified version of Kotlin. | |
| -opt-in <fq.name> Enable API usages that require opt-in with an opt-in requirement marker with the given fully qualified name. | |
| -progressive Enable progressive compiler mode. | |
| In this mode, deprecations and bug fixes for unstable code take effect immediately | |
| instead of going through a graceful migration cycle. | |
| Code written in progressive mode is backward compatible; however, code written without | |
| progressive mode enabled may cause compilation errors in progressive mode. | |
| -script Evaluate the given Kotlin script (*.kts) file. | |
| -Werror Report an error if there are any warnings. | |
| -Wextra Enable extra checkers for K2. | |
| -X Print a synopsis of advanced options. | |
| -help (-h) Print a synopsis of standard options. | |
| -nowarn Don't generate any warnings. | |
| -verbose Enable verbose logging output. | |
| -version Display the compiler version. | |
| -J<option> Pass an option directly to JVM. | |
| @<argfile> Read compiler arguments and file paths from the given file. | |
| For details, see https://kotl.in/cli | |
| OK |