Are the kotlin CLI classes exposed in maven?

Are the classes/enums in org.jetbrains.kotlin.cli included in any maven packages? I’ve tried importing a variety of packages and it’s not found in any of the of enums or classes I expected to be included.

dependencies {
    compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: '1.3.31'
    compile group: 'org.jetbrains.kotlin', name: 'kotlin-compiler', version: '1.3.31'
    runtime group: 'org.jetbrains.kotlin', name: 'kotlin-compiler-embeddable', version: '1.3.31'
    compile group: 'org.jetbrains.kotlin', name: 'kotlin-script-util', version: '1.3.31'

    implementation "org.jetbrains.kotlin:kotlin-stdlib"
    ...

But I can’t import any of the kotlin enums like the following:

import static org.jetbrains.kotlin.cli.common.ExitCode.COMPILATION_ERROR;

Use implementation "org.jetbrains.kotlin:kotlin-compiler-client-embeddable". As seen here, its jar includes the classes from the cli-common compiler module, which is just what you need.

1 Like