{
  "id": "kotlinc",
  "name": "Kotlin compiler",
  "description": "Command-line compiler for Kotlin on the JVM.",
  "homepage": "https://kotlinlang.org",
  "executables": [
    "kotlinc"
  ],
  "commands": {
    "format": 1,
    "label": "Compile Kotlin",
    "description": "Compile Kotlin sources to class files or a JAR. Advanced -X options and compiler plugins are left out.",
    "quality": "ai-draft",
    "base": "fig:kotlinc",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/kotlinc.ts",
        "license": "MIT",
        "evidence": "-d: Place the generated class files into the specified location. The location can be a directory, a ZIP, or a JAR file\n-include-runtime: Include the Kotlin runtime into the resulting JAR file. Makes the resulting archive runnable on any Java-enabled environment\n-classpath: Search for class files in the specified paths. Separate elements of the classpath with system path separators\n-jvm-target: Specify the target version of the generated JVM bytecode. Possible values are 1.8, 9, 10, ..., 21\n-module-name: Set a custom name for the generated .kotlin_module file\n-nowarn: Suppress the compiler from displaying warnings during compilation\n-Werror: Turn any warnings into a compilation error\n-verbose: Enable verbose logging output which includes details of the compilation process"
      }
    ],
    "field": [
      {
        "id": "sources",
        "label": "Source files or directories",
        "type": "path",
        "position": 0,
        "multiple": true,
        "path": {
          "kind": "any",
          "role": "input"
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "dest",
        "label": "Output (-d)",
        "description": "Directory, ZIP or JAR for the generated class files.",
        "type": "path",
        "option": [
          "-d"
        ],
        "path": {
          "kind": "any",
          "role": "output",
          "must_exist": false
        },
        "effect": "overwrite",
        "sources": [
          "fig"
        ]
      },
      {
        "id": "include_runtime",
        "label": "Include Kotlin runtime",
        "type": "boolean",
        "option": [
          "-include-runtime"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "classpath",
        "label": "Classpath",
        "type": "string",
        "option": [
          "-classpath"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "jvm_target",
        "label": "JVM target",
        "type": "string",
        "option": [
          "-jvm-target"
        ],
        "suggestions": [
          {
            "value": "1.8",
            "label": "1.8"
          },
          {
            "value": "11",
            "label": "11"
          },
          {
            "value": "17",
            "label": "17"
          },
          {
            "value": "21",
            "label": "21"
          }
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "module_name",
        "label": "Module name",
        "type": "string",
        "option": [
          "-module-name"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "nowarn",
        "label": "Suppress warnings",
        "type": "boolean",
        "option": [
          "-nowarn"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "werror",
        "label": "Warnings as errors",
        "type": "boolean",
        "option": [
          "-Werror"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose",
        "type": "boolean",
        "option": [
          "-verbose"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "jar",
        "label": "Compile to runnable JAR",
        "set": {
          "include_runtime": [
            true
          ]
        },
        "fields": [
          "sources",
          "dest",
          "jvm_target"
        ],
        "required": [
          "sources",
          "dest"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "sources",
          "dest",
          "include_runtime",
          "jvm_target"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "classpath",
          "module_name",
          "nowarn",
          "werror",
          "verbose"
        ]
      }
    ]
  }
}
