Joe Altidore
05/29/2024, 3:10 AMdependencies {
add("kspAndroid", libs.room.compiler)
add("kspIosSimulatorArm64", libs.room.compiler)
add("kspIosX64", libs.room.compiler)
add("kspIosArm64", libs.room.compiler)
}
add("kspAndroid", libs.room.compiler)
works fine but when I add the the last three it and attempt to sync gradle, I get this error A problem occurred configuring project ':composeApp'. Cannot change attributes of configuration ':composeApp:debugFrameworkIosX64' after it has been locked for mutation
Furthermore, when replace the block above with this
dependencies {
add("kspAndroid", libs.room.compiler)
afterEvaluate {
add("kspIosSimulatorArm64", libs.room.compiler)
add("kspIosX64", libs.room.compiler)
add("kspIosArm64", libs.room.compiler)
}
}
gradle sync works but iosMain Data base configuration doesn't generate.
This is the ios Database config function
private fun getDatabase(): PropertyDatabase {
val dbFile = NSHomeDirectory() + "/property.db"
return Room.databaseBuilder<PropertyDatabase>(
name = dbFile,
factory = { PropertyDatabase::class.instantiateImpl() }
).setDriver(BundledSQLiteDriver())
.fallbackToDestructiveMigration(false)
.build()
}
PropertyDatabase::class.instantiateImpl()
line shows an error when I try to rebuild because the instantiateImpl() is not generating
`Emirhan Emmez
05/30/2024, 11:41 AMJoe Altidore
05/30/2024, 2:04 PMClass 'PropertyDatabase_Impl' is not abstract and does not implement abstract base class member 'clearAllTables'.
Emirhan Emmez
05/30/2024, 2:05 PMEmirhan Emmez
05/30/2024, 2:05 PMJoe Altidore
05/30/2024, 2:10 PMJoe Altidore
05/30/2024, 2:10 PMEmirhan Emmez
05/30/2024, 2:11 PMFabio Santo
08/05/2024, 1:29 PMFabio Santo
08/05/2024, 1:38 PMtasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>>().configureEach {
if (name != KSP_TASK_NAME ) {
dependsOn(KSP_TASK_NAME)
}
}
Joe Altidore
08/05/2024, 1:42 PMFabio Santo
08/05/2024, 1:43 PMJoe Altidore
08/05/2024, 1:45 PMFabio Santo
08/05/2024, 1:46 PM