Skip to content
FeedbackDashboard

Why we generate separate Kotlin and Java SDKs

Kotlin is interoperable with Java, but one SDK for both languages doesn't work in practice.

Although the Java SDK is written in Kotlin, which is interoperable with Java, its public API differs from the Kotlin SDK’s. Here are some examples:

The Java SDK is written in Kotlin because it simplifies code sharing between the Java and Kotlin SDKs, including custom code.

To add custom Java code, create a java/ directory alongside the existing kotlin/ directory. The Kotlin documentation on Java interoperability has guidance and examples you can reference to ensure your Java code works with the Kotlin code we generate.