Skip to content

Kotlin 1.9.0: API files are not generated for a target if its leaf source set is empty #146

Closed
@arkivanov

Description

@arkivanov

Kotlin version 1.9.0
Plugin version: 0.13.0-0.13.2
Android + JVM + JS + linuxX64 + All Apple targets

When running apiDump task, no .api files are generated under api/jvm or api/android folder, if the corresponding leaf source set (i.e. jvmMain and androidMain respectively) is empty. If there is some code present in e.g. jvmMain source set (or at least jvmMain/kotlin empty folder is present), then the jvm API file gets generated, similar situate with android.

Also, running apiCheck task fails:

A problem was found with the configuration of task ':instance-keeper:jvmApiCheck' (type 'KotlinApiCompareTask').
  - In plugin 'org.jetbrains.kotlinx.binary-compatibility-validator' type 'kotlinx.validation.KotlinApiCompareTask' property 'apiBuildDir' specifies directory '/Users/arkivanov/dev/workspace/Essenty/instance-keeper/build/api/jvm' which doesn't exist.

Works fine with version 0.12.1 and Kotlin 1.8.20.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggradle

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions