DI(Hilt)追加 #45

Merged
Fujimatsu merged 4 commits from feature/add_di into main 2024-06-06 07:27:32 +00:00
8 changed files with 35 additions and 1 deletions

View File

@ -1,5 +1,6 @@
plugins {
alias(libs.plugins.androidApplication)
id 'com.google.dagger.hilt.android'
}
android {

View File

@ -10,6 +10,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:name=".KidShiftApplication"
android:theme="@style/Theme.KidShift"
tools:targetApi="31">
<activity

View File

@ -0,0 +1,11 @@
package one.nem.kidshift;
import android.app.Application;
import dagger.hilt.android.HiltAndroidApp;
@HiltAndroidApp
public class KidShiftApplication extends Application {
}

View File

@ -1,5 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.androidApplication) apply false
id 'com.google.dagger.hilt.android' version '2.44' apply false
alias(libs.plugins.androidLibrary) apply false
}

View File

@ -1,5 +1,6 @@
plugins {
alias(libs.plugins.androidLibrary)
id 'com.google.dagger.hilt.android'
}
android {
@ -34,4 +35,8 @@ dependencies {
testImplementation libs.junit
androidTestImplementation libs.ext.junit
androidTestImplementation libs.espresso.core
// Hilt (DI)
implementation libs.com.google.dagger.hilt.android
annotationProcessor libs.com.google.dagger.hilt.compiler
}

View File

@ -1,5 +1,6 @@
plugins {
alias(libs.plugins.androidLibrary)
id 'com.google.dagger.hilt.android'
}
android {
@ -34,4 +35,8 @@ dependencies {
testImplementation libs.junit
androidTestImplementation libs.ext.junit
androidTestImplementation libs.espresso.core
// Hilt (DI)
implementation libs.com.google.dagger.hilt.android
annotationProcessor libs.com.google.dagger.hilt.compiler
}

View File

@ -1,5 +1,6 @@
plugins {
alias(libs.plugins.androidLibrary)
id 'com.google.dagger.hilt.android'
}
android {
@ -34,4 +35,8 @@ dependencies {
testImplementation libs.junit
androidTestImplementation libs.ext.junit
androidTestImplementation libs.espresso.core
// Hilt (DI)
implementation libs.com.google.dagger.hilt.android
annotationProcessor libs.com.google.dagger.hilt.compiler
}

View File

@ -1,5 +1,6 @@
plugins {
alias(libs.plugins.androidLibrary)
id 'com.google.dagger.hilt.android'
}
android {
@ -32,4 +33,8 @@ dependencies {
testImplementation libs.junit
androidTestImplementation libs.ext.junit
androidTestImplementation libs.espresso.core
// Hilt (DI)
implementation libs.com.google.dagger.hilt.android
annotationProcessor libs.com.google.dagger.hilt.compiler
}