initial commit
This commit is contained in:
27
app/src/main/java/com/example/quiz/AppModule.java
Normal file
27
app/src/main/java/com/example/quiz/AppModule.java
Normal file
@@ -0,0 +1,27 @@
|
||||
package com.example.quiz;
|
||||
|
||||
import com.example.quiz.data.BetsBank;
|
||||
import com.example.quiz.data.repository.BetRepository;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import dagger.hilt.InstallIn;
|
||||
import dagger.hilt.components.SingletonComponent;
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent.class)
|
||||
public class AppModule {
|
||||
@Provides
|
||||
@Singleton
|
||||
public BetsBank provideApiService(){
|
||||
return BetsBank.getInstance();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
public BetRepository provideBetRepository() {
|
||||
return new BetRepository();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user