Skip to content
Back to Changelog

Android SDK 29.0.0 works with R8 code shrinking

The Appwrite Android SDK version 29.0.0 works in apps built with R8 full mode. Before this release, turning on code shrinking broke parts of the SDK at runtime, and the SDK's keep rules lowered the R8 scores Google Play reads from your app bundle.

Fixed under R8

  • Queries and operators: Query and Operator values serialize to the correct JSON instead of {}.
  • Realtime: Subscriptions receive their events, and Realtime errors keep their message and code.
  • Sessions: Saved session cookies stay readable after you ship a new build of your app.

Better optimization scores

The SDK's R8 rules now keep only what the bundled MQTT client needs. Measured on a minimal app built with R8 full mode:

MetricBeforeAfter
Obfuscation score67.4%89.3%
Optimization score65.8%87.8%
DEX size2.57 MB2.44 MB

The SDK ships the R8 rules it needs, so there is nothing to configure. Annotate your own classes that the SDK fills from JSON, such as the nestedType of documents and rows, with @Keep.

Version 29.0.0 also raises the minimum Android SDK to 24 (Android 7.0). Update the dependency to io.appwrite:sdk-for-android:29.0.0 to get these changes.

Ready to build?_