Home > Software design >  What is a .api file in the context of Java or Kotlin
What is a .api file in the context of Java or Kotlin

Time:03-10

I have been looking at the Ktor-client source code on github trying to understand it before making contributions when I came across this file. I see java syntax but I do not understand why it has the extension (.api), plus what it is used for. Any answers of ref links will be appreciated.

CodePudding user response:

It is because of the following line in Gradle configuration https://github.com/ktorio/ktor/blob/290cd60fc1ee4c78ae84fcba4c76d590ab0af18f/gradle/compatibility.gradle#L1

Quoting from README of Binary compatibility validator on GitHub

The tool allows to dump binary API of a Kotlin library that is public in sense of Kotlin visibilities and ensures that the public binary API wasn't changed in a way that make this change binary incompatible.

You can read more about this at https://github.com/Kotlin/binary-compatibility-validator.

  • Related