Skip to content

Runtimes

Lossy edited this page Sep 26, 2025 · 2 revisions

Java

JavaSteam aims to be fully Java backwards compatible when new and existing code is written in Kotlin.

Most tests are written in java to ensure compatibility at a broad scale.

Kotlin

JavaSteam has been slowly migrating to Kotlin for a variety of reasons. Bringing new kotlin features into the codebase to help or simplify things that Java couldn't achieve nicely.

Not every class, builder, or method might have kotlin syntactic sugar. But work has been made to make sure the important stuff has "KTX" methods.

Android

JavaSteam also aims to to fully support the Android platform. This inherently comes with a few problems that might cause crashes.

  • Use the CryptoHelper.SEC_PROV as the security provider whenever you need to get a Cipher instance.
  • Don't use named groups in regex as older versions of Android (<23) don't support it.

R8 / Shrinking

Since Android Studio 3.4, R8 is enabled by default when building in release mode. This may cause issues with JavaSteam as most generated classes are not directly linked to the main library.

Below is a catch all to keep JavaStream bundled with the app during compile time. Feel free to request changes or provide more refined proguard rules.

###########
# JAVASTEAM
###########
-keep class in.dragonbra.javasteam.** { *; }

Help

Report any issues you run into. Contributions are welcome!

Java developers: Almost all public methods or classes should behave as usual.

Kotlin developers: Helper methods are always a plus to add. Public static methods should always have @JvmStatic. The use of @JvmField is discouraged.

Android devleopers: Compat methods are found here. Older API and certain devices may have issues, and workarounds are implemented here to be used in the main code.

Clone this wiki locally