Kotlin / binary-compatibility-validator

Public API management tool
Apache License 2.0
758 stars 55 forks source link

JVM/Android-only modules create empty klib.api file on 0.15.0-Beta.3 #246

Open colinrtwhite opened 6 days ago

colinrtwhite commented 6 days ago

On 0.15.0-Beta.3, the plugin generates an empty klib.api if the module only supports Android/JVM targets. This causes the binary compatibility check to fail with the error Project ABI file XYZ.klib.api is empty.. The release notes mention adding modules to ignoredProjects, but I believe that also disables checking the android/XYZ.api and jvm/XYZ.api files. I have the new klib validation support enabled with strictValidation = true:

klib {
    enabled = true
    strictValidation = true
}

To reproduce:

Run ./gradlew apiDump and then ./gradlew apiCheck in this project. I can make a smaller repro project if needed.

fzhinkin commented 5 days ago

@colinrtwhite thanks for reporting!