├── .idea ├── .gitignore ├── caches │ └── build_file_checksums.ser ├── encodings.xml ├── vcs.xml ├── misc.xml ├── libraries │ ├── Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml │ ├── Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml │ ├── Gradle__rxjava_2_2_7.xml │ ├── Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml │ ├── Gradle__annotations_13_0.xml │ ├── Gradle__koin_core_2_0_0_rc_1.xml │ ├── Gradle__koin_android_2_0_0_rc_1.xml │ ├── Gradle__androidx_room_room_common_2_2_3_jar.xml │ ├── Gradle__kotlin_stdlib_1_3_61.xml │ ├── Gradle__reactive_streams_1_0_2.xml │ ├── Gradle__androidx_arch_core_core_common_2_0_1_jar.xml │ ├── Gradle__androidx_arch_core_core_common_2_1_0_jar.xml │ ├── Gradle__androidx_collection_collection_1_1_0_jar.xml │ ├── Gradle__kotlin_stdlib_jdk7_1_3_61.xml │ ├── Gradle__kotlin_stdlib_common_1_3_61.xml │ ├── Gradle__androidx_lifecycle_lifecycle_common_2_1_0_jar.xml │ ├── Gradle__kotlinx_coroutines_core_1_3_3.xml │ ├── Gradle__kotlinx_coroutines_android_1_3_3.xml │ ├── Gradle__androidx_loader_loader_1_0_0_aar.xml │ ├── Gradle__androidx_sqlite_sqlite_2_0_1_aar.xml │ ├── Gradle__androidx_core_core_ktx_1_0_1_aar.xml │ ├── Gradle__androidx_room_room_ktx_2_2_3_aar.xml │ ├── Gradle__androidx_activity_activity_1_0_0_aar.xml │ ├── Gradle__androidx_cardview_cardview_1_0_0_aar.xml │ ├── Gradle__junit_junit_4_12_jar.xml │ ├── Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml │ ├── Gradle__androidx_customview_customview_1_0_0_aar.xml │ ├── Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml │ ├── Gradle__androidx_arch_core_core_runtime_2_0_1_aar.xml │ ├── Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml │ ├── Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml │ ├── Gradle__androidx_sqlite_sqlite_framework_2_0_1_aar.xml │ ├── Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_process_2_0_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_service_2_0_0_aar.xml │ ├── Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml │ ├── Gradle__com_squareup_okio_okio_1_15_0_jar.xml │ ├── Gradle__javax_inject_javax_inject_1_jar.xml │ ├── Gradle__androidx_appcompat_appcompat_resources_1_1_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml │ ├── Gradle__androidx_databinding_databinding_runtime_3_5_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_extensions_2_0_0_aar.xml │ ├── Gradle__com_google_code_gson_gson_2_8_5_jar.xml │ ├── Gradle__androidx_databinding_databinding_adapters_3_5_0_aar.xml │ ├── Gradle__com_squareup_javawriter_2_1_1_jar.xml │ ├── Gradle__org_jetbrains_annotations_13_0_jar.xml │ ├── Gradle__io_reactivex_rxjava2_rxjava_2_2_7_jar.xml │ ├── Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml │ ├── Gradle__org_koin_koin_core_2_0_0_rc_1_jar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_viewmodel_ktx_2_1_0_aar.xml │ ├── Gradle__com_squareup_okhttp3_okhttp_3_12_0_jar.xml │ ├── Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml │ ├── Gradle__io_reactivex_rxjava2_rxkotlin_2_2_0_jar.xml │ ├── Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml │ ├── Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml │ ├── Gradle__androidx_annotation_annotation_1_1_0_jar.xml │ ├── Gradle__com_squareup_retrofit2_retrofit_2_6_0_jar.xml │ ├── Gradle__org_koin_koin_core_ext_2_0_0_rc_1_jar.xml │ ├── Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml │ ├── Gradle__androidx_core_core_1_1_0_aar.xml │ ├── Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_3_61_jar.xml │ ├── Gradle__androidx_test_runner_1_1_1_aar.xml │ ├── Gradle__com_squareup_retrofit2_converter_gson_2_6_0_jar.xml │ ├── Gradle__org_reactivestreams_reactive_streams_1_0_2_jar.xml │ ├── Gradle__com_squareup_retrofit2_adapter_rxjava2_2_6_0_jar.xml │ ├── Gradle__androidx_test_monitor_1_1_1_aar.xml │ ├── Gradle__androidx_databinding_databinding_common_3_5_0_jar.xml │ ├── Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_3_61_jar.xml │ ├── Gradle__androidx_fragment_fragment_1_1_0_aar.xml │ ├── Gradle__androidx_appcompat_appcompat_1_1_0_aar.xml │ ├── Gradle__androidx_room_room_runtime_2_2_3_aar.xml │ ├── Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_3_61_jar.xml │ ├── Gradle__androidx_transition_transition_1_2_0_aar.xml │ ├── Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml │ ├── Gradle__io_reactivex_rxjava2_rxandroid_2_1_1_aar.xml │ ├── Gradle__com_google_android_material_material_1_1_0_aar.xml │ ├── Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_core_1_3_3_jar.xml │ ├── Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml │ ├── Gradle__androidx_recyclerview_recyclerview_1_1_0_aar.xml │ ├── Gradle__org_koin_koin_android_2_0_0_rc_1_aar.xml │ ├── Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_android_1_3_3_jar.xml │ ├── Gradle__androidx_test_espresso_espresso_core_3_1_1_aar.xml │ ├── Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml │ ├── Gradle__org_koin_koin_androidx_scope_2_0_0_rc_1_aar.xml │ ├── Gradle__org_jetbrains_kotlin_kotlin_android_extensions_runtime_1_3_61_jar.xml │ ├── Gradle__org_koin_koin_androidx_viewmodel_2_0_0_rc_1_aar.xml │ └── Gradle__androidx_test_espresso_espresso_idling_resource_3_1_1_aar.xml ├── runConfigurations.xml ├── modules.xml ├── gradle.xml ├── assetWizardSettings.xml └── codeStyles │ └── Project.xml ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── iconfinder_flag-brazil_748057.png ├── data ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ ├── res │ │ └── values │ │ │ └── strings.xml │ │ └── java │ │ └── com │ │ └── example │ │ └── data │ │ ├── remote │ │ ├── api │ │ │ └── ServerApi.kt │ │ ├── model │ │ │ └── AndroidJobPayload.kt │ │ ├── mapper │ │ │ └── AndroidJobMapper.kt │ │ └── source │ │ │ └── RemoteDataSourceImpl.kt │ │ ├── local │ │ ├── model │ │ │ └── AndroidJobCache.kt │ │ ├── database │ │ │ ├── JobsDataBase.kt │ │ │ └── JobsDao.kt │ │ ├── mapper │ │ │ └── AndroidJobCacheMapper.kt │ │ └── source │ │ │ └── JobsCacheSource.kt │ │ ├── di │ │ ├── DataCacheModule.kt │ │ ├── DataModule.kt │ │ └── DataRemoteModule.kt │ │ ├── extensions │ │ └── mapRemoteErrors.kt │ │ └── AndroidJobsRepositoryImpl.kt ├── .gitignore ├── build.gradle └── data.iml ├── iconfinder_flag-united-kingdom_748024.png ├── app ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── drawable │ │ │ │ ├── ic_add_black_24dp.xml │ │ │ │ └── ic_launcher_background.xml │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ └── layout │ │ │ │ ├── item_android_job.xml │ │ │ │ ├── activity_main.xml │ │ │ │ └── activity_android_jobs_list.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── mymoduleexample │ │ │ │ ├── utils │ │ │ │ ├── exhaustive.kt │ │ │ │ └── Event.kt │ │ │ │ ├── extension │ │ │ │ ├── ViewGroup.kt │ │ │ │ ├── Context.kt │ │ │ │ └── View.kt │ │ │ │ ├── di │ │ │ │ └── PresentationModule.kt │ │ │ │ ├── MyModuleApplication.kt │ │ │ │ └── feature │ │ │ │ ├── main │ │ │ │ ├── MainViewModel.kt │ │ │ │ └── MainActivity.kt │ │ │ │ ├── viewmodel │ │ │ │ └── ViewState.kt │ │ │ │ └── list │ │ │ │ ├── AndroidJobsAdapter.kt │ │ │ │ ├── AndroidJobListViewModel.kt │ │ │ │ └── AndroidJobsListActivity.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── mymoduleexample │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── com │ │ └── example │ │ └── mymoduleexample │ │ └── ExampleInstrumentedTest.kt ├── .gitignore ├── proguard-rules.pro └── build.gradle ├── domain ├── src │ └── main │ │ └── java │ │ └── com │ │ └── example │ │ └── domain │ │ ├── entities │ │ └── AndroidJob.kt │ │ ├── responses │ │ ├── ResultRequired.kt │ │ └── ResultRemote.kt │ │ ├── repository │ │ └── AndroidJobsRepository.kt │ │ ├── di │ │ └── DomainModule.kt │ │ └── usecases │ │ └── GetJobsUseCases.kt ├── build.gradle ├── .gitignore └── domain.iml ├── local.properties ├── android-my-bootcamp-android-modularization.iml ├── gradle.properties ├── gradlew.bat ├── README.md ├── dependencies.gradle └── gradlew /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /workspace.xml -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':domain', ':data' 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifucolo/android-modularization/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /iconfinder_flag-brazil_748057.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifucolo/android-modularization/HEAD/iconfinder_flag-brazil_748057.png -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifucolo/android-modularization/HEAD/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /data/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /iconfinder_flag-united-kingdom_748024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifucolo/android-modularization/HEAD/iconfinder_flag-united-kingdom_748024.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifucolo/android-modularization/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifucolo/android-modularization/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifucolo/android-modularization/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifucolo/android-modularization/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/java/com/example/mymoduleexample/utils/exhaustive.kt: -------------------------------------------------------------------------------- 1 | package com.example.mymoduleexample.utils 2 | 3 | val T.exhaustive: T 4 | get() = this -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifucolo/android-modularization/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifucolo/android-modularization/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifucolo/android-modularization/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifucolo/android-modularization/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifucolo/android-modularization/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifucolo/android-modularization/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /data/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | https://demo8470178.mockable.io 4 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /domain/src/main/java/com/example/domain/entities/AndroidJob.kt: -------------------------------------------------------------------------------- 1 | package com.example.domain.entities 2 | 3 | data class AndroidJob( 4 | val title: String, 5 | val experienceTimeRequired: String, 6 | val native: Boolean, 7 | val country: String 8 | ) -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #008577 4 | #00574B 5 | #D81B60 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jan 10 12:56:56 CET 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /domain/src/main/java/com/example/domain/responses/ResultRequired.kt: -------------------------------------------------------------------------------- 1 | package com.example.domain.responses 2 | 3 | sealed class ResultRequired { 4 | data class Success(val result: T): ResultRequired() 5 | data class Error(val throwable: Throwable): ResultRequired() 6 | } -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /data/src/main/java/com/example/data/remote/api/ServerApi.kt: -------------------------------------------------------------------------------- 1 | package com.example.data.remote.api 2 | 3 | import com.example.data.remote.model.JobsPayload 4 | import io.reactivex.Single 5 | import retrofit2.http.GET 6 | 7 | interface ServerApi { 8 | 9 | @GET("/android-jobs") 10 | suspend fun fetchJobs(): JobsPayload 11 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/mymoduleexample/extension/ViewGroup.kt: -------------------------------------------------------------------------------- 1 | package com.example.mymoduleexample.extension 2 | 3 | import android.view.LayoutInflater 4 | import android.view.View 5 | import android.view.ViewGroup 6 | 7 | fun ViewGroup.inflate(layoutId: Int, attachToRoot: Boolean = false): View { 8 | return LayoutInflater.from(context).inflate(layoutId, this, attachToRoot) 9 | } -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/mymoduleexample/extension/Context.kt: -------------------------------------------------------------------------------- 1 | package com.example.mymoduleexample.extension 2 | 3 | import android.content.Context 4 | import android.widget.Toast 5 | 6 | /** 7 | * Created by bruno on 07/07/17. 8 | */ 9 | inline fun Context.toast(message: CharSequence, duration: Int = Toast.LENGTH_SHORT) { 10 | Toast.makeText(this, message, duration).show() 11 | } -------------------------------------------------------------------------------- /domain/src/main/java/com/example/domain/repository/AndroidJobsRepository.kt: -------------------------------------------------------------------------------- 1 | package com.example.domain.repository 2 | 3 | import com.example.domain.entities.AndroidJob 4 | import com.example.domain.responses.ResultRequired 5 | import kotlinx.coroutines.flow.Flow 6 | 7 | interface AndroidJobsRepository { 8 | fun getJobs(): Flow>> 9 | fun add() 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/mymoduleexample/extension/View.kt: -------------------------------------------------------------------------------- 1 | package com.example.mymoduleexample.extension 2 | 3 | import android.view.View 4 | 5 | fun View.visible(visible: Boolean = false) { 6 | visibility = if (visible) View.VISIBLE else View.GONE 7 | } 8 | 9 | fun View.show() { 10 | visibility = View.VISIBLE 11 | } 12 | 13 | fun View.hide() { 14 | visibility = View.GONE 15 | } -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /data/src/main/java/com/example/data/local/model/AndroidJobCache.kt: -------------------------------------------------------------------------------- 1 | package com.example.data.local.model 2 | 3 | import androidx.room.Entity 4 | import androidx.room.PrimaryKey 5 | 6 | @Entity(tableName = "jobs") 7 | data class AndroidJobCache( 8 | @PrimaryKey(autoGenerate = true) 9 | var id: Int = 0, 10 | var title: String = "", 11 | var requiredExperienceYears: Int = 0, 12 | var native: Boolean = true, 13 | var country: String = "" 14 | ) 15 | -------------------------------------------------------------------------------- /app/src/test/java/com/example/mymoduleexample/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.example.mymoduleexample 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /local.properties: -------------------------------------------------------------------------------- 1 | ## This file is automatically generated by Android Studio. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file should *NOT* be checked into Version Control Systems, 5 | # as it contains information specific to your local configuration. 6 | # 7 | # Location of the SDK. This is only used by Gradle. 8 | # For customization when using a Version Control System, please read the 9 | # header note. 10 | sdk.dir=/Users/iagomendesfucolo/Library/Android/sdk 11 | -------------------------------------------------------------------------------- /domain/src/main/java/com/example/domain/di/DomainModule.kt: -------------------------------------------------------------------------------- 1 | package com.example.domain.di 2 | 3 | import com.example.domain.usecases.GetJobsUseCases 4 | import com.example.domain.usecases.GetJobsUseCasesImpl 5 | import io.reactivex.schedulers.Schedulers 6 | import org.koin.dsl.module 7 | 8 | val useCaseModule = module { 9 | 10 | factory { 11 | GetJobsUseCasesImpl( 12 | repository = get() 13 | ) 14 | } 15 | } 16 | 17 | val domainModule = listOf(useCaseModule) -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /domain/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | apply plugin: 'kotlin' 3 | 4 | dependencies { 5 | 6 | def dependencies = rootProject.ext.dependencies 7 | 8 | implementation dependencies.kotlin 9 | implementation dependencies.rxJava 10 | implementation dependencies.koin 11 | 12 | implementation dependencies.coroutinesCore 13 | implementation dependencies.coroutinesAndroid 14 | } 15 | 16 | sourceCompatibility = JavaVersion.VERSION_1_8 17 | targetCompatibility = JavaVersion.VERSION_1_8 -------------------------------------------------------------------------------- /domain/src/main/java/com/example/domain/responses/ResultRemote.kt: -------------------------------------------------------------------------------- 1 | package com.example.domain.responses 2 | 3 | sealed class ResultRemote { 4 | data class Success(val response: T): ResultRemote() 5 | 6 | sealed class ErrorResponse(open val throwable: Throwable) : ResultRemote(){ 7 | data class Unknown(override val throwable: Throwable): ErrorResponse(throwable) 8 | data class TokenExpired(override val throwable: Throwable): ErrorResponse(throwable) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MyModuleExample 3 | Ver lista de Android Jobs 4 | Sair 5 | Carregando… 6 | Ops! tivemos um problema, volte mais tarde 7 | Tente novamente 8 | Sem resultados. 9 | Adicionar 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 |