Browse Source

IT WORKS

master
Xaver 1 week ago
parent
commit
846aeb2ab1
  1. 4
      app/build.gradle.kts
  2. 1
      app/src/main/AndroidManifest.xml
  3. 2
      app/src/main/java/at/xaxa/demonstrator2/data/db/TaskEntity.kt
  4. 4
      app/src/main/java/at/xaxa/demonstrator2/ui/AppViewModelProvider.kt
  5. 4
      gradle/libs.versions.toml

4
app/build.gradle.kts

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
id("com.google.devtools.ksp") version "1.9.0-1.0.13" // Use the latest KSP version
}
android {
@ -50,6 +51,9 @@ android { @@ -50,6 +51,9 @@ android {
}
dependencies {
implementation (libs.androidx.room.runtime)
ksp (libs.androidx.room.compiler)
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.material)

1
app/src/main/AndroidManifest.xml

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools">
<application
android:name=".TaskApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"

2
app/src/main/java/at/xaxa/demonstrator2/data/db/TaskEntity.kt

@ -1,9 +1,11 @@ @@ -1,9 +1,11 @@
package at.xaxa.demonstrator2.data.db
import androidx.room.Entity
import androidx.room.PrimaryKey
@Entity(tableName = "tasks")
data class TaskEntity(
@PrimaryKey
val _id: Int = 0,
val name :String,
val details: String = "empty"

4
app/src/main/java/at/xaxa/demonstrator2/ui/AppViewModelProvider.kt

@ -15,9 +15,5 @@ object AppViewModelProvider { @@ -15,9 +15,5 @@ object AppViewModelProvider {
initializer {
DemoDetailsViewModel(this.createSavedStateHandle(), (this[APPLICATION_KEY] as TaskApplication).taskRepository)
}
initializer {
DemoDetailsViewModel(this.createSavedStateHandle(), (this[APPLICATION_KEY] as TaskApplication).taskRepository)
}
}
}

4
gradle/libs.versions.toml

@ -16,13 +16,17 @@ material3 = "1.2.0" @@ -16,13 +16,17 @@ material3 = "1.2.0"
navigationCompose = "2.8.4"
navigationComposeVersion = "2.7.2"
roomCommon = "2.6.1"
roomCompiler = "2.6.1"
roomKtx = "2.6.1"
roomRuntime = "2.5.0"
[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
androidx-material = { module = "androidx.compose.material:material", version.ref = "material" }
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationCompose" }
androidx-navigation-compose-v272 = { module = "androidx.navigation:navigation-compose", version.ref = "navigationComposeVersion" }
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "roomCompiler" }
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "roomRuntime" }
converter-kotlinx-serialization = { module = "com.squareup.retrofit2:converter-kotlinx-serialization", version.ref = "converterKotlinxSerialization" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }

Loading…
Cancel
Save