-
-
Save emedinaa/f5505ac3060be6444ea7ca5eaa893962 to your computer and use it in GitHub Desktop.
Migration to AndroidX Room Plugin - Convention Plugins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Migration to AndroidX Room Plugin on Convention Plugins | |
import org.gradle.android.workarounds.room.RoomExtension | |
class AndroidRoomConventionPlugin : Plugin<Project> { | |
override fun apply(project: Project) { | |
with(project) { | |
//To do | |
} | |
} | |
} | |
//gradle/libs.versions.toml | |
//androidxRoom = "2.6.0-alpha01" | |
//---------- | |
import androidx.room.gradle.RoomExtension | |
class AndroidRoomConventionPlugin : Plugin<Project> { | |
override fun apply(project: Project) { | |
with(project) { | |
pluginManager.apply("androidx.room") | |
extensions.configure<RoomExtension> { | |
schemaDirectory("$projectDir/schemas/") | |
} | |
} | |
} | |
} | |
//gradle/libs.versions.toml | |
//androidxRoom = "2.6.0" | |
//androidx-room = { module = "androidx.room:room-gradle-plugin", version.ref = "androidxRoom" } | |
//androidx-room = { id = "androidx.room", version.ref= "androidxRoom" } | |
//Room Gradle Plugin | |
//https://mvnrepository.com/artifact/androidx.room/room-gradle-plugin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment