Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Room Park Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav Bogdashkin
Room Park Android
Commits
ec95f404
Commit
ec95f404
authored
Nov 25, 2019
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
actual workaround
parent
109c5265
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
85 additions
and
74 deletions
+85
-74
UserHolder.kt
...java/com/biganto/visual/roompark/data/local/UserHolder.kt
+12
-4
RetrofitModule.kt
...oompark/data/repository/api/retrofit/di/RetrofitModule.kt
+2
-0
AppComponent.kt
...ava/com/biganto/visual/roompark/di/dagger/AppComponent.kt
+7
-7
DataModule.kt
.../java/com/biganto/visual/roompark/di/dagger/DataModule.kt
+15
-4
authUseCase.kt
...om/biganto/visual/roompark/domain/use_case/authUseCase.kt
+2
-2
ScreenController.kt
...ual/roompark/presentation/screen/auth/ScreenController.kt
+0
-4
ScreenDI.kt
...anto/visual/roompark/presentation/screen/auth/ScreenDI.kt
+18
-21
ScreenController.kt
...al/roompark/presentation/screen/feeds/ScreenController.kt
+1
-1
ScreenDI.kt
...nto/visual/roompark/presentation/screen/feeds/ScreenDI.kt
+9
-10
ScreenDI.kt
.../visual/roompark/presentation/screen/settings/ScreenDI.kt
+9
-10
ScreenDI.kt
...to/visual/roompark/presentation/screen/splash/ScreenDI.kt
+9
-10
dependencies.gradle
dependencies.gradle
+1
-1
No files found.
app/src/main/java/com/biganto/visual/roompark/data/local/UserHolder.kt
View file @
ec95f404
package
com.biganto.visual.roompark.data.local
package
com.biganto.visual.roompark.data.local
import
android.app.Application
import
android.content.Context
import
android.content.Context
import
com.afollestad.rxkprefs.Pref
import
com.afollestad.rxkprefs.Pref
import
com.afollestad.rxkprefs.rxkPrefs
import
com.afollestad.rxkprefs.rxkPrefs
import
com.biganto.visual.androidplayer.data.repository.local.ILocalStore
import
com.biganto.visual.androidplayer.data.repository.local.ILocalStore
import
dagger.Binds
import
dagger.Module
import
dagger.Module
import
dagger.Provides
import
io.reactivex.Completable
import
io.reactivex.Completable
import
io.reactivex.Observable
import
io.reactivex.Observable
import
timber.log.Timber
import
timber.log.Timber
import
javax.inject.Inject
import
javax.inject.Inject
import
javax.inject.Singleton
/**
/**
* Created by Vladislav Bogdashkin on 14.06.2018.
* Created by Vladislav Bogdashkin on 14.06.2018.
*/
*/
@Module
@Module
abstract
class
LocalStorage
(){
class
LocalStorage
(){
@Binds
// @Binds
abstract
fun
provideStore
(
store
:
UserHolder
):
ILocalStore
// @Singleton
// abstract fun provideStore(store:UserHolder):ILocalStore
@Provides
@Singleton
fun
provideStore
(
app
:
Application
):
ILocalStore
=
UserHolder
(
app
)
}
}
class
UserHolder
@Inject
constructor
(
val
context
:
Context
)
:
ILocalStore
class
UserHolder
@Inject
constructor
(
val
context
:
Context
)
:
ILocalStore
...
...
app/src/main/java/com/biganto/visual/roompark/data/repository/api/retrofit/di/RetrofitModule.kt
View file @
ec95f404
...
@@ -21,6 +21,7 @@ import retrofit2.converter.gson.GsonConverterFactory
...
@@ -21,6 +21,7 @@ import retrofit2.converter.gson.GsonConverterFactory
import
timber.log.Timber
import
timber.log.Timber
import
java.util.*
import
java.util.*
import
java.util.concurrent.TimeUnit
import
java.util.concurrent.TimeUnit
import
javax.inject.Singleton
/**
/**
* Created by Vladislav Bogdashkin on 29.10.2019.
* Created by Vladislav Bogdashkin on 29.10.2019.
...
@@ -93,6 +94,7 @@ class RetrofitModule{
...
@@ -93,6 +94,7 @@ class RetrofitModule{
//lateinit var context: RoomParkApplication
//lateinit var context: RoomParkApplication
@Provides
@Provides
@Singleton
// @Named("roomParkApi")
// @Named("roomParkApi")
fun
provideRetrofitRoomParkApi
(
context
:
Context
):
Retrofit
=
fun
provideRetrofitRoomParkApi
(
context
:
Context
):
Retrofit
=
Retrofit
.
Builder
()
Retrofit
.
Builder
()
...
...
app/src/main/java/com/biganto/visual/roompark/di/dagger/AppComponent.kt
View file @
ec95f404
package
com.biganto.visual.roompark.di.dagger
package
com.biganto.visual.roompark.di.dagger
import
com.biganto.visual.androidplayer.data.repository.local.ILocalStore
import
com.biganto.visual.roompark.base.RoomParkApplication
import
com.biganto.visual.roompark.base.RoomParkApplication
import
com.biganto.visual.roompark.data.repository.api.IRoomParkApi
import
com.biganto.visual.roompark.data.local.LocalStorage
import
com.biganto.visual.roompark.data.repository.api.retrofit.RetrofitRepository
import
com.biganto.visual.roompark.data.repository.api.retrofit.di.RetrofitModule
import
com.biganto.visual.roompark.data.repository.api.retrofit.di.RetrofitModule
import
com.biganto.visual.roompark.data.repository.db.requrey.DbModule
import
com.biganto.visual.roompark.data.repository.db.requrey.DbModule
import
dagger.BindsInstance
import
dagger.BindsInstance
...
@@ -26,19 +26,23 @@ import javax.inject.Singleton
...
@@ -26,19 +26,23 @@ import javax.inject.Singleton
DataModule
::
class
,
DataModule
::
class
,
RetrofitModule
::
class
,
RetrofitModule
::
class
,
DbModule
::
class
,
DbModule
::
class
,
LocalStorage
::
class
,
// LocalStorage::class,
// LocalStorage::class,
// AppVersionModule::class,
// AppVersionModule::class,
AndroidInjectionModule
::
class
,
AndroidInjectionModule
::
class
,
AndroidSupportInjectionModule
::
class
,
AndroidSupportInjectionModule
::
class
,
// MappingProvider::class,
// MappingProvider::class,
ActivityModule
::
class
,
ActivityModule
::
class
,
// ContractRepositoryModule::class,
AppActivityModule
::
class
])
AppActivityModule
::
class
])
interface
AppComponent
:
AndroidInjector
<
RoomParkApplication
>{
interface
AppComponent
:
AndroidInjector
<
RoomParkApplication
>{
@Component
.
Factory
@Component
.
Factory
interface
Factory
:
AndroidInjector
.
Factory
<
RoomParkApplication
>{
interface
Factory
:
AndroidInjector
.
Factory
<
RoomParkApplication
>{
// @BindsInstance
// @BindsInstance
// fun context(application: Application): Factory
// fun context(application: Application): Factory
...
@@ -55,10 +59,6 @@ interface AppComponent : AndroidInjector<RoomParkApplication>{
...
@@ -55,10 +59,6 @@ interface AppComponent : AndroidInjector<RoomParkApplication>{
//
//
// fun build(): AppComponent
// fun build(): AppComponent
@BindsInstance
fun
retroApi
(
api
:
RetrofitRepository
)
:
IRoomParkApi
}
}
// retorfitModule: RetrofitModule
// retorfitModule: RetrofitModule
...
...
app/src/main/java/com/biganto/visual/roompark/di/dagger/DataModule.kt
View file @
ec95f404
package
com.biganto.visual.roompark.di.dagger
package
com.biganto.visual.roompark.di.dagger
import
com.biganto.visual.androidplayer.data.repository.local.ILocalStore
import
com.biganto.visual.roompark.data.local.UserHolder
import
com.biganto.visual.roompark.data.repository.api.IRoomParkApi
import
com.biganto.visual.roompark.data.repository.api.IRoomParkApi
import
com.biganto.visual.roompark.data.repository.api.retrofit.RetrofitRepository
import
com.biganto.visual.roompark.data.repository.api.retrofit.RetrofitRepository
import
com.biganto.visual.roompark.data.repository.db.IDb
import
com.biganto.visual.roompark.data.repository.db.IDb
...
@@ -16,6 +14,14 @@ interface DataComponent{
...
@@ -16,6 +14,14 @@ interface DataComponent{
}
}
//@Module(includes = [DataModule::class,RetrofitModule::class,DbModule::class])
//abstract class ContractRepositoryModule @Inject constructor(
// val authC:AuthContract
//){
//
//}
...
@@ -23,6 +29,7 @@ interface DataComponent{
...
@@ -23,6 +29,7 @@ interface DataComponent{
abstract
class
DataModule
{
abstract
class
DataModule
{
// @Singleton
// @Binds
// @Binds
// abstract fun provideAuthContract(contract: AuthContractModule) : AuthContract
// abstract fun provideAuthContract(contract: AuthContractModule) : AuthContract
...
@@ -41,13 +48,17 @@ abstract class DataModule {
...
@@ -41,13 +48,17 @@ abstract class DataModule {
// @Binds
// @Binds
// abstract fun provideStore(store: KotlinReactiveEntityStore<Persistable>) : KotlinReactiveEntityStore<Persistable>
// abstract fun provideStore(store: KotlinReactiveEntityStore<Persistable>) : KotlinReactiveEntityStore<Persistable>
@Singleton
@Binds
@Binds
abstract
fun
provideDb
(
db
:
RequeryRepository
)
:
IDb
abstract
fun
provideDb
(
db
:
RequeryRepository
)
:
IDb
@Binds
// @Singleton
abstract
fun
provideLocalStorage
(
local
:
UserHolder
)
:
ILocalStore
// @Binds
// abstract fun provideLocalStorage(local: UserHolder) : ILocalStore
/*
/*
@Provides
@Provides
...
...
app/src/main/java/com/biganto/visual/roompark/domain/use_case/authUseCase.kt
View file @
ec95f404
package
com.biganto.visual.roompark.domain.use_case
package
com.biganto.visual.roompark.domain.use_case
import
com.biganto.visual.roompark.d
omain.contract.AuthContract
import
com.biganto.visual.roompark.d
ata.data_provider.AuthContractModule
import
javax.inject.Inject
import
javax.inject.Inject
/**
/**
...
@@ -8,7 +8,7 @@ import javax.inject.Inject
...
@@ -8,7 +8,7 @@ import javax.inject.Inject
*/
*/
class
AuthUseCase
@Inject
constructor
(
class
AuthUseCase
@Inject
constructor
(
private
val
authContract
:
AuthContract
private
val
authContract
:
AuthContract
Module
){
){
fun
validateAuth
()
=
authContract
.
validateAuthState
()
fun
validateAuth
()
=
authContract
.
validateAuthState
()
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/auth/ScreenController.kt
View file @
ec95f404
...
@@ -34,12 +34,8 @@ class AuthScreenController :
...
@@ -34,12 +34,8 @@ class AuthScreenController :
override
fun
onViewBound
(
v
:
View
)
{
override
fun
onViewBound
(
v
:
View
)
{
toolBar
.
hideAll
()
toolBar
.
hideAll
()
bottomNavigation
.
hide
()
bottomNavigation
.
hide
()
}
}
@BindView
(
R
.
id
.
login_text_input
)
lateinit
var
loginInput
:
TextInputLayout
@BindView
(
R
.
id
.
login_text_input
)
lateinit
var
loginInput
:
TextInputLayout
@BindView
(
R
.
id
.
password_text_input
)
lateinit
var
pwdInput
:
TextInputLayout
@BindView
(
R
.
id
.
password_text_input
)
lateinit
var
pwdInput
:
TextInputLayout
@BindView
(
R
.
id
.
sign_in_button
)
lateinit
var
signInButton
:
MaterialButton
@BindView
(
R
.
id
.
sign_in_button
)
lateinit
var
signInButton
:
MaterialButton
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/auth/ScreenDI.kt
View file @
ec95f404
package
com.biganto.visual.roompark.presentation.screen.auth
package
com.biganto.visual.roompark.presentation.screen.auth
import
android.content.Context
import
android.content.Context
import
com.biganto.visual.androidplayer.data.repository.local.ILocalStore
import
com.biganto.visual.roompark.base.IBottomNavigation
import
com.biganto.visual.roompark.base.IBottomNavigation
import
com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.data.data_provider.AuthContractModule
import
com.biganto.visual.roompark.data.repository.api.retrofit.di.RetrofitModule
import
com.biganto.visual.roompark.data.repository.db.requrey.DbModule
import
com.biganto.visual.roompark.di.dagger.AppComponent
import
com.biganto.visual.roompark.di.dagger.AppComponent
import
com.biganto.visual.roompark.di.dagger.AppModule
import
com.biganto.visual.roompark.di.dagger.DataModule
import
com.biganto.visual.roompark.di.dagger.PerScreen
import
com.biganto.visual.roompark.di.dagger.PerScreen
import
com.biganto.visual.roompark.domain.contract.AuthContract
import
dagger.Binds
import
dagger.*
import
dagger.BindsInstance
import
dagger.Component
import
dagger.Module
@PerScreen
@PerScreen
@
Subc
omponent
(
@
C
omponent
(
modules
=
[
modules
=
[
AuthScreenModule
::
class
AuthScreenModule
::
class
,
DataModule
::
class
]
,
RetrofitModule
::
class
,
dependencies
=
[
AppComponent
::
class
]
,
AppModule
::
class
)
,
DbModule
::
class
])
interface
AuthScreenComponent
{
interface
AuthScreenComponent
{
val
_local
:
ILocalStore
@Component
.
Factory
@Component
.
Factory
interface
Factory
{
interface
Factory
{
fun
create
(
fun
create
(
...
@@ -33,23 +29,24 @@ interface AuthScreenComponent {
...
@@ -33,23 +29,24 @@ interface AuthScreenComponent {
):
AuthScreenComponent
):
AuthScreenComponent
}
}
val
presenter
:
AuthScreenPresenter
//
val presenter: AuthScreenPresenter
fun
inject
(
controller
:
AuthScreenController
)
fun
inject
(
controller
:
AuthScreenController
)
}
}
@Module
@Module
(
// includes = [DataModule::class,DbModule::class,RetrofitModule::class]
)
abstract
class
AuthScreenModule
{
abstract
class
AuthScreenModule
{
@PerScreen
@Binds
@Binds
abstract
fun
provideContext
(
activity
:
RoomParkMainActivity
):
Context
abstract
fun
provideContext
(
activity
:
RoomParkMainActivity
):
Context
@PerScreen
// @PerScreen
@Binds
// @Binds
abstract
fun
provideAuth
(
contract
:
AuthContractModule
):
AuthContract
// abstract fun provideAuth(contract: AuthContractModule): AuthContract
@PerScreen
@Binds
@Binds
abstract
fun
provideBottomNavigation
(
activitiy
:
RoomParkMainActivity
):
IBottomNavigation
abstract
fun
provideBottomNavigation
(
activitiy
:
RoomParkMainActivity
):
IBottomNavigation
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/feeds/ScreenController.kt
View file @
ec95f404
...
@@ -68,7 +68,7 @@ class FeedsScreenController :
...
@@ -68,7 +68,7 @@ class FeedsScreenController :
lateinit
var
feedsBlockView
:
ViewGroup
lateinit
var
feedsBlockView
:
ViewGroup
@BindView
(
R
.
id
.
to_feed_articles
)
@BindView
(
R
.
id
.
to_feed_articles
)
lateinit
var
allFeedArticles
:
MaterialButton
lateinit
var
allFeedArticles
:
MaterialButton
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/feeds/ScreenDI.kt
View file @
ec95f404
...
@@ -2,7 +2,6 @@ package com.biganto.visual.roompark.presentation.screen.feeds
...
@@ -2,7 +2,6 @@ package com.biganto.visual.roompark.presentation.screen.feeds
import
android.content.Context
import
android.content.Context
import
com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.data.data_provider.FeedsContractModule
import
com.biganto.visual.roompark.data.repository.api.retrofit.di.RetrofitModule
import
com.biganto.visual.roompark.data.repository.api.retrofit.di.RetrofitModule
import
com.biganto.visual.roompark.data.repository.db.requrey.DbModule
import
com.biganto.visual.roompark.data.repository.db.requrey.DbModule
import
com.biganto.visual.roompark.data.service.user_session.IUserSession
import
com.biganto.visual.roompark.data.service.user_session.IUserSession
...
@@ -11,24 +10,24 @@ import com.biganto.visual.roompark.di.dagger.AppComponent
...
@@ -11,24 +10,24 @@ import com.biganto.visual.roompark.di.dagger.AppComponent
import
com.biganto.visual.roompark.di.dagger.AppModule
import
com.biganto.visual.roompark.di.dagger.AppModule
import
com.biganto.visual.roompark.di.dagger.DataModule
import
com.biganto.visual.roompark.di.dagger.DataModule
import
com.biganto.visual.roompark.di.dagger.PerScreen
import
com.biganto.visual.roompark.di.dagger.PerScreen
import
com.biganto.visual.roompark.domain.contract.FeedsContract
import
dagger.Binds
import
dagger.Binds
import
dagger.BindsInstance
import
dagger.BindsInstance
import
dagger.Component
import
dagger.Module
import
dagger.Module
import
dagger.Subcomponent
@PerScreen
@PerScreen
@
C
omponent
(
@
Subc
omponent
(
modules
=
[
FeedsScreenModule
::
class
modules
=
[
FeedsScreenModule
::
class
,
DataModule
::
class
,
DataModule
::
class
,
RetrofitModule
::
class
,
RetrofitModule
::
class
,
AppModule
::
class
,
AppModule
::
class
,
DbModule
::
class
],
,
DbModule
::
class
]
dependencies
=
[
AppComponent
::
class
])
// ,dependencies = [AppComponent::class]
)
interface
FeedsScreenComponent
{
interface
FeedsScreenComponent
{
@
C
omponent
.
Factory
@
Subc
omponent
.
Factory
interface
Factory
{
interface
Factory
{
fun
create
(
fun
create
(
appComponent
:
AppComponent
appComponent
:
AppComponent
...
@@ -48,9 +47,9 @@ abstract class FeedsScreenModule{
...
@@ -48,9 +47,9 @@ abstract class FeedsScreenModule{
@Binds
@Binds
abstract
fun
provideContext
(
activity
:
RoomParkMainActivity
):
Context
abstract
fun
provideContext
(
activity
:
RoomParkMainActivity
):
Context
@PerScreen
//
@PerScreen
@Binds
//
@Binds
abstract
fun
provideContract
(
impl
:
FeedsContractModule
):
FeedsContract
//
abstract fun provideContract(impl: FeedsContractModule): FeedsContract
@PerScreen
@PerScreen
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/settings/ScreenDI.kt
View file @
ec95f404
...
@@ -2,28 +2,27 @@ package com.biganto.visual.roompark.presentation.screen.settings
...
@@ -2,28 +2,27 @@ package com.biganto.visual.roompark.presentation.screen.settings
import
android.content.Context
import
android.content.Context
import
com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.data.data_provider.AuthContractModule
import
com.biganto.visual.roompark.data.repository.api.retrofit.di.RetrofitModule
import
com.biganto.visual.roompark.data.repository.api.retrofit.di.RetrofitModule
import
com.biganto.visual.roompark.data.repository.db.requrey.DbModule
import
com.biganto.visual.roompark.data.repository.db.requrey.DbModule
import
com.biganto.visual.roompark.di.dagger.AppComponent
import
com.biganto.visual.roompark.di.dagger.AppComponent
import
com.biganto.visual.roompark.di.dagger.AppModule
import
com.biganto.visual.roompark.di.dagger.AppModule
import
com.biganto.visual.roompark.di.dagger.DataModule
import
com.biganto.visual.roompark.di.dagger.DataModule
import
com.biganto.visual.roompark.di.dagger.PerScreen
import
com.biganto.visual.roompark.di.dagger.PerScreen
import
com.biganto.visual.roompark.domain.contract.AuthContract
import
dagger.Binds
import
dagger.Binds
import
dagger.BindsInstance
import
dagger.BindsInstance
import
dagger.Component
import
dagger.Module
import
dagger.Module
import
dagger.Subcomponent
@PerScreen
@PerScreen
@
C
omponent
(
@
Subc
omponent
(
modules
=
[
SettingsScreenModule
::
class
,
DataModule
::
class
modules
=
[
SettingsScreenModule
::
class
,
DataModule
::
class
,
RetrofitModule
::
class
,
AppModule
::
class
,
DbModule
::
class
],
,
RetrofitModule
::
class
,
AppModule
::
class
,
DbModule
::
class
]
dependencies
=
[
AppComponent
::
class
])
// ,dependencies = [AppComponent::class]
)
interface
SettingsScreenComponent
{
interface
SettingsScreenComponent
{
@
C
omponent
.
Factory
@
Subc
omponent
.
Factory
interface
Factory
{
interface
Factory
{
fun
create
(
fun
create
(
appComponent
:
AppComponent
appComponent
:
AppComponent
...
@@ -43,8 +42,8 @@ abstract class SettingsScreenModule{
...
@@ -43,8 +42,8 @@ abstract class SettingsScreenModule{
@Binds
@Binds
abstract
fun
provideContext
(
activity
:
RoomParkMainActivity
):
Context
abstract
fun
provideContext
(
activity
:
RoomParkMainActivity
):
Context
@PerScreen
//
@PerScreen
@Binds
//
@Binds
abstract
fun
provideAuth
(
contract
:
AuthContractModule
):
AuthContract
//
abstract fun provideAuth(contract: AuthContractModule): AuthContract
}
}
app/src/main/java/com/biganto/visual/roompark/presentation/screen/splash/ScreenDI.kt
View file @
ec95f404
...
@@ -3,31 +3,30 @@ package com.biganto.visual.roompark.presentation.screen.splash
...
@@ -3,31 +3,30 @@ package com.biganto.visual.roompark.presentation.screen.splash
import
android.content.Context
import
android.content.Context
import
com.biganto.visual.roompark.base.IBottomNavigation
import
com.biganto.visual.roompark.base.IBottomNavigation
import
com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.data.data_provider.AuthContractModule
import
com.biganto.visual.roompark.data.repository.api.retrofit.di.RetrofitModule
import
com.biganto.visual.roompark.data.repository.api.retrofit.di.RetrofitModule
import
com.biganto.visual.roompark.data.repository.db.requrey.DbModule
import
com.biganto.visual.roompark.data.repository.db.requrey.DbModule
import
com.biganto.visual.roompark.di.dagger.AppComponent
import
com.biganto.visual.roompark.di.dagger.AppComponent
import
com.biganto.visual.roompark.di.dagger.AppModule
import
com.biganto.visual.roompark.di.dagger.AppModule
import
com.biganto.visual.roompark.di.dagger.DataModule
import
com.biganto.visual.roompark.di.dagger.DataModule
import
com.biganto.visual.roompark.di.dagger.PerScreen
import
com.biganto.visual.roompark.di.dagger.PerScreen
import
com.biganto.visual.roompark.domain.contract.AuthContract
import
com.biganto.visual.roompark.presentation.screen.auth.AuthScreenModule
import
com.biganto.visual.roompark.presentation.screen.auth.AuthScreenModule
import
dagger.Binds
import
dagger.Binds
import
dagger.BindsInstance
import
dagger.BindsInstance
import
dagger.Component
import
dagger.Module
import
dagger.Module
import
dagger.Subcomponent
///**
///**
// * Created by Vladislav Bogdashkin on 30.09.2019.
// * Created by Vladislav Bogdashkin on 30.09.2019.
// */
// */
@PerScreen
@PerScreen
@Component
(
@Subcomponent
(
modules
=
[
AuthScreenModule
::
class
,
DataModule
::
class
,
RetrofitModule
::
class
,
AppModule
::
class
,
DbModule
::
class
],
modules
=
[
AuthScreenModule
::
class
,
DataModule
::
class
,
RetrofitModule
::
class
,
AppModule
::
class
,
DbModule
::
class
]
dependencies
=
[
AppComponent
::
class
])
// ,dependencies = [AppComponent::class]
)
interface
SplashScreenComponent
{
interface
SplashScreenComponent
{
@
C
omponent
.
Factory
@
Subc
omponent
.
Factory
interface
Factory
{
interface
Factory
{
fun
create
(
fun
create
(
appComponent
:
AppComponent
appComponent
:
AppComponent
...
@@ -47,9 +46,9 @@ abstract class SplashScreenModule{
...
@@ -47,9 +46,9 @@ abstract class SplashScreenModule{
@Binds
@Binds
abstract
fun
provideContext
(
activity
:
RoomParkMainActivity
):
Context
abstract
fun
provideContext
(
activity
:
RoomParkMainActivity
):
Context
@PerScreen
//
@PerScreen
@Binds
//
@Binds
abstract
fun
provideAuth
(
contract
:
AuthContractModule
):
AuthContract
//
abstract fun provideAuth(contract: AuthContractModule): AuthContract
// @PerScreen
// @PerScreen
// @Binds
// @Binds
...
...
dependencies.gradle
View file @
ec95f404
...
@@ -21,6 +21,6 @@ ext {
...
@@ -21,6 +21,6 @@ ext {
rxJavaVersion
=
'3.0.0-RC3'
rxJavaVersion
=
'3.0.0-RC3'
mosbyMviConductorVersion
=
'3.1.0'
mosbyMviConductorVersion
=
'3.1.0'
butterKnifeVersion
=
'10.2.0'
butterKnifeVersion
=
'10.2.0'
daggerVersion
=
'2.2
4
'
daggerVersion
=
'2.2
5.2
'
rxRelayVersion
=
'2.1.1'
rxRelayVersion
=
'2.1.1'
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment