The validation is disabled by default and requires the following settings to be turned on:
apiValidation {
klibValidationEnabled = true
}
KLib validation supports ignoredPackages, ignoredClasses and nonPublicMarkers options the same way classfiles validation does, but all public* options are unsupported and will be ignored.
As with the JVM API validation, ABI is dumped into a text file. There's a separate dump file for each native target, each located in a directory named after the target.
Here's an example of a file tree for kotlinx-io's core module:
One of the disadvantages of such a scheme for storing dumps is that once something is changed in the common sourceset, api-files for all targets will reflect that change. It's an open question if some other scheme to represent the native ABI should be used.
Supported Klib ABI validation.
The validation is disabled by default and requires the following settings to be turned on:
KLib validation supports
ignoredPackages
,ignoredClasses
andnonPublicMarkers
options the same way classfiles validation does, but allpublic*
options are unsupported and will be ignored.As with the JVM API validation, ABI is dumped into a text file. There's a separate dump file for each native target, each located in a directory named after the target. Here's an example of a file tree for kotlinx-io's core module:
One of the disadvantages of such a scheme for storing dumps is that once something is changed in the common sourceset, api-files for all targets will reflect that change. It's an open question if some other scheme to represent the native ABI should be used.