Skip to content

Cannot successfully compile a multiplatform (1.7.0) project with kotlinx-cli dependency in commonMain #81

@young-druid

Description

@young-druid

I created a very simple project here.
When I try to compile it from command line with ./gradlew clean build I get the following error.

> Task :compileCommonMainKotlinMetadata FAILED
e: /Users/whatever/projects/kotlinx-cli-test/src/commonMain/kotlin/Cli.kt: (1, 16): Unresolved reference: cli
e: /Users/whatever/projects/kotlinx-cli-test/src/commonMain/kotlin/Cli.kt: (2, 16): Unresolved reference: cli
e: /Users/whatever/projects/kotlinx-cli-test/src/commonMain/kotlin/Cli.kt: (3, 16): Unresolved reference: cli
e: /Users/whatever/projects/kotlinx-cli-test/src/commonMain/kotlin/Cli.kt: (6, 18): Unresolved reference: ArgParser
e: /Users/whatever/projects/kotlinx-cli-test/src/commonMain/kotlin/Cli.kt: (7, 32): Unresolved reference: ArgType

If there is an misconfiguration on my side can you help to identify it? At the same time if I replace kotlinx-cli dependency with clikt it compiles fine. I tried enableEndorsedLibs. It didn't help as well.
I want to note that IDEA recognises kotlinx-cli dependency and doesn't report any errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions