Google releases Room 3.0 alpha with Kotlin Multiplatform and web support

Google has released the first alpha version of Room 3.0, introducing a major overhaul of the database persistence library used in Android development. The update shifts the framework toward a Kotlin-first architecture and expands support to additional platforms, including JavaScript and WebAssembly, alongside Android, iOS, and JVM desktop environments.

Room 3.0 marks a significant departure from earlier versions by aligning the library more closely with the Kotlin Multiplatform ecosystem. The update removes several legacy components and restructures the API surface to accommodate cross-platform development and asynchronous operations required for web environments.

One of the most notable changes is the removal of the SupportSQLite APIs. The library now relies entirely on the newer SQLiteDriver interfaces from the AndroidX SQLite stack. The shift eliminates Room’s dependence on Android-specific database APIs and allows the driver model to work consistently across multiple platforms.

The update also ends support for Java-based code generation. Room 3.0 generates only Kotlin code and requires projects to use Kotlin Symbol Processing (KSP) rather than Java annotation processing tools such as KAPT. According to the development team, the change simplifies processing pipelines and enables better compatibility with Kotlin-centric codebases.

Coroutines are now a core requirement of the library. Database access objects (DAOs) must use suspending functions unless they return reactive types like Flow, effectively removing support for blocking database operations. The design is intended to support asynchronous storage models used in web environments and cross-platform applications.

To avoid conflicts with existing implementations, Room 3.0 introduces a new package structure and Maven group identifiers. Libraries that previously depended on artifacts such as androidx.room:room-runtime will need to transition to the new androidx.room3 group and update imports accordingly.

Developers migrating from Room 2.x are encouraged to transition to the SQLiteDriver APIs before upgrading. Earlier versions in the 2.x series already include preliminary support for the driver model, allowing teams to begin the migration process without immediately adopting the new major release.

For projects that still rely on the older SupportSQLite interfaces, a compatibility layer remains available through a wrapper artifact. This temporary bridge allows developers to convert a RoomDatabase instance into a SupportSQLiteDatabase while gradually updating their codebases to the new driver architecture.

Room 3.0 also introduces new extensibility features for data access objects. Through a converter annotation, developers can define custom return types for DAO functions, enabling integrations beyond built-in frameworks such as paging or reactive data streams.

With the development focus shifting to the new version, the existing Room 2.x line will move into maintenance mode. The Android development team plans to continue delivering bug fixes and dependency updates for the older branch until Room 3 reaches a stable release.

Written by Maya Robertson

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Loading…

Apple lowers App Store commission in China starting March 15

Publicis acquires AdgeAI to expand predictive creative analytics capabilities