Skip to content

Instantly share code, notes, and snippets.

@tanwwg
Last active October 29, 2025 03:20
Show Gist options
  • Select an option

  • Save tanwwg/504d0ef75b535073cc885d75f8e29d23 to your computer and use it in GitHub Desktop.

Select an option

Save tanwwg/504d0ef75b535073cc885d75f8e29d23 to your computer and use it in GitHub Desktop.
Gradle build changes

To add viewModel() support

Add to dependencies

implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.4")

To add rooms support

Official source

Inside plugins:

plugins {
    ...
    id("com.google.devtools.ksp") version "2.0.21-1.0.25"
}

Add to dependencies

implementation("androidx.room:room-runtime:2.6.1")
implementation("androidx.room:room-ktx:2.6.1")
ksp("androidx.room:room-compiler:2.6.1")

Add at end (optional):

ksp {
    arg("room.schemaLocation", "$projectDir/schemas")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment