wip: adding coroutine and VM stuff
This commit is contained in:
parent
2cb498bb37
commit
56224a0dd7
6 changed files with 37 additions and 2 deletions
|
@ -2,6 +2,8 @@ plugins {
|
|||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
alias(libs.plugins.kotlin.compose)
|
||||
id("kotlin-kapt")
|
||||
id("com.google.dagger.hilt.android")
|
||||
}
|
||||
|
||||
android {
|
||||
|
@ -40,6 +42,10 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
kapt {
|
||||
correctErrorTypes = true
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.androidx.lifecycle.runtime.ktx)
|
||||
|
@ -51,7 +57,12 @@ dependencies {
|
|||
implementation(libs.androidx.ui.tooling.preview)
|
||||
implementation(libs.androidx.material3)
|
||||
implementation(libs.androidx.material.icons.extended)
|
||||
testImplementation(libs.junit)
|
||||
implementation(libs.androidx.datastore)
|
||||
|
||||
implementation(libs.dagger.hilt.android)
|
||||
kapt(libs.hilt.android.compiler)
|
||||
|
||||
testImplementation(libs.junit)
|
||||
androidTestImplementation(libs.androidx.junit)
|
||||
androidTestImplementation(libs.androidx.espresso.core)
|
||||
androidTestImplementation(platform(libs.androidx.compose.bom))
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<application
|
||||
android:name=".CatCommApplication"
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
|
|
8
app/src/main/java/pet/catcomm/CatCommApplication.kt
Normal file
8
app/src/main/java/pet/catcomm/CatCommApplication.kt
Normal file
|
@ -0,0 +1,8 @@
|
|||
package pet.catcomm
|
||||
|
||||
import android.app.Application
|
||||
import dagger.hilt.android.HiltAndroidApp
|
||||
|
||||
@HiltAndroidApp
|
||||
class CatCommApplication : Application() {
|
||||
}
|
6
app/src/main/java/pet/catcomm/store/CatCommViewModel.kt
Normal file
6
app/src/main/java/pet/catcomm/store/CatCommViewModel.kt
Normal file
|
@ -0,0 +1,6 @@
|
|||
package pet.catcomm.store
|
||||
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
|
||||
@HiltViewModel
|
||||
class CatCommViewModel
|
|
@ -3,4 +3,5 @@ plugins {
|
|||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
alias(libs.plugins.kotlin.compose) apply false
|
||||
alias(libs.plugins.kotlin.hilt) apply false
|
||||
}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
[versions]
|
||||
agp = "8.8.2"
|
||||
datastore = "1.1.3"
|
||||
hiltPlugin = "2.51.1"
|
||||
hiltAndroidVersion = "2.55"
|
||||
hiltCompiler = "2.55"
|
||||
kotlin = "2.0.0"
|
||||
coreKtx = "1.15.0"
|
||||
junit = "4.13.2"
|
||||
|
@ -12,8 +16,12 @@ navigationCompose = "2.8.8"
|
|||
|
||||
[libraries]
|
||||
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
||||
androidx-datastore = { module = "androidx.datastore:datastore", version.ref = "datastore" }
|
||||
androidx-material-icons-extended = { module = "androidx.compose.material:material-icons-extended" }
|
||||
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationCompose" }
|
||||
dagger-hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hiltAndroidVersion" }
|
||||
hilt-android-compiler = { module = "com.google.dagger:hilt-android-compiler" }
|
||||
hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "hiltCompiler" }
|
||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
|
||||
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
||||
|
@ -32,4 +40,4 @@ androidx-material3 = { group = "androidx.compose.material3", name = "material3"
|
|||
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
||||
|
||||
kotlin-hilt = { id = "com.google.dagger.hilt.android", version.ref = "hiltPlugin" }
|
||||
|
|
Loading…
Add table
Reference in a new issue