Android room dao generation fails afrer Migrating to ksp from kapt due to TypeAlias

34 Views Asked by At

I have migrated from kapt to ksp for my current android project.

All my dao(s) extend a base dao that is defined as a kotlin typealias as follows:-

typealias BaseDao<T> = AbstractDao<T, Long>

@Dao
abstract class AbstractDao<TEntity : IEntity<TKey?>, TKey : Any> {

    @Insert
    abstract fun save(obj: TEntity): Long

    @Insert
    abstract fun save(vararg obj: TEntity)

    @Insert
    abstract suspend fun saveAsync(vararg obj: TEntity)

    @Update
    abstract fun update(obj: TEntity)

    @Delete
    abstract fun delete(obj: TEntity)

    @Insert
    abstract suspend fun saveAll(obj: TEntity)

when i look at the generated kotlin code for the XXXXDao_Impl classes none of them include the BaseDao functions, however when i replace the typealias with the actual AbstractDao name the room code generations completes fine.

is there any approach i can take to get ksp to support typealias or do i have to replace the typealias in all my dao's?

i have raised this issue with google https://issuetracker.google.com/issues/327643800

0

There are 0 best solutions below