Room 2.7.0-alpha06

2.7.0-alpha06

Version 2.7.0-alpha06

Added 2
  • Introduce @ConstructedBy annotation for linking RoomDatabaseConstructor with @Database declaration
  • Introduce RoomDatabaseConstructor interface for KMP database instantiation
Changed 1
  • Change instantiation setup for RoomDatabase in KMP projects due to Kotlin 2.0 compilation model
Removed 1
  • Remove support for instantiateImpl() function strategy 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 and Link the object with the @Database declaration using @ConstructedBy

View original

Upgraded? How did it go?

Discussion