Running KSP from command line

Edit pageLast modified: 07 February 2022

KSP is a Kotlin compiler plugin and needs to run with Kotlin compiler. Download and extract them.

To run KSP with kotlinc, pass the -Xplugin option to kotlinc.

This is different from the symbol-processing-2.1.10-1.0.31.jar, which is designed to be used with kotlin-compiler-embeddable when running with Gradle. The command line kotlinc needs symbol-processing-cmdline-2.1.10-1.0.31.jar.

You'll also need the API jar.

See the complete example: