Hi there. In Some Android libraries i can find an ...
# android
s
Hi there. In Some Android libraries i can find an api directory next to the src directory Does any body know what is the importance of that directory and the files inside it? https://github.com/chrisbanes/snapper/tree/main/lib/api https://github.com/square/logcat/tree/main/logcat/api
@cb
a
They're generated and read by build tools that track the public API surface of a library across multiple releases. They're designed to make the library build break if you try to make an incompatible change to the library's stable public API.
🙏 4
s
Thanks Adam for you descriptive answer, can you recommend some resources to read more about it
j
kotlinx binary compatibility validator
🙏 2
c
The GitHub Project may be relevant
🙏 1
e.g. LogCat useage shown here
🙏 1
a
Think of them like golden images for screenshot tests, but for the API surface
🙏 3