android room exportSchema
android room exportSchema
设置exportSchema=true
需要添加依赖
build.gradle.kts
plugins {
// ...
val room_version = "2.8.3"
id("androidx.room") version "$room_version" apply false
}
app: build.gradle.kts
plugins {
//...
id("androidx.room")
}
room {
// Specify the directory (e.g., in the project root)
schemaDirectory("$projectDir/schemas")
}
来源:https://developer.android.com/jetpack/androidx/releases/room#gradle-plugin
浙公网安备 33010602011771号