Google Introduces Room 3.0: A Kotlin-First, Async, Multiplatform Persistence Library
Briefly

Google Introduces Room 3.0: A Kotlin-First, Async, Multiplatform Persistence Library
"The biggest change in Room 3.0 is that it will no longer generate Java code, producing only Kotlin instead. This simplifies both the codebase and the development process, enabling faster iterations."
"Room 3.0 is solely a KSP (Kotlin Symbol Processing) processor, allowing for better processing of Kotlin codebases without being limited by the Java language."
"The adoption of Kotlin coroutines enables fully asynchronous operations. As a result, all DAO functions generated by the library are defined as suspend."
"To make it easier for developers to migrate to Room 3.0 and away from Android's native SQL API, Room 2.8.0 introduces androidx.room:room-sqlite-wrapper, providing a compatibility layer."
Room 3.0 introduces significant changes to Android's persistence library, emphasizing Kotlin Multiplatform support and eliminating Java code generation. The update requires Kotlin Symbol Processing (KSP) and the Kotlin compiler, even for Java-only projects. It removes the native SQLite database API and adopts a coroutine-first model for asynchronous operations. All Data Access Object (DAO) functions are defined as suspend or can return reactive types using Kotlin Flow. Room 2.8.0 offers a compatibility layer to assist developers in transitioning from the native SQL API.
Read at InfoQ
Unable to calculate read time
[
|
]