Плагин Room выглядит следующим образом: -
Код: Выделить всё
class AndroidRoomConventionPlugin : Plugin
{
override fun apply(target: Project) {
with(target) {
pluginManager.apply("androidx.room")
pluginManager.apply("com.google.devtools.ksp")
extensions.configure {
arg("room.generateKotlin", "false")
}
extensions.configure {
// The schemas directory contains a schema file for each version of the Room database.
// This is required to enable Room auto migrations.
// See https://developer.android.com/reference/kotlin/androidx/room/AutoMigration.
schemaDirectory("$projectDir/schemas")
}
dependencies {
add("api", libs.findLibrary("room.runtime").get())
add("api", libs.findLibrary("room.ktx").get())
add("ksp", libs.findLibrary("room.compiler").get())
}
}
}
}
Код: Выделить всё
extensions.configure {
// The schemas directory contains a schema file for each version of the Room database.
// This is required to enable Room auto migrations.
// See https://developer.android.com/reference/kotlin/androidx/room/AutoMigration.
schemaDirectory("$projectDir/schemas")
}
р>
Код: Выделить всё
room {
schemaDirectory("$projectDir/fetaureOneSchemas")
}
могу ли я каким-либо образом обнаружить существование записи комнаты {schemaDirectory() в существующем gradle из моего AndroidRoomConventionPlugin и НЕ добавлять еще один...
Код: Выделить всё
extensions.configure {
// The schemas directory contains a schema file for each version of the Room database.
// This is required to enable Room auto migrations.
// See https://developer.android.com/reference/kotlin/androidx/room/AutoMigration.
schemaDirectory("$projectDir/schemas")
}
Подробнее здесь: https://stackoverflow.com/questions/790 ... figuration
Мобильная версия