I have an old project that uses a room database, I updated some parts of the database and wanted to create some tests for the migration, the problem is that the database is already at version 5, and only version 5 json file is showing in the schemas directory.
So, my question is, does schemas only get generated for the lasted version (after schema location arguments have been added to gradle), if so, how could I generate the schemas of the older versions?
I added the schemaLocation in the default config in app.gradle as follows:
javaCompileOptions {
annotationProcessorOptions {
arguments += ["room.schemaLocation":
"$projectDir/schemas".toString()]
}
}
and added the source sets as well:
sourceSets {
androidTest.assets.srcDirs +=
files("$projectDir/schemas".toString())
}
here's the generated shemas:
