binary-compatibility-validator
binary-compatibility-validator copied to clipboard
Support public external JS declarations
Currently, the validator does not create .api files or api declarations for public external declarations, which results into not checking the JS declarations, which could be called from library consumer in Kotlin.
To add to this, I believe that's the same for native()
targets
Binary-compatibility-validator is intended to be used only with JVM targets.
There is no public notion of "binary compatibility" in either JS or K/N, so they are not supported
Please make it clear in the Readme. Kotlin does support other targets than the JVM and it would be nice, if others targets could benefit from a binary validator plugin too, although without a built in notation this would be a challenge, I know...
Good point, I will update the readme
@qwwdfsad Nowadays TS declarations can work as a good public ABI for JS.
Already generated in some setups, maybe you can consider supporting it in the binary-compatibility-validator
?
JS is completely of our focus now, we are working on K2 release and stabilization of KMM, so unfortunately I'm neither ready to accept a contribution for that nor to even do my due diligence and see if that's a reasonable addition for the future
I’ve created a Gradle plugin that adds support for JS APIs to the KotlinX Binary Compatibility Validator. Originally made for the Fluxo state management framework, now released for general use.
- Uses generated TypeScript definitions to do so.
- Can be used with any Gradle module with Kotlin/JS target. Either multiplatform or Kotlin/JS.
- Will be supported until the official Kotlin/JS support is added to BCV itself.
Compatibility tested with:
BCV | Kotlin | Gradle |
---|---|---|
0.8 — 0.13 | 1.6.20+ | 7.4+ |
See how to use with the JitPack here: https://github.com/fluxo-kt/fluxo-bcv-js#readme Publication on Gradle Plugin Portal is in progress.
Please try to use the plugin. I’d appreciate any feedback.