Updated on 2026-08-14
This commit is contained in:
parent
35adc604f8
commit
200f2e368c
3 changed files with 28 additions and 2 deletions
|
|
@ -62,7 +62,7 @@ dependencies {
|
|||
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
|
||||
implementation 'com.google.dagger:dagger:2.16'
|
||||
annotationProcessor 'com.google.dagger:dagger-compiler:2.16'
|
||||
// implementation 'com.google.dagger:dagger-android:2.16'
|
||||
// implementation 'com.google.dagger:dagger-android:2.16'
|
||||
// implementation 'com.google.dagger:dagger-android-support:2.16' // if you use the support libraries
|
||||
// annotationProcessor 'com.google.dagger:dagger-android-processor:2.16'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
|
|
|
|||
21
app/src/main/java/com/tangem/di/AppModule.java
Normal file
21
app/src/main/java/com/tangem/di/AppModule.java
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
package com.tangem.di;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
@Singleton
|
||||
public class AppModule {
|
||||
private Context appContext;
|
||||
|
||||
public AppModule(@NotNull Context context) {
|
||||
appContext = context;
|
||||
}
|
||||
|
||||
Context provideContext() {
|
||||
return appContext;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,15 +1,20 @@
|
|||
package com.tangem.di;
|
||||
|
||||
import com.tangem.presentation.activity.LogoActivity;
|
||||
import com.tangem.presentation.activity.MainActivity;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import dagger.Component;
|
||||
|
||||
@Singleton
|
||||
@Component(modules = {NavigatorModule.class})
|
||||
@Component(modules = {
|
||||
// AppModule.class,
|
||||
NavigatorModule.class})
|
||||
public interface NavigatorComponent {
|
||||
|
||||
void inject(LogoActivity activity);
|
||||
|
||||
void inject(MainActivity activity);
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue