Package-level declarations

Provides an API for dumping Kotlin libraries (KLibs) public ABI and managing resulting dumps.

This package is experimental, both API and behaviour may change in the future. There are also no guarantees on preserving the behavior of the API until its stabilization.

Types

Link copied to clipboard
class KlibDump

Represents KLib ABI dump and allows manipulating it.

Link copied to clipboard

Filters affecting how the klib ABI will be represented in a dump.

Link copied to clipboard
Link copied to clipboard

Target name consisting of two parts: a configurableName that could be configured by a user, and an targetName that names a target platform and could not be configured by a user.

Functions

Link copied to clipboard
fun inferAbi(unsupportedTarget: KlibTarget, supportedTargetDumps: Iterable<KlibDump>, oldMergedDump: KlibDump? = null): KlibDump

Infer a possible public ABI for unsupportedTarget as an ABI common across all supportedTargetDumps. If there's an oldMergedDump consisting of declarations of multiple targets, including unsupportedTarget, a portion of that dump specific to the unsupportedTarget will be extracted and merged to the common ABI build from supportedTargetDumps.

Link copied to clipboard

Builds a new KlibDumpFilters instance by invoking a builderAction on a temporary KlibDumpFilters.Builder instance and then converting it into filters.

Link copied to clipboard
fun KlibDump.mergeFromKlib(klibFile: File, configurableTargetName: String? = null, filters: KlibDumpFilters = KlibDumpFilters.DEFAULT)

Dumps a public ABI of a klib represented by klibFile using filters and merges it into this dump.

Link copied to clipboard
fun KlibDump.saveTo(file: File)

Serializes the dump and writes it to file.