hi everyone, I'm trying to add Room to our KMP pro...
# room
v
hi everyone, I'm trying to add Room to our KMP project that targets iOS + Android. When I run the project on my machine (a Mac), it works, but not on Github Actions (we're using
ubuntu-latest
runner). I noticed that the
ksp
task is skipped. Is there a way to make this work on
ubuntu-latest
runners?
Copy code
> Task :feature:api:kspKotlinIosX64 SKIPPED
> Task :feature:api:compileKotlinIosX64
> Task :feature:impl:kspKotlinIosX64 SKIPPED
> Task :platform:impl:compileKotlinIosX64

> Task :app:shared:compileKotlinIosSimulatorArm64 FAILED

> Task :app:shared:copyRoomSchemas NO-SOURCE
> Task :feature:store:impl:compileKotlinIosX64
e: file:///home/runner/work/project/project/app/shared/src/commonMain/kotlin/app/shared/db/AppDatabase.kt:17:1 Expected AppDatabaseConstructor has no actual declaration in module <commonMain> for Native
here's the database declaration
Copy code
@Database(entities = [StoreEntity::class], version = 1)
@ConstructedBy(AppDatabaseConstructor::class)
abstract class AppDatabase : RoomDatabase() {
    abstract fun storeDao(): StoreDao
}

@Suppress("KotlinNoActualForExpect")
expect object AppDatabaseConstructor : RoomDatabaseConstructor<AppDatabase> {
    override fun initialize(): AppDatabase
}
we're using
Copy code
ksp = "2.3.4"
room = "2.8.4"
kotlin = "2.3.10"
b
You're trying to build iOS on Linux? You're gonna want a Mac for that
e
b
TIL. Although, it looks like it still needs some work
v
thanks ephemient, the workaround works