Home / Companies / Stream / Blog / Post Details
Content Deep Dive

Keeping Public API in Check With the Kotlin Binary Validator Plugin

Blog post from Stream

Post Details
Company
Date Published
Author
Márton B.
Word Count
1,121
Language
English
Hacker News Points
-
Summary

The Kotlin binary compatibility validator plugin, an experimental tool by JetBrains, is utilized in the Stream Chat Android SDK project to monitor changes in the public API, ensuring developers are aware of modifications and maintain compatibility. This Gradle plugin generates .api files that document the public API for each module, requiring developers to update these files if they alter the API, thereby preventing accidental changes. The plugin is configured to exclude certain packages, projects, and non-public markers from validation, and it integrates with Git hooks and CI checks to automate verification processes. Despite some limitations, such as not tracking source-level API changes that do not affect binary compatibility, the plugin is valuable for avoiding unintended public API alterations. The article provides a detailed guide on setting up, configuring, and using the plugin, emphasizing its role in maintaining reliable library development practices.