Skip to content

Commit dd9860e

Browse files
Merge pull request #53 from ujizin/fix/list-repository-dispatcher
adiciona dispatchers.IO no repositorio
2 parents 02104a4 + 8acf856 commit dd9860e

File tree

13 files changed

+58
-4
lines changed

13 files changed

+58
-4
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ dependencies {
1515
implementation(project(Dependencies.Module.core_networking))
1616
implementation(project(Dependencies.Module.core_shared_ui))
1717
implementation(project(Dependencies.Module.core_navigation))
18+
implementation(project(Dependencies.Module.core_shared))
19+
1820
implementation(Dependencies.Koin.koin)
1921
Dependencies.Kotlin.list.forEach { implementation(it) }
2022
Dependencies.Support.list.forEach { implementation(it) }

app/src/main/java/com/codandotv/streamplayerapp/di/AppModule.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@ package com.codandotv.streamplayerapp.di
22

33
import android.content.res.Resources
44
import com.codandotv.streamplayerapp.core_networking.di.NetworkModule
5+
import com.codandotv.streamplayerapp.core_shared.qualifier.QualifierDispatcherIO
6+
import kotlinx.coroutines.Dispatchers
57
import org.koin.android.ext.koin.androidContext
8+
import org.koin.core.qualifier.named
69
import org.koin.dsl.module
710

811
object AppModule {
912
private val module = module {
1013
single<Resources> { androidContext().resources }
14+
single(QualifierDispatcherIO) { Dispatchers.IO }
1115
}
1216
val list = module + NetworkModule.module
1317
}

buildSrc/src/main/java/Dependencies.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ object Dependencies {
1212
object Module {
1313
const val core_networking = ":core-networking"
1414
const val core_shared_ui = ":core-shared-ui"
15+
const val core_shared = ":core-shared"
1516
const val feature_list_streams = ":feature-list-streams"
1617
const val core_navigation = ":core-navigation"
1718
}

core-shared/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

core-shared/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
android{
2+
namespace = "${Config.packageName}core_shared"
3+
}
4+
dependencies {
5+
implementation(Dependencies.Koin.koin)
6+
}

core-shared/consumer-rules.pro

Whitespace-only changes.

core-shared/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
<uses-permission android:name="android.permission.INTERNET" />
4+
</manifest>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.codandotv.streamplayerapp.core_shared.qualifier
2+
3+
import org.koin.core.qualifier.Qualifier
4+
import org.koin.core.qualifier.QualifierValue
5+
6+
object QualifierDispatcherIO : Qualifier {
7+
override val value: QualifierValue
8+
get() = "dispatcherIO"
9+
}

feature-list-streams/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ android {
1414
implementation(project(Dependencies.Module.core_networking))
1515
implementation(project(Dependencies.Module.core_shared_ui))
1616
implementation(project(Dependencies.Module.core_navigation))
17+
implementation(project(Dependencies.Module.core_shared))
1718
Dependencies.Koin.list.forEach { implementation(it) }
1819
Dependencies.Retrofit.list.forEach { implementation(it) }
1920
Dependencies.Kotlin.list.forEach { implementation(it) }

0 commit comments

Comments
 (0)