Room

Frameworks & LibrariesAI extracted

AndroidX's SQLite persistence library — compile-time-checked queries over a database.

Latest 2.8.4 · by GoogleWebsiteRSS

Release activity

Release activity — 5 releases across 5 days in the last year. Each cell is one day; darker means more releases that day. Older weeks are hidden at this screen width.
JunJulAugSep
SundayNo releases on May 24, 2026No releases on May 31, 2026No releases on Jun 7, 2026No releases on Jun 14, 2026No releases on Jun 21, 2026No releases on Jun 28, 2026No releases on Jul 5, 2026No releases on Jul 12, 2026No releases on Jul 19, 2026No releases on Jul 26, 2026No releases on Aug 2, 2026No releases on Aug 9, 2026No releases on Aug 16, 2026No releases on Aug 23, 2026No releases on Aug 30, 2026No releases on Sep 6, 2026
MondayNo releases on May 25, 2026No releases on Jun 1, 2026No releases on Jun 8, 2026No releases on Jun 15, 2026No releases on Jun 22, 2026No releases on Jun 29, 2026No releases on Jul 6, 2026No releases on Jul 13, 2026No releases on Jul 20, 2026No releases on Jul 27, 2026No releases on Aug 3, 2026No releases on Aug 10, 2026No releases on Aug 17, 2026No releases on Aug 24, 2026No releases on Aug 31, 2026No releases on Sep 7, 2026
TuesdayNo releases on May 26, 2026No releases on Jun 2, 2026No releases on Jun 9, 2026No releases on Jun 16, 2026No releases on Jun 23, 2026No releases on Jun 30, 2026No releases on Jul 7, 2026No releases on Jul 14, 2026No releases on Jul 21, 2026No releases on Jul 28, 2026No releases on Aug 4, 2026No releases on Aug 11, 2026No releases on Aug 18, 2026No releases on Aug 25, 2026No releases on Sep 1, 2026
WednesdayNo releases on May 27, 2026No releases on Jun 3, 2026No releases on Jun 10, 2026No releases on Jun 17, 2026No releases on Jun 24, 2026No releases on Jul 1, 2026No releases on Jul 8, 2026No releases on Jul 15, 2026No releases on Jul 22, 2026No releases on Jul 29, 2026No releases on Aug 5, 2026No releases on Aug 12, 2026No releases on Aug 19, 2026No releases on Aug 26, 2026No releases on Sep 2, 2026
ThursdayNo releases on May 28, 2026No releases on Jun 4, 2026No releases on Jun 11, 2026No releases on Jun 18, 2026No releases on Jun 25, 2026No releases on Jul 2, 2026No releases on Jul 9, 2026No releases on Jul 16, 2026No releases on Jul 23, 2026No releases on Jul 30, 2026No releases on Aug 6, 2026No releases on Aug 13, 2026No releases on Aug 20, 2026No releases on Aug 27, 2026No releases on Sep 3, 2026
FridayNo releases on May 29, 2026No releases on Jun 5, 2026No releases on Jun 12, 2026No releases on Jun 19, 2026No releases on Jun 26, 2026No releases on Jul 3, 2026No releases on Jul 10, 2026No releases on Jul 17, 2026No releases on Jul 24, 2026No releases on Jul 31, 2026No releases on Aug 7, 2026No releases on Aug 14, 2026No releases on Aug 21, 2026No releases on Aug 28, 2026No releases on Sep 4, 2026
SaturdayNo releases on May 30, 2026No releases on Jun 6, 2026No releases on Jun 13, 2026No releases on Jun 20, 2026No releases on Jun 27, 2026No releases on Jul 4, 2026No releases on Jul 11, 2026No releases on Jul 18, 2026No releases on Jul 25, 2026No releases on Aug 1, 2026No releases on Aug 8, 2026No releases on Aug 15, 2026No releases on Aug 22, 2026No releases on Aug 29, 2026No releases on Sep 5, 2026

5 releases in the last year

Changelog

2.8.4Latest

Version 2.8.4

Added 1
  • Add a prepared statement cache to Room's connection pool when using a SQLiteDriver that does not internally have a pool, such as the BundledSQLiteDriver
Changed 1
  • Improve Room's SupportSQLite Wrapper performance by avoiding thread hops while maintaining the same blocking behaviour as the SupportSQLiteDatabase APIs
Fixed 2
  • Fix an issue where the actual / expected error message on schema validation was missing information
  • Fix an issue with Room's Kotlin code generation missing @Transaction DAO functions with type variables

From Room

Added a prepared statement cache to Room's connection pool when using a SQLiteDriver that does not internally have a pool, such as the BundledSQLiteDriver. This improves performance on repeated execution of the same SQL statement. Fix an issue where the actual / expected error message on schema validation was missing information. Fix an issue with Room's Kotlin code generation missing @Transaction DAO functions with type variables. Improve Room's SupportSQLite Wrapper performance by avoiding thread hops maintaining the same blocking behaviour as the SupportSQLiteDatabase APIs.

View originalPermalink
How 2.8.4 went
2.8.3

Version 2.8.3

Fixed 1
  • Performance issue with the Room SQLite Wrapper that was causing excessive JNI calls and significant performance degradation when iterating over a Cursor

From Room

Fix a performance issue with the Room SQLite Wrapper that was causing excessive JNI calls and significant performance degradation when iterating over a Cursor.

View originalPermalink
How 2.8.3 went
2.8.2

Version 2.8.2

Fixed 1
  • Fix a deadlock that could occur when re-opening an auto-closed database from a Flow emission

From Room

Fix a deadlock that could occur when re-opening an auto-closed database from a Flow emission.

View originalPermalink
How 2.8.2 went
2.8.1

Version 2.8.1

Fixed 2
  • Processor crash that would occur when processing a DAO function with a suspend lambda
  • Race condition that would prevent Flows from receiving the latest updates

From Room

Fix a processor crash that would occur when processing a DAO function with a suspend lambda. Fix a race condition that would prevent Flows from receiving the latest updated.

View originalPermalink
How 2.8.1 went
2.8.0

Version 2.8.0

Added 3
  • New artifact androidx.room:room-sqlite-wrapper containing APIs to get a SupportSQLiteDatabase wrapper from a RoomDatabase with a configured SQLiteDriver
  • New extension function RoomDatabase.getSupportWrapper() to obtain a SupportSQLiteDatabase wrapper
  • Support for KMP targets Watch OS and Tv OS
Changed 1
  • Updated the library's Android minSDK from API 21 to API 23

From Room

Added a new artifact androidx.room:room-sqlite-wrapper which contains APIs to get a SupportSQLiteDatabase wrapper from a RoomDatabase with a configured SQLiteDriver. To get the wrapper use the new extension function RoomDatabase.getSupportWrapper(). This is a compatibility artifact to maintain usages of SupportSQLiteDatabase, usually obtained from roomDatabase.openHelper.writableDatabase, even if the Room database is configured with a SQLiteDriver. This wrapper is useful for incremental migration of codebases who wish to adopt SQLiteDriver APIs but have extensive usages of the SupportSQLite APIs yet they want to take advantage of the BundledSQLiteDriver. Checkout the migration guide for more information. Added support for KMP targets Watch OS and Tv OS. Updated the library's Android minSDK from API 21 to API 23

View originalPermalink
How 2.8.0 went
2.8.0-rc02

Version 2.8.0-rc02

Changed 2
  • Update the minSDK from API 21 to API 23
  • Update the minimum Android Gradle Plugin (AGP) version compatible with the Room Gradle Plugin from 8.1 to 8.4
Fixed 1
  • Fix an issue where a destructive migration was being performed even if a migration path was available for a pre-packaged database

From Room

Update the minSDK from API 21 to API 23 Update the minimum Android Gradle Plugin (AGP) version compatible with the Room Gradle Plugin from 8.1 to 8.4. Fix an issue where a destructive migration was being performed even if a migration path was available for a pre-packaged database.

View originalPermalink
How 2.8.0-rc02 went
2.8.0-rc01

Version 2.8.0-rc01

Fixed 1
  • Fix a race condition where Room Flows would not emit the latest query result in an asynchronous multi-query/write situation
Removed 1
  • Remove obsolete @RequiresApi(21) annotations

From Room

Removing obsolete @RequiresApi(21) annotations Fix a race condition where Room Flows would not emit the latest query result in an asynchronous multi-query/write situation.

View originalPermalink
How 2.8.0-rc01 went
2.8.0-beta01

Version 2.8.0-beta01

Table and view names are now escaped properly during destructive migrations.

View originalPermalink
How 2.8.0-beta01 went
2.8.0-alpha01

Version 2.8.0-alpha01

Added 2
  • New artifact androidx.room:room-sqlite-wrapper containing APIs to get a SupportSQLiteDatabase wrapper of RoomDatabase with a configured SQLiteDriver
  • New extension function RoomDatabase.getSupportWrapper() to obtain the SupportSQLiteDatabase wrapper

From Room

Added a new artifact androidx.room:room-sqlite-wrapper which contains APIs to get a SupportSQLiteDatabase wrapper of RoomDatabase with a configured SQLiteDriver. To get the wrapper use the new extension function RoomDatabase.getSupportWrapper(). This is a compatibility artifact to maintain usages of SupportSQLiteDatabase, usually obtained from RoomDatabase.openHelper.writableDatabase, even if the Room database is configured with a SQLiteDriver. This wrapper is useful for incremental migration of codebases who wish to adopt SQLiteDriver but have extensive usages of the SupportSQLite APIs yet they want to take advantage of the BundledSQLiteDriver.

View originalPermalink
How 2.8.0-alpha01 went
2.7.2

Version 2.7.2

Changed 1
  • No longer throw a SQLiteException when obtaining a connection takes too long, instead a log message will be sent by the library
Fixed 3
  • Fix an issue where annotation values would be incorrectly read when processing native sources with KSP, sometimes missing schema exports
  • Fix a bug where leading comments in a SQL would cause statements to be executed as if they were non-read queries
  • Fix an issue with Room's Gradle Plugin failing to configure due to the schema directory being empty

From Room

Fix an issue where annotation values would be incorrectly read when processing native sources with KSP, sometimes missing schema exports. (b/416549580) Fix a bug where leading comments in a SQL would cause statements to be executed as if they were non-read queries. (b/413061402) Fix an issue with Room's Gradle Plugin failing to configure due to the schema directory being empty. (b/417823384) No longer throw a SQLiteException when obtaining a connection takes too long, instead a log message will be sent by the library. Logging instead of throwing works around iOS suspending loopers causing Room to misinterpret the timeout that occurs in the Kotlin Coroutine acquiring the connection and thus preventing the exception from being thrown when an iOS app is backgrounded and later resumed in the middle of a database operation. (b/422448815)

View originalPermalink
How 2.7.2 went
2.7.1

Version 2.7.1

Added 1
  • Support RoomDatabase.runInTransaction() when a SQLiteDriver is configured with Room
Fixed 1
  • Fix IndexOutOfBoundsException bug during provided type converter validation

From Room

Fix IndexOutOfBoundsException bug during provided type converter validation. (b/409804755). Support RoomDatabase.runInTransaction() when a SQLiteDriver is configured with Room. (b/408364828).

View originalPermalink
How 2.7.1 went
2.7.0

Version 2.7.0

Added 3
  • Kotlin Multiplatform (KMP) support with Android, iOS, JVM (Desktop), native Mac and native Linux platforms
  • Room can be configured with an SQLiteDriver
  • Support for KSP2
Changed 2
  • Kotlin code generation on KSP is enabled by default when processing via KSP
  • Room now targets Kotlin language 2.0 and requires projects to compile with Kotlin 2.0 or higher

From Room

Kotlin Multiplatform (KMP) Support: In this release, Room has been refactored to become a Kotlin Multiplatform (KMP) library. Current supported platforms are Android, iOS, JVM (Desktop), native Mac and native Linux. For more information on how to get started using Room KMP, please refer to the official Room KMP documentation. As part of the KMP support, Room can also be configured with an SQLiteDriver, for information on how to migrate an existing app to the driver APIs and to Room KMP, see the migration documentation. Kotlin Code Generation on KSP has been turned ON by default if processing is done via KSP. For KAPT or Java only projects, Room will still generate Java sources. Kotlin 2.0 and KSP2: Room now targets Kotlin language 2.0 and will require projects to also compile with Kotlin 2.0 and equivalent or higher language version. Support for KSP2 is also added and is recommended when using Room with Kotlin 2.0 or higher.

View originalPermalink
How 2.7.0 went
2.7.0-rc03

Version 2.7.0-rc03

Changed 1
  • Re-implement Room's connection pool to alleviate SQLException timeout errors when attempting to acquire a reader connection
Fixed 1
  • No longer throw InterruptedException when a thread is interrupted during the execution of Room blocking APIs, including blocking DAO functions

From Room

No longer throw InterruptedExceptionwhen a thread is interrupted during the execution of Room blocking APIs, including blocking DAO functions (b/400584611). Re-implement Room's connection pool in an attempt to alleviate SQLException: Error code: 5, message: Timed out attempting to acquire a reader connection. and similar issues (b/380088809).

View originalPermalink
How 2.7.0-rc03 went
2.7.0-rc02

Version 2.7.0-rc02

Fixed 3
  • Auto Migrations incorrectly handling a new column on an FTS table
  • Room compiler crash due to a NullPointerException when processing non-JVM sources via KSP
  • Room would not invalidate tables at the end of using the writer connection

From Room

Fix Auto Migrations incorrectly handling a new column on an FTS table. (b/348227770, Ic53f3) Fix a room-compiler crash due to a NullPointerException when processing non-JVM sources via KSP. (b/396607230, I693c9) Fix an issue where Room would not invalidate tables at the end of using the writer connection. (b/340606803, I73ef6)

View originalPermalink
How 2.7.0-rc02 went
2.7.0-rc01

Version 2.7.0-rc01

Fixed 2
  • Fix an issue where Room would not be setting the busy_timeout in the initial database connection that would lead to SQLException: Error code: 5, message: database is locked issues
  • Fix an issue in Room's compiler that would cause the KSP processor to crash when processing native source sets such as iOS on Kotlin 2.1.x and KSP1

From Room

Fix an issue where Room would not be setting the busy_timeout in the initial database connection that would lead to SQLException: Error code: 5, message: database is locked issues (I93208, b/380088809). Fix an issue in Room's compiler that would cause the KSP processor to crash when processing native source sets (such as iOS) on Kotlin 2.1.x and KSP1 (I883b8, b/396607230).

View originalPermalink
How 2.7.0-rc01 went
2.7.0-beta01

Version 2.7.0-beta01

Fixed 3
  • Fix an issue with RoomDatabase.inTransaction() opening a closed database when it shouldn't and should quickly return false if the database is closed
  • Fix a crash (IllegalArgumentException: not a valid name) in Room's compiler when processing DAO functions with Kotlin inline / value classes
  • Include Proguard rules in the JVM artifact of room-runtime so that the default constructor of the generated database implementation is not removed since it is used by Room's default initialization that uses reflection

From Room

Fix an issue with RoomDatabase.inTransaction() opening a closed database when it shouldn't and should quickly return false if the database is closed (b/325432967). Fix a crash (IllegalArgumentException: not a valid name) in Room's compiler when processing DAO functions with Kotlin inline / value classes (b/388299754). Include Proguard rules in the JVM artifact of room-runtime so that the default constructor of the generated database implementation is not removed since it is used by Room's default initialization that uses reflection (b/392657750).

View originalPermalink
How 2.7.0-beta01 went
2.7.0-alpha13

Version 2.7.0-alpha13

Added 1
  • Add support for KSP2 in Room Gradle Plugin fixing an issue where the schema directory was not being properly set up by the plugin
Changed 1
  • Room now targets Kotlin language 2.0 and requires projects to compile with Kotlin 2.0 or equivalent or higher language version
Fixed 3
  • Fix an issue in Room KMP database builder when a simple name instead of a path was used in Android and the database file resolved path would not be located in the app's data directory
  • Fix an issue with the Room Gradle Plugin where configuring the schema inputs and output was causing a final property error on Android projects
  • Fix an issue with Room paging integration causing UI jumps when the initial key to refresh is too close to the end of the list

From Room

Room now targets Kotlin language 2.0 and will require projects to also compile with Kotlin 2.0 and equivalent or high language version. (I8efb0, b/315461431, b/384600605) Fix an issue in Room KMP database builder when a simple name instead of a path was used in Android and the database file resolved path would not be located in the app's data directory. (I83315, b/377830104) Fix an issue with the Room Gradle Plugin where configuring the schema inputs and output was causing an issue on Android projects: property 'inputDirectory' is final and cannot be changed any further. (1dbb4c, b/376071291) Add support for KSP2 in Room Gradle Plugin fixing an issue where the schema directory was not being properly set up by the plugin. (Iec3c4, b/379159770) Fix an issue with Room paging integration causing UI jumps when the initial key to refresh is too close to the end of the list. Thanks to Eva! (I2abbe, b/389729367)

View originalPermalink
How 2.7.0-alpha13 went
2.7.0-alpha12

Version 2.7.0-alpha12

Added 1
  • Add experimental API RoomDatabase.Builder.setInMemoryTrackingMode() to configure whether Room uses an in-memory table for invalidation tracking
Changed 1
  • Destructive migrations now drop views to ensure they are recreated, aligning behavior when allowDestructiveMigrationForAllTables is ON with the existing behavior when it is OFF

From Room

Add the experimental API RoomDatabase.Builder.setInMemoryTrackingMode() to configure whether Room will use an in-memory table or not for invalidation tracking. (I2a9b2, b/185414040) Destructive migrations now drop views to ensure they are recreated, aligning behavior when allowDestructiveMigrationForAllTables is ON (KMP default) with the existing behavior when it's OFF. (0a3e83, b/381518941)

View originalPermalink
How 2.7.0-alpha12 went
2.7.0-alpha11

Version 2.7.0-alpha11

Changed 1
  • convertRows() method signature is now a suspend function that receives a RawRoomQuery for room-paging
Fixed 1
  • Fixed invalid code generation in room-paging when using @Relation in conjunction with PagingSource

From Room

Revisit the newly added convertRows() method signature to be a suspend function that receives a RawRoomQuery for room-paging. (Ie57b5, b/369136627) Fixed the issue in room-paging where invalid code was being generated when using @Relation in conjunction with PagingSource.

View originalPermalink
How 2.7.0-alpha11 went
2.7.0-alpha10

Version 2.7.0-alpha10

Added 2
  • Create internal ByteArrayWrapper class to support Relations with ByteBuffer in non-Android and non-JVM platforms
  • Add SQLiteStatement.getColumnType() and various SQLITE_DATA_* result constants to enable retrieving the data type of a column

From Room

Create internal ByteArrayWrapper class to support Relations with ByteBuffer in non-Android & non-JVM platforms. (I75543, b/367205685) Add SQLiteStatement.getColumnType() along with the various SQLITE_DATA_* result constants to enable retrieving the data type of a column. (I1985c, b/369636251)

View originalPermalink
How 2.7.0-alpha10 went
2.7.0-alpha09

Version 2.7.0-alpha09

Fixed 1
  • Fix KMP implementation of room-paging that caused Error code: 8, message: attempt to write a readonly database due to starting a write transaction on a read connection

From Room

Fix an issue with the KMP implementation of room-paging that would cause an Error code: 8, message: attempt to write a readonly database due to starting a write transaction on a read connection. (b/368380988)

View originalPermalink
How 2.7.0-alpha09 went
2.7.0-alpha08

Version 2.7.0-alpha08

Added 1
  • Commonize invalidationTrackerFlow() API as InvalidationTracker.createFlow() and make it available for non-Android source sets in KMP projects
Changed 2
  • Migrate room-paging artifacts to be KMP compatible
  • Remove or replace all warnings and error messages in Room that use the word Cursor
Fixed 2
  • Fix issue where Room KMP would try to emit code using UUID for non-JVM platforms
  • Fix issue with the Room Gradle Plugin that would cause configuration mutation errors when used in KMP projects with Compose Multiplatform

From Room

The room-paging artifacts have been migrated to be KMP compatible. (Ib8756, b/339934824) The API invalidationTrackerFlow() has been commonized as a first-party API as InvalidationTracker.createFlow() and is now available for non-Android source sets in KMP projects. (I1fbfa, (I8fb29), b/329291639, b/329315924) All warnings and error messages in Room that use the word Cursor have been removed or replaced, as Cursor is no longer an accurate general term to use in the KMP version of Room. (Id8cd9, b/334087492) Fixed an issue where Room KMP would try to emit code using UUID for non-JVM platforms. (b/362994709) Fixed an issue with the Room Gradle Plugin that would cause an error such as 'Cannot change attributes of configuration … after it has been locked for mutation' when being used in a KMP project with Compose Multiplatform. (b/343408758)

View originalPermalink
How 2.7.0-alpha08 went
2.7.0-alpha07

Version 2.7.0-alpha07

Added 1
  • Room Gradle Plugin automatically adds exported schemas into Android Instrumentation Test resource sources for use by MigrationTestHelper
Fixed 2
  • Fixed generated 'actual' of RoomDatabaseConstructor missing 'actual' modifier in initialize function when overridden in 'expect' declaration
  • Fixed generated 'actual' of RoomDatabaseConstructor not matching visibility of 'expect' declaration

From Room

The Room Gradle Plugin will now automatically add the exported schemas into the Android Instrumentation Test resource sources so they can be used by the MigrationTestHelper. Fixed an issue with the generated 'actual' of the RoomDatabaseConstructor missing the 'actual' modifier in the initialize function if such function is also overridden in the 'expect' declaration. (359631627) Fixed an issue with the generated 'actual' of the RoomDatabaseConstructor not matching the visibility of the 'expect' declaration. (358138953)

View originalPermalink
How 2.7.0-alpha07 went
2.7.0-alpha06

Version 2.7.0-alpha06

Added 2
  • Add @ConstructedBy annotation to link a RoomDatabaseConstructor with @Database declarations
  • Add RoomDatabaseConstructor API for defining database constructors in KMP projects
Changed 1
  • Change instantiation setup for RoomDatabase in KMP projects to use @ConstructedBy annotation and RoomDatabaseConstructor instead of referencing instantiateImpl() function due to Kotlin 2.0 compilation model changes
Fixed 1
  • Fix Kotlin 2.0 compilation compatibility issues with RoomDatabase instantiation in KMP projects

From Room

Change the instantiation setup for a RoomDatabase in a KMP project. Due to Kotlin 2.0 compilation model, the strategy of referencing a to-be-generated function, named instantiateImpl() is longer viable. Two new APIs, @ConstructedBy and RoomDatabaseConstructor are introduced that replace the instantiateImpl() strategy. The new strategy is as follow: Define an expect object that implements RoomDatabaseConstructor expect object MyDatabaseCtor : RoomDatabaseConstructor Link the object with the @Database declaration using @ConstructedBy @Database (...) @ConstructedBy (MyDatabaseCtor : : class) // NEW abstract class MyDatabase : RoomDatabase Create a new database instance but without passing a factory argument fun createNewDatabase(path: String) = Room.databaseBuilder(name = path) .setDriver(BundledSQLiteDriver()) .setQueryCoroutineContext(Dispatchers.IO) .build() Fixes b/316978491, b/338446862, and b/342905180

View originalPermalink
How 2.7.0-alpha06 went
2.7.0-alpha05

Version 2.7.0-alpha05

Changed 1
  • Renamed SQLiteKt to SQLite and BundledSQLiteKt to BundledSQLite
Fixed 1
  • Fixed a bug where a RoomDatabase would deadlock or error out with a connection timeout when using the AndroidSQLiteDriver

From Room

Renamed SQLiteKt to SQLite and BundledSQLiteKt to BundledSQLite. ( I8b501) Fixed a bug where a RoomDatabase would deadlock or error out with a connection timeout when using the AndroidSQLiteDriver.

View originalPermalink
How 2.7.0-alpha05 went
2.7.0-alpha04

Version 2.7.0-alpha04

Fixed 3
  • Room's annotation processor no longer generates incompatible KMP code when a multi-map return type is defined in a DAO
  • Room now correctly finds the generated database implementation when the @Database annotated class has no package
  • Enabling auto-close and multi-instance invalidation no longer causes ConcurrentModificationException when the database is auto-closed due to being idle

From Room

Fixed an issue in Room's annotation processor would generate incompatible KMP code when a multi-map return type was defined in a DAO. ( b/340983093) Fixed an issue where Room would fail to find the generated database implementation if the @Database annotated class had no package. ( b/342097292) Fixed an issue where enabling auto-close and multi-instance invalidation would sometimes cause a ConcurrentModificationException when the database was auto-closed due to being idle.

View originalPermalink
How 2.7.0-alpha04 went
2.7.0-alpha03

Version 2.7.0-alpha03

Fixed 1
  • Fix various issues regarding Kotlin 2.0 and KSP 2.0

From Room

Fix various issues regarding Kotlin 2.0 and KSP 2.0. Note that Kotlin 2.0 with KSP 2 support is not complete and the team is working on the various APIs and behavior changes in the new compiler. ( b/314151707)

View originalPermalink
How 2.7.0-alpha03 went
2.7.0-alpha02

Version 2.7.0-alpha02

Fixed various KSP issues.

View originalPermalink
How 2.7.0-alpha02 went
2.7.0-alpha01

Version 2.7.0-alpha01

Added 6
  • Room has been refactored to support Kotlin Multiplatform (KMP) with majority of functionality made multiplatform, supporting Android, iOS, JVM (Desktop), native Mac, and native Linux
  • An overload of Room.databaseBuilder() has been added that takes a lambda parameter with a Room generated function to avoid using reflection when instantiating the generated RoomDatabase implementation
  • An API for configuring a Room with a CoroutineContext has been added via RoomDatabase.Builder.setQueryCoroutineContext
  • An API for configuring Room with a SQLite Driver has been added via RoomDatabase.Builder.setDriver()
  • APIs for accessing the underlying SQLiteConnection from driver APIs have been added: RoomDatabase.useReaderConnection and RoomDatabase.useWriterConnection
  • Room related callbacks now have overloaded versions that receive SQLiteConnection instead of SupportSQLiteDatabase: Migration.migrate(SQLiteConnection), AutoMigrationSpec.onPostMigrate(SQLiteConnection), RoomDatabase.Callback.onCreate(SQLiteConnection), RoomDatabase.Callback.onDestructiveMigration(SQLiteConnection), and RoomDatabase.Callback.onOpen(SQLiteConnection)
Changed 2
  • Kotlin Code Generation on KSP is now turned ON by default if processing is done via KSP, while KAPT or Java only projects will still generate Java sources
  • The KTX artifact androidx.room:room-ktx has been merged into androidx.room:room-runtime with all its APIs, and the artifact is now blank

From Room

Kotlin Multiplatform (KMP) Support: In this release, Room has been refactored to become a Kotlin Multiplatform (KMP) library. Although there is still some work to be done, this release introduces a new version of Room where the majority of the functionality has been "common-ized" (made to be multiplatform). Current supported platforms are Android, iOS, JVM (Desktop), native Mac and native Linux. Any missing functionality in the newly supported platforms will be made "feature-complete" in upcoming Room releases. For more information on how to get started using Room KMP, please refer to the official Room KMP documentation. Kotlin Code Generation on KSP has been turned ON by default if processing is done via KSP. For KAPT or Java only projects, Room will still generate Java sources. An overload of Room.databaseBuilder() has been added that takes a lambda parameter that is meant to be used with a Room generated function to avoid using reflection when instantiating the generated RoomDatabase implementation. Example usage is: Room . databaseBuilder ( context = appContext , name = dbFilePath , factory = { MyDatabase :: class . instantiateImpl () } ) An API for configuring a Room with a CoroutineContext has been added to the builder: RoomDatabase.Builder.setQueryCoroutineContext. Note that a RoomDatabase can only be configured with either executors using setQueryExecutor or with a Coroutine context but not both. An API for configuring Room with a SQLite Driver has been added: RoomDatabase.Builder.setDriver(). For more information about the SQLite Driver API refer to the SQLite KMP documentation APIs for accessing the underlying SQLiteConnection from driver APIs have been added: RoomDatabase.useReaderConnection and RoomDatabase.useWriterConnection. Varios Room related callbacks now have an overloaded version that receive SQLiteConnection instead of SupportSQLiteDatabase. These are intended to be overridden when migrating to a KMP project. For more information about migrating Room usages in an Android app to a common KMP module refer to the migration guide. The callbacks are: Migration.migrate(SQLiteConnection) AutoMigrationSpec.onPostMigrate(SQLiteConnection) RoomDatabase.Callback.onCreate(SQLiteConnection) RoomDatabase.Callback.onDestructiveMigration(SQLiteConnection) RoomDatabase.Callback.onOpen(SQLiteConnection) The KTX artifact androidx.room:room-ktx has been merged to androidx.room:room-runtime along with all its APIs, the artifact is now blank. Please remove it from your dependency list.

View originalPermalink
How 2.7.0-alpha01 went
2.6.1

Version 2.6.1

Changed 1
  • Exceptions thrown from PagingSource loads are now propagated as a LoadStateUpdate of LoadResult.Error containing the Throwable, observable through PagingDataAdapter.loadStateFlow(Views) or LazyPagingItems.loadState(Compose)
Fixed 1
  • Resolved issue in generated code where the default value for Double columns in EntityCursorConverter was being set to 0 instead of 0.0, with a potential fix for a similar edge-case for Float type columns

From Room

Resolved issue in generated code where the default value for Double columns in EntityCursorConverter was being set to 0 instead of 0.0. A potential fix for a similar edge-case for Float type columns has also been included. ( Id75f5, b/304584179) Exceptions thrown from PagingSource loads will now be propagated as a LoadStateUpdate of LoadResult.Error containing the Throwable. This error state is observable through PagingDataAdapter.loadStateFlow(Views) or LazyPagingItems.loadState(Compose). Note that this marks a behavioral change where in the past load errors will bubble up as an Exception thrown by the dao method that triggered the load. ( I93887, b/302708983)

View originalPermalink
How 2.6.1 went
2.6.0

Version 2.6.0

Added 4
  • Enable Kotlin code generation in Room KSP by adding the room.generateKotlin option to KSP processor options
  • New Room Gradle Plugin artifact with id androidx.room to handle schema inputs and outputs via Gradle annotation processor options
  • Support for value classes in Room Entities for KSP
  • Support for nested Map return types in DAO functions
Changed 3
  • Abstract properties as DAO getters or DAO queries in Kotlin CodeGen are now disallowed and must be rewritten as functions
  • Nullable collection return types are no longer allowed in Room for Kotlin CodeGen
  • Kotlin CodeGen enforces stricter nullability checking of type arguments compared to Java CodeGen

From Room

The option to enable Kotlin code generation (or "Kotlin CodeGen") is now available in Room KSP. ( 4297ec0). To turn on Kotlin CodeGen in Room, add the room.generateKotlin option name to your processor options for KSP. For more details on how to pass processor options for KSP, see the KSP documentation. Note: When using Kotlin CodeGen, it is important to note that there are additional restrictions that have been added. Abstract properties as DAO getters or DAO queries in Kotlin CodeGen are disallowed, and instead expected to be rewritten as functions to avoid the false notion that the property value is immutable and has a fixed stored result. Another restriction that has been added is that Nullable collection return types are no longer allowed in Room for Kotlin CodeGen. Warning: You may find that your projects are more strict in terms of nullability when using Kotlin CodeGen. In Kotlin CodeGen, the nullability of type arguments is important, wheras in Java this is mostly ignored. For example, let's say you have a Flow return type and the table is empty. In Java CodeGen, this will not cause any issues, but in Kotlin CodeGen, you will get an error. To avoid this, you will need to use Flow , assuming a null is emitted. The new artifact for the Room Gradle Plugin has been added to Room with the id androidx.room, which solves various existing issues in Room regarding having inputs and outputs of schemas via Gradle annotation processor options. For more details, refer to the Room Version 2.6.0-alpha02 release notes. Value classes in Room Entities are now supported for KSP. ( 4194095) Nested Map return types in DAO functions are now supported in Room. ( I13f48, 203008711)

View originalPermalink
How 2.6.0 went
2.6.0-beta01

Version 2.6.0-beta01

Fixed 1
  • Handle SQLite SQLITE_CONSTRAINT_UNIQUE exception during upsert to perform an update instead of failing

From Room

Handling the special case SQLite exception during upsert encountered when the 2067 SQLITE_CONSTRAINT_UNIQUE exception is thrown during an upsert, upsert should perform an update. ( If2849, b/243039555)

View originalPermalink
How 2.6.0-beta01 went
2.6.0-alpha03

Version 2.6.0-alpha03

Added 2
  • Nested Map return types in DAO functions are now supported
  • A new @MapColumn type annotation has been created to specify column names for Map key and value types in DAO function return types
Changed 1
  • Room Gradle plugin APIs have been updated to not always require per-variant configurations and accept a global location for all variants
Fixed 2
  • Fixed potential memory leak vulnerability in QueryInterceptorStatement
  • Fixed incorrect behavior in the QueryInterceptorDatabase execSQL() function
Deprecated 1
  • @MapInfo annotation is now deprecated in favor of @MapColumn

From Room

Nested Map return types in DAO functions are now supported in Room. ( I13f48, 203008711) A new type annotation called @MapColumn has been created to replace @MapInfo, which is now deprecated. For each column name ( keyColumnName, valueColumnName, or both) provided in a @MapInfo annotation, you will need to declare a @MapColumn annotation with just the columnName and use the annotation on the specific type argument that is being referenced (the key or value of the Map) in the return type of the DAO function. This is because the @MapColumn annotation is used directly on the type argument within the return type of a DAO function, instead of on the function itself like @MapInfo. For more information, please refer to the @MapColumn documentation. ( Ib0305, b/203008711) Updated API files to annotate compatibility suppression ( I8e87a, b/287516207) The Room Gradle plugin APIs have been updated to not always require per-variant configurations. This means that the plugin can accept a global location for all variants without creating multiple directories, enabling smoother migrations that but is also flexible enough to manually configure flavors or build type schemas while still retaining the benefits of the plugin (reproducible and cacheable builds). ( I09d6f, b/278266663) Fixed potential memory leak vulnerability in QueryInterceptorStatement. ( I193d1) Fixed incorrect behavior in the QueryInterceptorDatabase execSQL() function. ( Iefdc8)

View originalPermalink
How 2.6.0-alpha03 went
2.5.2

Version 2.5.2

Fixed 2
  • Fix an incompatibility issue with the kotlinx-metadata-jvm
  • Fix an issue that causes Room to throw an error when being used in a Robolectric test

From Room

Fix an incompatibility issue with the kotlinx-metadata-jvm. ( 386d5c) Fix an issue that causes Room to throw an error when being used in a Robolectric test. ( f79bea, b/274924903)

View originalPermalink
How 2.5.2 went
2.6.0-alpha02

Version 2.6.0-alpha02

Added 3
  • New Room Gradle Plugin artifact with id androidx.room that configures schema inputs and outputs via Gradle annotation processor options
  • Room Gradle Plugin configures generated schemas for auto-migrations to support reproducible and cacheable builds
  • Room Gradle Plugin offers a DSL to configure the base schema location

From Room

This new release contains a new artifact for the Room Gradle Plugin with id androidx.room, which solves various existing issues in Room regarding having inputs and outputs of schemas via Gradle annotation processor options. The Room Gradle Plugin configures the project such that generated schemas that are consumed for auto-migrations and are output of the compile tasks are correctly configured to have reproducible and cacheable builds. The plugin offers a DSL to configure the base schema location:

View originalPermalink
How 2.6.0-alpha02 went
2.6.0-alpha01

Version 2.6.0-alpha01

Added 3
  • Support value classes in Room for KSP
  • Enable Kotlin code generation in Room by adding the room.generateKotlin option to processor options for KSP
  • Add an API for creating a Flow that emits invalidation tracker changes
Changed 1
  • Guard against meaningless usage of nullable collections in DAO method return types
Fixed 1
  • Disallow abstract properties as DAO getters or DAO queries in Kotlin codegen to avoid the false notion that property values are immutable and have fixed stored results
Removed 1
  • Nullable collection return types are no longer allowed in Room for Kotlin CodeGen

From Room

Supporting value classes in Room for KSP. Room is now able to support value classes in Entities. ( 4194095) Kotlin code generation(or "Kotlin CodeGen") can now be enabled in Room ( 4297ec0). To turn on Kotlin CodeGen in Room, add the room.generateKotlin option name to your processor options for KSP. For more details on how to pass processor options for KSP, see the KSP documentation. Note: When using Kotlin CodeGen, it is important to note that there are additional restrictions that have been added. Abstract properties as DAO getters or DAO queries in Kotlin CodeGen are disallowed, and instead expected to be rewritten as functions to avoid the false notion that the property value is immutable and has a fixed stored result. Another restriction that has been added is that Nullable collection return types are no longer allowed in Room for Kotlin CodeGen. Warning: You may find that your projects are more strict in terms of nullability when using Kotlin CodeGen. In Kotlin CodeGen, the nullability of type arguments is important, wheras in Java this is mostly ignored. For example, let's say you have a Flow return type and the table is empty. In Java CodeGen, this will not cause any issues, but in Kotlin CodeGen, you will get an error. To avoid this, you will need to use Flow , assuming a null is emitted. Guarding against meaningless usage of nullable collections in DAO method return types. ( I777dc, b/253271782, b/259426907) Add an API for creating a Flow that emits invalidation tracker changes. The API is useful for creating streams that need to react to database changes. ( I8c790, b/252899305) Disallow abstract properties as DAO getters or DAO queries in Kotlin codegen, instead they should be rewritten as functions to avoid the false notion that the property value is immutable and has a fixed stored result. ( If6a13, b/127483380, b/257967987)

View originalPermalink
How 2.6.0-alpha01 went
2.5.1

Version 2.5.1

Changed 2
  • Use an isOpenInternal check when checking if the database is already open
  • Better handling of the reentrant case in acquireTransactionThread() by refactoring withTransaction() to no longer rely on a control job and instead execute the suspending transaction block from within the runBlocking in the transaction thread
Fixed 1
  • Avoid checking the database parent directory in FrameworkSQLiteHelper if the database is already open

From Room

Avoid checking the database parent directory in FrameworkSQLiteHelper if the database is already open. ( 5de86b8) Use an isOpenInternal check when checking if the database is already open. ( e91fb35) Better handling of the reentrant case in acquireTransactionThread() of Room is now available. ( 219f98b). During a suspending transaction, Room uses a thread from the transaction executor, starts an event loop in it and dispatches suspending database operations to it so they are all encapsulated within the transaction coroutine. It is usually expected that the transaction thread is different from the one starting the transaction, but in some cases they are the same. To handle such reentrant cases the withTransaction() has been refactored to no longer rely on a control job and instead it will execute the suspending transaction block from within the runBlocking in the transaction thread.

View originalPermalink
How 2.5.1 went
2.5.0

Version 2.5.0

Added 3
  • Added @Upsert shortcut annotation to attempt inserting an entity on uniqueness conflict or updating the entity if a conflict exists
  • Added new room-paging artifacts room-paging-rxjava2, room-paging-rxjava3, and room-paging-guava for support in Room Paging
  • Added APIs for providing key and value table names for disambiguation in @MapInfo
Changed 1
  • Converted all room-runtime sources from Java to Kotlin, which may cause source incompatibility issues in Kotlin code such as requiring Set instead of MutableSet in InvalidationTracker Observer and property access syntax instead of getter methods

From Room

All of room-runtime sources has been converted from Java to Kotlin. Note that you may encounter source incompatibility issues if your code is in Kotlin due to the library conversion to Kotlin. For example, a known source incompatible change is that in InvalidationTracker you will now need to declare onInvalidate() in Observer to have a param of type Set and not MutableSet. Moreover, certain getter methods were converted to properties requiring the property access syntax on Kotlin files. Please file a bug if there are any significant incompatibilities. Added a new shortcut annotation, @Upsert, which attempts to insert an entity when there is no uniqueness conflict or update the entity if there is a conflict. ( I7aaab, b/241964353) New room-paging artifacts room-paging-rxjava2, room-paging-rxjava3 and room-paging-guava have been added for support in Room Paging. Added APIs for providing key and value tables names for disambiguation in @MapInfo ( Icc4b5)

View originalPermalink
How 2.5.0 went
2.5.0-rc01

Version 2.5.0-rc01

This release is identical to 2.5.0-beta02.

View originalPermalink
How 2.5.0-rc01 went
2.5.0-beta02

Version 2.5.0-beta02

Fixed 1
  • Fix various APIs that take query arguments from invariant Array<Any?> to contravariant Array<out Any?> to match Java's array behavior

From Room

Fix various APIs that take query arguments from invariant ( Array<Any?>) to contravariant ( Array<out Any?>) to match Java's array behavior. ( b/253531073)

View originalPermalink
How 2.5.0-beta02 went
2.5.0-beta01

Version 2.5.0-beta01

Changed 1
  • Restrict the minimum version that supports @Upsert to be API 16 due to the inability to identify a primary key constraint conflict in older APIs
Fixed 1
  • Fixed an issue where shadow tables were incorrectly exported to the schema .json files, corrupting them

From Room

Restrict the minimum version that supports @Upsert to be API 16. This is due to the inability to identity a primary key constraint conflict in older APIs. ( I5f67f, b/243039555) Fixed an issue where shadow tables where incorrectly exported to the schema .json files, corrupting them. ( I4f83b, b/246751839)

View originalPermalink
How 2.5.0-beta01 went
2.5.0-alpha03

Version 2.5.0-alpha03

Added 1
  • New @Upsert shortcut annotation that attempts to insert an entity when there is no uniqueness conflict or update the entity if there is a conflict
Changed 1
  • Room now throws SQLiteConstraintException instead of IllegalStateException during an auto-migration foreign key constraint check
Fixed 1
  • Fix Kotlin source incompatible change for getter properties of getOpenHelper, getQueryExecutor and getTransactionExecutor

From Room

Added a new shortcut annotation, @Upsert, which attempts to insert an entity when there is no uniqueness conflict or update the entity if there is a conflict. ( I7aaab, b/241964353) Room will now throw a SQLiteConstraintException instead of a IllegalStateException during an auto-migration foreign key constraint check. ( I328dd) Fix a Kotlin source incompatible change for getter / properties of getOpenHelper, getQueryExecutor and getTransactionExecutor. ( Iad0ac)

View originalPermalink
How 2.5.0-alpha03 went
2.4.3

Version 2.4.3

Fixed 1
  • Room now recognizes suspend functions in Kotlin 1.7

From Room

Fixed an issue that would cause Room to not recognize suspend functions in Kotlin 1.7 ( b/236612358)

View originalPermalink
How 2.4.3 went
2.5.0-alpha02

Version 2.5.0-alpha02

Added 2
  • New room-paging artifacts room-paging-rxjava2, room-paging-rxjava3 and room-paging-guava for support in Room Paging
  • Added APIs for providing key and value tables names for disambiguation in @MapInfo
Changed 3
  • All of room-runtime has been converted from Java to Kotlin
  • InvalidationTracker Observer onInvalidate() parameter type changed from MutableSet to Set
  • Room now attempts to resolve ambiguous columns in a multimap query to correctly map JOINs with same-name tables to a result data object
Fixed 1
  • Re-allow @Ignore in property getters

From Room

New room-paging artifacts room-paging-rxjava2, room-paging-rxjava3 and room-paging-guavahave been added for support in Room Paging.( 41a1d4, b/203666906),( eb6098, b/203666906),( 1b9ae4, b/203666906) All of room-runtime has been converted from Java to Kotlin. ( If2069, b/206859668),( Ie4b55, b/206859668), ( I697ee, b/206859668), ( I96c25, b/206859668) Note: You may encounter source incompatibility issues due to the library conversion to Kotlin. If your code was in Kotlin and calling the old version of Room, the new version will need to handle these cases. For example, a known source incompatible change is that in InvalidationTracker you will now need to declare onInvalidate() in Observer to have a param of type Set and not MutableSet. Added APIs for providing key and value tables names for disambiguation in @MapInfo ( Icc4b5) Fix a source compatibility issue to re-allow @Ignore in property getters. ( Ifc2fb) Duplicate column resolution heuristic algorithm. Room will now attempt to resolve ambiguous columns in a multimap query. This allows for JOINs with tables containing same-name tables to be correctly mapped to a result data object. ( I4b444, b/201306012, b/212279118)

View originalPermalink
How 2.5.0-alpha02 went
2.5.0-alpha01

Version 2.5.0-alpha01

Added 2
  • Added API for multi-process lock and usage at the FrameworkSQLite* level to protect multi-process first time database creation and migrations
  • Added support for internal properties in Kotlin sources
Changed 3
  • Converted room-common from Java to Kotlin
  • Converted room-migration from Java to Kotlin
  • Converted paging related files in room-runtime from Java to Kotlin
Fixed 2
  • Fixed an issue where Room @IntDef usage were not being enforced in Kotlin sources
  • Fixed a source compatibility issue to re-allow @Query in property getters

From Room

Fixed an issue where Room @IntDef usage were not being enforced in Kotlin sources. ( I75f41, b/217951311) Fixed a source compatibility issue to re-allow @Query in property getters. ( I0a09b) Converted room-common from Java to Kotlin. ( I69c48, b/206858235) Note: You may encounter source incompatibility issues as some properties have been moved into companion objects during the library conversion to Kotlin. If your code was in Kotlin and calling the old version of Room, the new version will need the ".Companion" suffix when accessing these properties. Converted room-migration from Java to Kotlin. ( I2724b, b/206858622) Converted paging related files in room-runtime from Java to Kotlin. ( I82fc8, b/206859668) Added API for multi-process lock and usage at the FrameworkSQLite* level, to protect multi-process 1st time database creation and migrations. ( Ied267, b/193182592) Added support for internal properties in Kotlin sources. This is a slight behavior change in Room where it will use the source name of functions while matching them to properties as getters/setters (previously, it was using JVM name of the function which is different for internal functions/properties). If you are using custom @JvmName annotations to match getters/setters to private properties, please double check the generated code after the update ( If6531, b/205289020)

View originalPermalink
How 2.5.0-alpha01 went
2.4.1

Version 2.4.1

Added 1
  • Support for internal properties in Kotlin sources
Changed 1
  • Room now uses the source name of functions while matching them to properties as getters/setters instead of the JVM name, which affects internal functions and properties

From Room

Added support for internal properties in Kotlin sources. This is a slight behavior change in Room where it will use the source name of functions while matching them to properties as getters/setters (previously, it was using JVM name of the function which is different for internal functions/properties). If you are using custom @JvmName annotations to match getters/setters to private properties, please double check the generated code after the update

View originalPermalink
How 2.4.1 went
2.4.0

Version 2.4.0

Added 5
  • Auto Migrations API for automatically generating migrations when schemas are exported, declared via @Database#autoMigrations property
  • @AutoMigration annotation to declare a specification class containing table and column rename or delete information
  • @ProvidedAutoMigrationSpec API for declaring that an AutoMigrationSpec will be provided at runtime via RoomDatabase.Builder#addAutoMigrationSpec()
  • room-paging library providing native Paging 3.0 support for Room queries returning androidx.paging.PagingSource
  • Multimap return types support in @Dao methods for JOIN statements, including Map, SparseArray, LongSparseArray, and Guava's ImmutableMap, ImmutableSetMultimap, and ImmutableListMultimap
Changed 1
  • MigrationTestHelper now supports auto migrations with a new constructor API that receives the database class under test

From Room

Auto Migrations: Room now offers an API for automatically generating migrations as long as schemas are exported. To let Room know that it should generate an auto-migration a new property @Database#autoMigrations can be used to declare the versions to auto-migrate from and to. When Room needs additional information regarding tables and column renames or deletes, then the @AutoMigration annotation can declare a specification class containing such inputs. Dependency Injection in Auto Migrations: @ProvidedAutoMigrationSpec is a new API for declaring that an AutoMigrationSpec will be provided at runtime via RoomDatabase.Builder#addAutoMigrationSpec(). This allows for a dependency injection framework to provide such specs when they need complex dependencies. Migration Test Helper Support for Auto Migrations: Room's MigrationTestHelper was updated to support auto migrations by providing a new constructor API that receives the database class under test. This allows the helper to automatically add auto migrations the same way during runMigrationsAndValidate. Room-Paging Support: androidx.room:room-paging is released, providing native Paging 3.0 support for Room queries returning androidx.paging.PagingSource. Relational Query Methods: Room now supports multimap return types @Dao methods, useful for JOIN statements. The supported types of multimaps are Map, SparseArray, LongSparseArray, along with Guava's ImmutableMap, ImmutableSetMultimap and ImmutableListMultimap.

View originalPermalink
How 2.4.0 went
2.4.0-rc01

Version 2.4.0-rc01

Update Room's dependency on KSP to 1.6.0-1.0.1 to support Kotlin 1.6

View originalPermalink
How 2.4.0-rc01 went
2.4.0-beta02

Version 2.4.0-beta02

Added 2
  • Add support for SparseArray and LongSparseArray in @MapInfo
  • Add a new TypeConverter analyzer that takes nullability information in types into account, enabled by default in KSP
Fixed 4
  • Fix a bug where Room would fail to compile with a SQL error when an FTS entity declared to use the ICU tokenizer
  • Resolve issue in auto migrations regarding a new column added to an embedded Entity between versions
  • Resolve an issue regarding the relational query method return types in LEFT JOIN queries where invalid value objects are no longer included in collections when not found in the cursor
  • Resolve the auto migration issue where SQLite keywords failed to be escaped in column names

From Room

We've added support for SparseArray and LongSparseArray in @MapInfo. We've added a new TypeConverter analyzer that takes nullability information in types into account. As this information is only available in KSP, it is turned on by default only in KSP. If it causes any issues, you can turn it off by passing room.useNullAwareTypeAnalysis=false to the annotation processor. If that happens, please a file bug as this flag will be removed in the future. With this new TypeConverter analyzer, it is suggested to only provide non-null receiving TypeConverters as the new analyzer has the ability to wrap them with a null check. Note that this has no impact for users using KAPT or Java as the annotation processors (unlike KSP), don't have nullability information in types. Fix a bug where Room would fail to compile with a SQL error when an FTS entity declared to use the ICU tokenizer. Resolved issue in auto migrations regarding a new column added to an embedded Entity between versions. We have resolved an issue regarding the relational query method return types in LEFT JOIN queries. With these changes, in the case where a 1-many mapping is present, the collection returned for a key will not include the invalid value object if it is not found in the cursor. If no valid values are found, then a key will be mapped to an empty collection. Resolved the auto migration issue where SQLite keywords failed to be escaped in column names.

View originalPermalink
How 2.4.0-beta02 went
2.4.0-beta01

Version 2.4.0-beta01

Changed 1
  • PagingSource implementation generated by room-paging now uses the queryExecutor passed through RoomDatabase.Builder instead of Dispatchers.IO
Fixed 1
  • Fix auto-migrations not adding new columns when another table in the same auto-migration also had a new column with the same name

From Room

Fixed an issue with auto-migrations not adding new columns when another table in the same auto-migration also had a new column with the same name. The PagingSource implementation generated by room-paging now uses the queryExecutor passed through RoomDatabase.Builder, so it can be overridden, instead of Dispatchers.IO previously.

View originalPermalink
How 2.4.0-beta01 went
2.4.0-alpha05

Version 2.4.0-alpha05

Added 4
  • Built-in type converter for UUID
  • New property to the TypeConverters annotation to let developers disable built-in Enum and UUID converters
  • Support for non-POJO keys/values for Multimap return types in DAOs via the @MapInfo annotation
  • New API to specify index order in @Index
Changed 2
  • @MapInfo is now required when the key or value column of the map are from a single column
  • room-paging is now a required artifact when using Paging3 with Room
Fixed 1
  • Multimap queries results are now correctly ordered when the query contains an ORDER BY clause of a column from the map's key

From Room

Added a built-in type converter for UUID. Added a new property to the TypeConverters annotation to let developers disable built-in Enum and UUID converters. By default, these converters are on but you can disable them for a certain scope, or for the whole database. Supporting non-POJO keys/values for Multimap return types in DAOs via the @MapInfo annotation. @MapInfo will be required when the key or value column of the map are from a single column. Make room-paging a required artifact when using Paging3 with Room. Fix an issue where multimap queries results were not correctly ordered when the query contained an ORDER BY clause of a column from the map's key. Added new API to specify index order in @Index.

View originalPermalink
How 2.4.0-alpha05 went
2.4.0-alpha04

Version 2.4.0-alpha04

Added 2
  • Support multimap return types in @Dao methods for JOIN statements, including Map, Guava's ImmutableMap, ImmutableSetMultimap, and ImmutableListMultimap
  • Release androidx.room:room-paging artifact with native Paging 3.0 support for Room queries returning androidx.paging.PagingSource
Fixed 1
  • Fix an issue in auto migrations regarding handling foreign key violations

From Room

Room now supports multimap return types @Dao methods, useful for JOIN statements. The supported types of multimaps are Map along with Guava's ImmutableMap, ImmutableSetMultimap and ImmutableListMultimap. androidx.room:room-paging is released, providing native Paging 3.0 support for Room queries returning androidx.paging.PagingSource. Fix an issue in auto migrations regarding handling foreign key violations.

View originalPermalink
How 2.4.0-alpha04 went
2.4.0-alpha03

Version 2.4.0-alpha03

Added 1
  • Add new constructor API to MigrationTestHelper that receives the database class under test to support auto migrations during runMigrationsAndValidate
Changed 1
  • Update KSP support to depend on KSP 1.5.10-1.0.0-beta01
Fixed 3
  • Fix SQLite native library support for Apple's M1 chips
  • Fix Room to error out when the return type of a @Transaction function is a Flow
  • Fix an issue in auto migrations regarding indices

From Room

Update Room's MigrationTestHelper to support auto migrations by providing a new constructor API that receives the database class under test. This allows the helper to automatically add auto migrations the same way during runMigrationsAndValidate. Fixed an issue with Room's SQLite native library to support Apple's M1 chips. Fixed an issue where Room would not error out when the return type of a @Transaction function was a Flow Fix an issue in auto migrations regarding indices. Room's KSP support now depends on KSP 1.5.10-1.0.0-beta01.

View originalPermalink
How 2.4.0-alpha03 went
2.4.0-alpha02

Version 2.4.0-alpha02

Added 1
  • Add @ProvidedAutoMigrationSpec API for declaring that an AutoMigrationSpec will be provided at runtime via RoomDatabase.Builder#addAutoMigrationSpec()
Fixed 2
  • Fix an issue with auto migrations where @DatabaseViews were not being properly re-created
  • Fix an issue in Room's JournalMode.TRUNCATE where the InvalidationTracker callback was sometimes being invoked invalidly, too late, or not at all

From Room

@ProvidedAutoMigrationSpec is a new API for declaring that an AutoMigrationSpec will be provided at runtime via RoomDatabase.Builder#addAutoMigrationSpec(). This allows for a dependency injection framework to provide such specs when they need complex dependencies. Fix an issue with auto migrations where @DatabaseViews where not being properly re-created. Fix an issue in Room's JournalMode.TRUNCATE where the InvalidationTracker callback was sometimes being invoked invalidly, too late, or not at all.

View originalPermalink
How 2.4.0-alpha02 went
2.3.0

Version 2.3.0

Added 9
  • Enum to String and vice versa type converter is now applied by default if no type converter is provided
  • Add RoomDatabase.QueryCallback API for logging when queries are about to execute
  • Add RoomDatabase.setQueryCallback() method to set query callbacks
  • Add APIs for creating a database using a pre-packaged database read from an input stream, including support for gzipped databases
  • Add @ProvidedTypeConverter annotation to mark type converters that will be provided to Room
  • Add APIs for providing instances of type converters to allow app control over their initialization

From Room

Built-in Enum Support: Room will now default to using an Enum to String and vice versa type converter if none is provided. If a type converter for an enum already exists, Room will prioritize using it over the default one. Query Callback: Room now offers a general callback API RoomDatabase.QueryCallback, for when queries are about to execute, which can be useful for logging in debug builds. The callback can be set via RoomDatabase.Builder#setQueryCallback(). Pre-packaged Improvement: Room now has APIs for creating a database using a pre-packaged database read from an input stream. This allows for cases such as when the pre-package database is gzipped. Provided Type Converters: Room now has APIs for providing instances of type converters such that the app can control their initialization. To mark a type converter that will be provided to Room use the new annotation @ProvidedTypeConverter. RxJava3 Support: Room now supports RxJava3 types. Similar to RxJava2 you can declare DAO methods whose return type are Flowable, Single, Maybe and Completable. Additionally a new artifact androidx.room:room-rxjava3 is available to support RxJava3. Paging 3.0 Support: Room will now support generating implementations for @Query annotated methods whose return type is androidx.paging.PagingSource.

View originalPermalink
How 2.3.0 went
2.3.0-rc01

Version 2.3.0-rc01

Fixed 1
  • Coroutine Flow queries created by Room can now be consumed in a suspending withTransaction block

From Room

Fix an issue that prevented Coroutine Flow queries created by Room to be consumed in a suspending withTransaction block. ( I797bf)

View originalPermalink
How 2.3.0-rc01 went
2.3.0-beta03

Version 2.3.0-beta03

Added 2
  • Add incremental compilation support for KSP
  • Allow Room to accept a POJO return type in a @Query annotated DAO method when it is also annotated with @SkipQueryVerification, with best-effort conversion the same way as @RawQuery annotated DAO methods
Fixed 2
  • Fix a bug where creating PagingSource on the main thread could trigger an ANR
  • Fix @ExperimentalRoomApi visibility to be public instead of package private

From Room

Added incremental compilation support for KSP. ( I031c1, b/176453350) Fixed a bug where creating PagingSource on the main thread could trigger an ANR. ( I42b74, b/181221318) Fixed @ExperimentalRoomApi visibility to be public instead of package private. ( b/181356119) Allow Room to accept a POJO return type in a @Query annotated DAO method when it is also annotated with @SkipQueryVerification. Room will do a best-effort to convert the result of the query to the POJO return type the same way it is done for a @RawQuery annotated DAO method. Thanks to 'Markus Riegel | hey@marcorei.com'. ( I45acb)

View originalPermalink
How 2.3.0-beta03 went
2.3.0-beta02

Version 2.3.0-beta02

Added 1
  • Experimental support for Kotlin Symbol Processing KSP as a replacement for KAPT to run annotation processors natively on the Kotlin compiler

From Room

Room now has experimental support for Kotlin Symbol Processing KSP. KSP is a replacement for KAPT to run annotation processors natively on the Kotlin compiler, significantly reducing build times. To use Room with KSP, you can apply the KSP Gradle plugin and replace the kapt configuration in your build file with ksp. For example, instead of kapt 'androidx.room:room-compiler:2.3.0-beta02' use ksp 'androidx.room:room-compiler:2.3.0-beta02'. See the KSP documentation for more details. Note that since KSP is experimental, it is recommended to still use KAPT for production code. The reduction of build times is only applicable if there are no other processors that use KAPT. See b/160322705 for known issues.

View originalPermalink
How 2.3.0-beta02 went
2.3.0-beta01

Version 2.3.0-beta01

Added 1
  • Add auto-closable databases that close when not accessed after a specified timeout, enabled via RoomDatabase.Builder#setAutoCloseTimeout()
Fixed 1
  • Fix Dao methods with multiple @Update or @Delete annotations with different conflict strategies to correctly generate code respecting all defined strategies

From Room

Auto Closable Databases: Room now has the ability to close databases that are not accessed after a given amount of time. This is an experimental feature and can be enabled by calling RoomDatabase.Builder#setAutoCloseTimeout(). This feature is useful for applications with multiple databases. Fix an issue where Dao methods with multiple @Update or @Delete methods with different conflict strategies would generate code with only one of the strategies, effectively ignoring the defined one. ( /I0b90d, b/176138543)

View originalPermalink
How 2.3.0-beta01 went
2.3.0-alpha04

Version 2.3.0-alpha04

Added 2
  • Add a general callback API RoomDatabase.QueryCallback for when queries are about to execute, settable via RoomDatabase.Builder#setQueryCallback()
  • Default to using an Enum to String and vice versa type converter if none is provided
Changed 2
  • Prioritize existing type converters for enums over the default Enum to String converter
  • Default to using beginTransactionNonExclusive if WAL mode is enabled and API is 16 or more
Fixed 3
  • Fix an issue where Room would incorrectly disable incremental annotation processing in newer JDK versions
  • Fix an issue with Room finding the generated class when multiple class loaders are used
  • Fix an issue where Room would generate incorrect code when a Kotlin @Dao had a base class whose generics are primitives in the JVM

From Room

Room now offers a general callback API RoomDatabase.QueryCallback, for when queries are about to execute, which can be useful for logging in debug builds. The callback can be set via RoomDatabase.Builder#setQueryCallback(). ( Iaa513, b/174478034, b/74877608) Room will now default to using an Enum to String and vice versa type converter if none is provided. If a type converter for an enum already exists, Room will prioritize using it over the default one. ( b/73132006) If a one-way type converter for reading already exists for the Enum, Room might accidentally use the built-in String to Enum converter which might not be desired. This is a known issue and can be fixed by making it a two-way converter. See: b/175707691 Fixed an issue where Room would incorrectly disabled incremental annotation processing in newer JDK versions. ( b/171387388) Fixed an issue with Room finding the generated class when multiple class loaders are used. Thanks for the fix 'Serendipity | 892449346@qq.com'! ( b/170141113) Fixed an issue where Room would generate incorrect code when a Kotlin @Dao had a base class whose generics are primitives in the JVM. ( b/160258066) Room will now default to using beginTransactionNonExclusive if WAL mode is enabled and API is 16 or more. Thanks to '

View originalPermalink
How 2.3.0-alpha04 went
View all

Discussion