Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Room with Gradle plugin #1475

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

3flex
Copy link
Contributor

@3flex 3flex commented Sep 1, 2024

Changes
Migrate to the Room Gradle plugin introduced in Room 2.6.0.

The plugin configures the project such that generated schemas (which are
an output of the compile tasks and are consumed for auto-migrations) are
correctly configured to have reproducible and cacheable builds.

https://developer.android.com/jetpack/androidx/releases/room#gradle-plugin

Running Gradle tasks such as assembleDebug twice in a row now leads to tasks in the second run being up to date, allowing incremental compilation to work correctly.

Issues

@jellyfin-bot jellyfin-bot added this to the v2.7.0 milestone Sep 1, 2024
> The plugin configures the project such that generated schemas (which are
> an output of the compile tasks and are consumed for auto-migrations) are
> correctly configured to have reproducible and cacheable builds.

https://developer.android.com/jetpack/androidx/releases/room#gradle-plugin
@Maxr1998 Maxr1998 self-requested a review September 1, 2024 13:47
@3flex 3flex changed the title Migrate to Room Gradle plugin Configure Room with Gradle plugin Sep 1, 2024
@@ -67,6 +67,7 @@ kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref =
kotlin-ksp = { id = "com.google.devtools.ksp", version.ref = "kotlin-ksp" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
android-junit5 = { id = "de.mannodermaus.android-junit5", version.ref = "android-junit5" }
android-room = { id = "androidx.room", version.ref = "androidx-room" }
Copy link
Contributor Author

@3flex 3flex Sep 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alias should probably be androidx-room, so libs.plugins.androidx.room

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants