Do you guys have any ideas for a solution?
# arrow
c
Do you guys have any ideas for a solution?
a
Usually you need to configure the output of KSP as extra sources for InteliJ in your build file
c
I've tried this
Copy code
dependencies {
 //  ksp(libs.arrow.optics.ksp)
  add("kspCommonMainMetadata", libs.arrow.optics.ksp)
}
Copy code
kotlin {
  sourceSets.commonMain {
    kotlin.srcDir("build/generated/ksp/metadata")
  }
...
}


tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>>().configureEach {
  if (name != "kspCommonMainKotlinMetadata") {
    dependsOn("kspCommonMainKotlinMetadata")
  }
}
This is working for me at the moment, but I don't know to what extent it is correct.
a
v
Thanks @carbaj0. adding the generated code path works.
Copy code
Class 'AppDatabase_Impl' is not abstract and does not implement abstract base class member 'clearAllTables'.
Getting a new error after adding above lines. Any idea?
c
Copy code
@Database(entities = [BoxerEntity::class, VoteEntity::class], version = 4)
abstract class AppDatabase : RoomDatabase(), DB {
  abstract fun voteDao(): VoteDao
  abstract fun boxerDao(): BoxerDao
  override fun clearAllTables(): Unit {}
}

//temporal hack
interface DB {
  fun clearAllTables(): Unit {}
}
I guess you are trying to use Room. For now I have managed to make it work with this hack 😅
🙌 1
330 Views