Which gradle task / Studio feature generates the Room schema file? Are there any circumstances in which the file generation is skipped?
Weeks ago I made changes which should have changed the schema file, but the file was not changed. Now I made a new change (deleted an entity, including the entity's reference in the Room database class) and now all the changes appeared in the schema file.
-> Why was the schema file generated now, but not in one of the many builds in the last days / weeks?
The schema seems to get generated more reliably when I delete it before building the project. But that obviously is not mandatory because it also worked when I deleted that entity today...
I read this question, but I already have the following lines in my build.gradle:
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
def room_version = "2.1.0"
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"