Skip to main content
Version: 2.24 (dev)

kotlinc_plugin


A plugin for kotlinc.

To enable a kotlinc plugin, define a target with this target type, and set the artifact field to the address of a jvm_artifact target that provides the plugin. Set the plugin_id field to the ID of the plugin if that name cannot be inferred from the name of this target.

The standard kotlinc plugins are available via the following artifact coordinates and IDs:

  • All-open: org.jetbrains.kotlin:kotlin-allopen:VERSION (ID: all-open)
  • No-arg: org.jetbrains.kotlin:kotlin-noarg:VERSION (ID: no-arg)
  • SAM with receiver: org.jetbrains.kotlin:kotlin-sam-with-receiver:VERSION (ID: sam-with-receiver)
  • kapt (annotation processor): org.jetbrains.kotlin:org.jetbrains.kotlin:kotlin-annotation-processing-embeddable:VERSION (ID: kapt3)
  • Serialization: org.jetbrains.kotlin:kotlin-serialization:VERSION (ID: serialization)

Backend: pants.backend.experimental.kotlin


artifact

str
required

The address of a jvm_artifact that defines a plugin for kotlinc.

description

str | None
default: None

A human-readable description of the target.

Use pants list --documented :: to see all targets with descriptions.

plugin_args

Iterable[str] | None
default: None

Optional list of argument to pass to the plugin.

plugin_id

str | None
default: None

The ID for kotlinc to use when setting options for the plugin.

If not set, the plugin ID defaults to the target name.

tags

Iterable[str] | None
default: None

Arbitrary strings to describe a target.

For example, you may tag some test targets with 'integration_test' so that you could run pants --tag='integration_test' test :: to only run on targets with that tag.