Trying to use KSP for room (2.4.0-alpha04), ksp 1....
# room
m
Trying to use KSP for room (2.4.0-alpha04), ksp 1.5.31-1.0.0, and getting this error ” Schema export directory is not provided to the annotation processor so we cannot import the schema. To generate auto migrations, you must provide
room.schemaLocation
annotation processor argument AND set exportSchema to true.” I have room.schemaLocation like Ive had before, so I guess ksp needs it passed differently. Could someone tell me how? also getting “Cannot figure out how to save this field into database. You can consider adding a type converter for it.” despite having a typeconverter for the field
Perhaps @yigit has some input on this? 🙏
y
I've been summoned
this is how you pass arguments to KSP. https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:room/integration-tests/kotlintestapp/build.gradle;l=116 we gotta document this but i also hoped KSP plugin would eventually read from from android block but hasn't happened before 1.0.
for the type converters, check for their nullability, that breaks in unexpected ways. https://issuetracker.google.com/issues/193437407 we have a plan to fix it but designing a proper solution turned out a lot more complicated then we though (when the rest of the code didn't account for type nullabiltiy). prototype: https://android-review.googlesource.com/c/platform/frameworks/support/+/1807200 We are designing it properly after attempts to fix it made me realize there are more cases to account for so it will take a while, we want to get it right instead of hacking.
m
Thank you based yigit!! ❤️ 🙇‍♂️
c
Is this still the preferred solution for this problem? using Room 2.6.1 and ksp 1.9.20-1.0.13?