kotlincSpec top-level property

FigSpec kotlincSpec
final

Completion spec for kotlinc CLI

Implementation

final FigSpec kotlincSpec = FigSpec(
  name: 'kotlinc',
  description: 'Kotlin compiler for JVM',
  subcommands: [

    Subcommand(
      name: '-version',
      description: 'Display the compiler version'
    ),
    Subcommand(
      name: '-nowarn',
      description: 'Suppress the compiler from displaying warnings during compilation'
    ),
    Subcommand(
      name: '-Werror',
      description: 'Turn any warnings into a compilation error'
    ),
    Subcommand(
      name: '-verbose',
      description: 'Enable verbose logging output which includes details of the compilation process'
    ),
    Subcommand(
      name: '-script',
      description: 'Evaluate a Kotlin script file. When called with this option, the compiler executes the first Kotlin script (*.kts) file among the given arguments',
      args: [
        Arg(
        name: 'script-file',
        template: 'filepaths'
      )
      ]
    ),
    Subcommand(
      name: ['-help', '-h'],
      description: 'Display usage information and exit. Only standard options are shown. To show advanced options, use -X'
    ),
    Subcommand(
      name: '-X',
      description: 'Display information about the advanced options and exit. These options are currently unstable: their names and behavior may be changed without notice'
    ),
    Subcommand(
      name: '-kotlin-home',
      description: 'Specify a custom path to the Kotlin compiler used for the discovery of runtime libraries',
      args: [
        Arg(
        name: 'path',
        template: 'filepaths'
      )
      ]
    ),
    Subcommand(
      name: '-P',
      description: 'Pass an option to a Kotlin compiler plugin. Available plugins and their options are listed in the Tools > Compiler plugins section of the documentation',
      args: [
        Arg(
        name: 'plugin:pluginId:optionName=value'
      )
      ]
    ),
    Subcommand(
      name: '-language-version',
      description: 'Provide source compatibility with the specified version of Kotlin',
      args: [
        Arg(
        name: 'version'
      )
      ]
    ),
    Subcommand(
      name: '-api-version',
      description: 'Allow using declarations only from the specified version of Kotlin bundled libraries',
      args: [
        Arg(
        name: 'version'
      )
      ]
    ),
    Subcommand(
      name: '-progressive',
      description: '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'
    ),
    Subcommand(
      name: '-opt-in',
      description: 'Enable usages of API that requires opt-in with a requirement annotation specified by the given fully qualified name',
      args: [
        Arg(
        name: 'annotation'
      )
      ]
    ),
    Subcommand(
      name: ['-classpath', '-cp'],
      description: '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',
      args: [
        Arg(
        name: 'path',
        template: 'filepaths'
      )
      ]
    ),
    Subcommand(
      name: '-d',
      description: 'Place the generated class files into the specified location. The location can be a directory, a ZIP, or a JAR file',
      args: [
        Arg(
        name: 'path',
        template: 'filepaths'
      )
      ]
    ),
    Subcommand(
      name: '-include-runtime',
      description: 'Include the Kotlin runtime into the resulting JAR file. Makes the resulting archive runnable on any Java-enabled environment'
    ),
    Subcommand(
      name: '-jdk-home',
      description: 'Use a custom JDK home directory to include into the classpath if it differs from the default JAVA_HOME',
      args: [
        Arg(
        name: 'path',
        template: 'folders'
      )
      ]
    ),
    Subcommand(
      name: '-jvm-target',
      description: 'Specify the target version of the generated JVM bytecode. Possible values are 1.8, 9, 10, ..., 21. The default value is 1.8',
      args: [
        Arg(
        name: 'version'
      )
      ]
    ),
    Subcommand(
      name: '-java-parameters',
      description: 'Generate metadata for Java 1.8 reflection on method parameters'
    ),
    Subcommand(
      name: '-module-name',
      description: 'Set a custom name for the generated .kotlin_module file',
      args: [
        Arg(
        name: 'name'
      )
      ]
    ),
    Subcommand(
      name: '-no-jdk',
      description: 'Don\'t automatically include the Java runtime into the classpath'
    ),
    Subcommand(
      name: '-no-reflect',
      description: 'Don\'t automatically include the Kotlin reflection (kotlin-reflect.jar) into the classpath'
    ),
    Subcommand(
      name: '-no-stdlib',
      description: 'Don\'t automatically include the Kotlin/JVM stdlib (kotlin-stdlib.jar) and Kotlin reflection (kotlin-reflect.jar) into the classpath'
    ),
    Subcommand(
      name: '-script-templates',
      description: 'Script definition template classes. Use fully qualified class names and separate them with commas (,)',
      args: [
        Arg(
        name: 'classnames[,]'
      )
      ]
    )
  ]
);