├── app ├── .gitignore ├── 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 │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ └── drawable │ │ │ └── ic_launcher_background.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── hadilq │ │ └── guidomia │ │ ├── di │ │ ├── AppModule.kt │ │ ├── fragment │ │ │ └── FragmentFactoryImpl.kt │ │ ├── viewmodel │ │ │ └── ViewModelFactoryImpl.kt │ │ └── AppComponent.kt │ │ └── CustomApplication.kt ├── proguard-rules.pro └── build.gradle.kts ├── core ├── impl │ ├── .gitignore │ ├── src │ │ └── main │ │ │ ├── res │ │ │ └── values │ │ │ │ └── strings.xml │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ └── com │ │ │ └── hadilq │ │ │ └── guidomia │ │ │ └── core │ │ │ └── impl │ │ │ └── DispatcherProviderImpl.kt │ └── build.gradle.kts └── public │ ├── .gitignore │ ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── dimens.xml │ │ │ ├── colors.xml │ │ │ └── themes.xml │ │ └── values-night │ │ │ └── themes.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── hadilq │ │ └── guidomia │ │ └── core │ │ └── api │ │ ├── SimpleViewModelFactory.kt │ │ ├── SimpleFragmentFactory.kt │ │ ├── FragmentFactory.kt │ │ ├── DispatcherProvider.kt │ │ ├── ViewModelFactory.kt │ │ ├── FragmentKey.kt │ │ ├── ViewModelKey.kt │ │ └── ViewBinding.kt │ └── build.gradle.kts ├── di └── public │ ├── .gitignore │ ├── src │ └── main │ │ └── java │ │ └── com │ │ └── hadilq │ │ └── guidomia │ │ └── di │ │ └── api │ │ ├── AppScope.kt │ │ ├── FragmentScope.kt │ │ ├── RetainScope.kt │ │ ├── SingleActivityScope.kt │ │ └── SingleIn.kt │ └── build.gradle.kts ├── guidomia ├── impl │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── res │ │ │ │ ├── drawable │ │ │ │ │ ├── logo.png │ │ │ │ │ ├── star.png │ │ │ │ │ ├── tacoma.jpg │ │ │ │ │ ├── bmw_330i.jpg │ │ │ │ │ ├── range_rover.jpg │ │ │ │ │ ├── alpine_roadster.jpg │ │ │ │ │ ├── mercedez_benz_glc.jpg │ │ │ │ │ ├── filter_background.xml │ │ │ │ │ ├── filter_edittext_background.xml │ │ │ │ │ ├── pros_cons_dot.xml │ │ │ │ │ └── ic_baseline_dehaze_24.xml │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── dimens.xml │ │ │ │ └── layout │ │ │ │ │ ├── line_item.xml │ │ │ │ │ ├── pros_cons_item.xml │ │ │ │ │ ├── filter_item.xml │ │ │ │ │ ├── fragment_guidomia.xml │ │ │ │ │ └── car_item.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── hadilq │ │ │ │ │ └── guidomia │ │ │ │ │ └── guidomia │ │ │ │ │ └── impl │ │ │ │ │ ├── domain │ │ │ │ │ ├── entity │ │ │ │ │ │ ├── MakeEntity.kt │ │ │ │ │ │ ├── ModelEntity.kt │ │ │ │ │ │ ├── PriceEntity.kt │ │ │ │ │ │ ├── RateEntity.kt │ │ │ │ │ │ ├── FilterEntity.kt │ │ │ │ │ │ ├── ImageEntity.kt │ │ │ │ │ │ └── CarEntity.kt │ │ │ │ │ └── usecase │ │ │ │ │ │ ├── GetCars.kt │ │ │ │ │ │ └── GetFilteredCars.kt │ │ │ │ │ ├── presentation │ │ │ │ │ ├── CarItemOnClick.kt │ │ │ │ │ ├── CarItemFilter.kt │ │ │ │ │ ├── CarModelMapper.kt │ │ │ │ │ ├── CarModel.kt │ │ │ │ │ ├── di │ │ │ │ │ │ ├── GuidomiaModule.kt │ │ │ │ │ │ └── GuidomiaFragmentComponent.kt │ │ │ │ │ ├── GuidomiaNavigatorImpl.kt │ │ │ │ │ ├── GuidomiaViewModel.kt │ │ │ │ │ ├── GuidomiaFragment.kt │ │ │ │ │ └── GuidomiaRecyclerAdapter.kt │ │ │ │ │ ├── data │ │ │ │ │ ├── datasource │ │ │ │ │ │ ├── CarsCacheDataSource.kt │ │ │ │ │ │ ├── CarsDataSource.kt │ │ │ │ │ │ └── CarDatabaseDataSource.kt │ │ │ │ │ ├── entity │ │ │ │ │ │ └── CarDataEntity.kt │ │ │ │ │ ├── mapper │ │ │ │ │ │ ├── CarDatabaseMapper.kt │ │ │ │ │ │ └── CarDataMapper.kt │ │ │ │ │ └── repository │ │ │ │ │ │ └── CarsRepository.kt │ │ │ │ │ └── GuidomiaCommandHook.kt │ │ │ └── assets │ │ │ │ └── car_list.json │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── hadilq │ │ │ └── guidomia │ │ │ └── guidomia │ │ │ └── impl │ │ │ ├── domain │ │ │ ├── entity │ │ │ │ ├── MakeEntityProvider.kt │ │ │ │ ├── ModelEntityProvider.kt │ │ │ │ └── CarEntityProvider.kt │ │ │ └── usecase │ │ │ │ └── GetFilteredCarsTest.kt │ │ │ └── data │ │ │ └── repository │ │ │ └── CarRepositoryTest.kt │ └── build.gradle.kts └── public │ ├── .gitignore │ ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── hadilq │ │ └── guidomia │ │ └── guidomia │ │ └── api │ │ ├── GetGuidomiaNavigatorFactoryCommand.kt │ │ ├── GuidomiaNavigator.kt │ │ └── GuidomiaNavigatorFactory.kt │ └── build.gradle.kts ├── database ├── public │ ├── .gitignore │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── hadilq │ │ │ └── guidomia │ │ │ └── database │ │ │ └── api │ │ │ ├── GetCarEntityCommand.kt │ │ │ ├── CarDataEntityCommand.kt │ │ │ └── CarDataEntity.kt │ └── build.gradle.kts └── impl │ ├── .gitignore │ ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── hadilq │ │ └── guidomia │ │ └── database │ │ └── impl │ │ ├── CarDataEntityCommandHook.kt │ │ ├── entiry │ │ ├── CarWithProsCons.kt │ │ ├── CarEntity.kt │ │ └── ProConEntity.kt │ │ ├── AppDatabase.kt │ │ ├── CarDao.kt │ │ ├── di │ │ └── DatabaseModule.kt │ │ ├── CarEntityMapper.kt │ │ └── CarDataEntityCommandImpl.kt │ └── build.gradle.kts ├── single-activity ├── impl │ ├── .gitignore │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── res │ │ │ └── layout │ │ │ │ └── activity_main.xml │ │ │ └── java │ │ │ └── com │ │ │ └── hadilq │ │ │ └── guidomia │ │ │ └── singleactivity │ │ │ └── impl │ │ │ ├── di │ │ │ ├── SingleActivityComponentProvider.kt │ │ │ └── SingleActivityComponent.kt │ │ │ ├── SingleActivity.kt │ │ │ └── NavigatorImpl.kt │ └── build.gradle.kts └── public │ ├── .gitignore │ ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── hadilq │ │ └── guidomia │ │ └── singleactivity │ │ └── api │ │ ├── Navigator.kt │ │ └── NavigatorFactory.kt │ └── build.gradle.kts ├── feature-flags ├── impl │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── hadilq │ │ └── guidomia │ │ └── featureflags │ │ └── impl │ │ └── CommandKuModule.kt └── public │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ └── main │ └── java │ └── com │ └── hadilq │ └── guidomia │ └── featureflags │ └── api │ └── CommandExecutor.kt ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── doc-image └── dip-module-dependencies-switch.png ├── .gitignore ├── .idea ├── codeStyles │ ├── codeStyleConfig.xml │ └── Project.xml ├── compiler.xml └── .gitignore ├── settings.gradle.kts ├── gradle.properties ├── gradlew.bat ├── README.md └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /core/impl/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /core/public/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /di/public/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /guidomia/impl/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /guidomia/public/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /database/public/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /single-activity/impl/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /feature-flags/impl/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /feature-flags/public/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /single-activity/public/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /database/impl/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /schemas 3 | -------------------------------------------------------------------------------- /core/impl/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /core/public/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Guidomia 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hadilq/CleanArchitecture/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /core/impl/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /core/public/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /guidomia/public/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hadilq/CleanArchitecture/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hadilq/CleanArchitecture/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /database/impl/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /doc-image/dip-module-dependencies-switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hadilq/CleanArchitecture/HEAD/doc-image/dip-module-dependencies-switch.png -------------------------------------------------------------------------------- /guidomia/impl/src/main/res/drawable/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hadilq/CleanArchitecture/HEAD/guidomia/impl/src/main/res/drawable/logo.png -------------------------------------------------------------------------------- /guidomia/impl/src/main/res/drawable/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hadilq/CleanArchitecture/HEAD/guidomia/impl/src/main/res/drawable/star.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hadilq/CleanArchitecture/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hadilq/CleanArchitecture/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /guidomia/impl/src/main/res/drawable/tacoma.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hadilq/CleanArchitecture/HEAD/guidomia/impl/src/main/res/drawable/tacoma.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | .DS_Store 5 | /build 6 | /captures 7 | .externalNativeBuild 8 | .cxx 9 | local.properties 10 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hadilq/CleanArchitecture/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /core/public/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2dp 4 | 5 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/res/drawable/bmw_330i.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hadilq/CleanArchitecture/HEAD/guidomia/impl/src/main/res/drawable/bmw_330i.jpg -------------------------------------------------------------------------------- /single-activity/impl/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /single-activity/public/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hadilq/CleanArchitecture/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/hadilq/CleanArchitecture/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/hadilq/CleanArchitecture/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /guidomia/impl/src/main/res/drawable/range_rover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hadilq/CleanArchitecture/HEAD/guidomia/impl/src/main/res/drawable/range_rover.jpg -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hadilq/CleanArchitecture/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/hadilq/CleanArchitecture/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /guidomia/impl/src/main/res/drawable/alpine_roadster.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hadilq/CleanArchitecture/HEAD/guidomia/impl/src/main/res/drawable/alpine_roadster.jpg -------------------------------------------------------------------------------- /guidomia/impl/src/main/res/drawable/mercedez_benz_glc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hadilq/CleanArchitecture/HEAD/guidomia/impl/src/main/res/drawable/mercedez_benz_glc.jpg -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/res/drawable/filter_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/res/drawable/filter_edittext_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | caches 5 | libraries 6 | modules.xml 7 | workspace.xml 8 | navEditor.xml 9 | assetWizardSettings.xml 10 | jarRepositories.xml 11 | gradle.xml 12 | misc.xml 13 | runConfigurations.xml 14 | vcs.xml 15 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Apr 15 16:25:31 EDT 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /database/public/src/main/java/com/hadilq/guidomia/database/api/GetCarEntityCommand.kt: -------------------------------------------------------------------------------- 1 | package com.hadilq.guidomia.database.api 2 | 3 | import com.github.hadilq.commandku.api.Command 4 | 5 | class GetCarEntityCommand : Command 6 | 7 | class GetCarEntityCommandResult( 8 | val result: CarDataEntityCommand 9 | ) : Command 10 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/res/drawable/pros_cons_dot.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /single-activity/impl/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /guidomia/public/src/main/java/com/hadilq/guidomia/guidomia/api/GetGuidomiaNavigatorFactoryCommand.kt: -------------------------------------------------------------------------------- 1 | package com.hadilq.guidomia.guidomia.api 2 | 3 | import com.github.hadilq.commandku.api.Command 4 | 5 | class GetGuidomiaNavigatorFactoryCommand : Command 6 | 7 | class GetGuidomiaNavigatorFactoryCommandResult( 8 | val result: GuidomiaNavigatorFactory 9 | ) : Command -------------------------------------------------------------------------------- /core/public/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FC6016 4 | #858585 5 | #D5D5D5 6 | #73000000 7 | #FF000000 8 | #FFFFFFFF 9 | 10 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/res/drawable/ic_baseline_dehaze_24.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Tacoma 2021 3 | Get your\'s now 4 | 5 | Price : %dk 6 | %s %s 7 | Pros : 8 | Cons : 9 | Filters 10 | Any make 11 | Any model 12 | 13 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/res/layout/line_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 14 | 15 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/res/layout/pros_cons_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | -------------------------------------------------------------------------------- /di/public/src/main/java/com/hadilq/guidomia/di/api/AppScope.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.di.api 17 | 18 | abstract class AppScope private constructor() 19 | -------------------------------------------------------------------------------- /di/public/src/main/java/com/hadilq/guidomia/di/api/FragmentScope.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.di.api 17 | 18 | abstract class FragmentScope private constructor() 19 | -------------------------------------------------------------------------------- /di/public/src/main/java/com/hadilq/guidomia/di/api/RetainScope.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.di.api 17 | 18 | abstract class RetainScope private constructor() 19 | -------------------------------------------------------------------------------- /di/public/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | plugins { 17 | kotlin("jvm") 18 | } 19 | 20 | dependencies { 21 | implementation(Depends.kotlinStdLib) 22 | implementation(Depends.dagger) 23 | } 24 | -------------------------------------------------------------------------------- /di/public/src/main/java/com/hadilq/guidomia/di/api/SingleActivityScope.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.di.api 17 | 18 | abstract class SingleActivityScope private constructor() 19 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 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 -------------------------------------------------------------------------------- /guidomia/impl/src/main/java/com/hadilq/guidomia/guidomia/impl/domain/entity/MakeEntity.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.impl.domain.entity 17 | 18 | inline class MakeEntity(val value: String) 19 | -------------------------------------------------------------------------------- /guidomia/public/src/main/java/com/hadilq/guidomia/guidomia/api/GuidomiaNavigator.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.api 17 | 18 | interface GuidomiaNavigator { 19 | 20 | fun commit() 21 | } 22 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/java/com/hadilq/guidomia/guidomia/impl/domain/entity/ModelEntity.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.impl.domain.entity 17 | 18 | inline class ModelEntity(val value: String) 19 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/java/com/hadilq/guidomia/guidomia/impl/domain/entity/PriceEntity.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.impl.domain.entity 17 | 18 | inline class PriceEntity(val value: Float) 19 | -------------------------------------------------------------------------------- /database/public/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | plugins { 17 | kotlin("jvm") 18 | } 19 | 20 | dependencies { 21 | implementation(Depends.kotlinStdLib) 22 | implementation(project(Modules.featureFlagsPublic)) 23 | } 24 | -------------------------------------------------------------------------------- /core/public/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/java/com/hadilq/guidomia/guidomia/impl/presentation/CarItemOnClick.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.impl.presentation 17 | 18 | interface CarItemOnClick { 19 | 20 | fun onClickCar(position: Int) 21 | } 22 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/java/com/hadilq/guidomia/guidomia/impl/domain/entity/RateEntity.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.impl.domain.entity 17 | 18 | enum class Rate(val value: Int) { 19 | ONE(1), TWO(2), THREE(3), FOUR(4), FIVE(5) 20 | } 21 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/java/com/hadilq/guidomia/guidomia/impl/presentation/CarItemFilter.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.impl.presentation 17 | 18 | interface CarItemFilter { 19 | 20 | fun onNewFilter(filterModel: FilterModel) 21 | } 22 | -------------------------------------------------------------------------------- /core/public/src/main/java/com/hadilq/guidomia/core/api/SimpleViewModelFactory.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.core.api 17 | 18 | import androidx.lifecycle.ViewModel 19 | 20 | interface SimpleViewModelFactory { 21 | 22 | fun create(): ViewModel 23 | } 24 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/java/com/hadilq/guidomia/guidomia/impl/domain/entity/FilterEntity.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.impl.domain.entity 17 | 18 | data class FilterEntity( 19 | val make: MakeEntity, 20 | val model: ModelEntity, 21 | ) 22 | -------------------------------------------------------------------------------- /core/public/src/main/java/com/hadilq/guidomia/core/api/SimpleFragmentFactory.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.core.api 17 | 18 | import androidx.fragment.app.Fragment 19 | 20 | interface SimpleFragmentFactory { 21 | 22 | fun instantiate(): Fragment 23 | } 24 | -------------------------------------------------------------------------------- /single-activity/public/src/main/java/com/hadilq/guidomia/singleactivity/api/Navigator.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.singleactivity.api 17 | 18 | import androidx.fragment.app.Fragment 19 | 20 | interface Navigator { 21 | fun commit(fragment: Fragment) 22 | } -------------------------------------------------------------------------------- /guidomia/impl/src/main/java/com/hadilq/guidomia/guidomia/impl/domain/entity/ImageEntity.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.impl.domain.entity 17 | 18 | import androidx.annotation.DrawableRes 19 | 20 | inline class ImageEntity(@DrawableRes val value: Int) 21 | -------------------------------------------------------------------------------- /guidomia/impl/src/test/java/com/hadilq/guidomia/guidomia/impl/domain/entity/MakeEntityProvider.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.impl.domain.entity 17 | 18 | object MakeEntityProvider { 19 | fun provide(make: String = "make") = MakeEntity(make) 20 | } 21 | -------------------------------------------------------------------------------- /guidomia/impl/src/test/java/com/hadilq/guidomia/guidomia/impl/domain/entity/ModelEntityProvider.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.impl.domain.entity 17 | 18 | object ModelEntityProvider { 19 | fun provide(model: String = "model") = ModelEntity(model) 20 | } 21 | -------------------------------------------------------------------------------- /di/public/src/main/java/com/hadilq/guidomia/di/api/SingleIn.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.di.api 17 | 18 | import javax.inject.Scope 19 | import kotlin.reflect.KClass 20 | 21 | @Scope 22 | @Retention(AnnotationRetention.RUNTIME) 23 | annotation class SingleIn(val clazz: KClass<*>) 24 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 13 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /single-activity/impl/src/main/java/com/hadilq/guidomia/singleactivity/impl/di/SingleActivityComponentProvider.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.singleactivity.impl.di 17 | 18 | interface SingleActivityComponentProvider { 19 | val singleActivityComponentProvider: SingleActivityComponent.Builder 20 | } -------------------------------------------------------------------------------- /core/public/src/main/java/com/hadilq/guidomia/core/api/FragmentFactory.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.core.api 17 | 18 | import androidx.fragment.app.Fragment 19 | import kotlin.reflect.KClass 20 | 21 | interface FragmentFactory { 22 | 23 | fun instantiate(clazz: KClass): Fragment 24 | } 25 | -------------------------------------------------------------------------------- /single-activity/public/src/main/java/com/hadilq/guidomia/singleactivity/api/NavigatorFactory.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.singleactivity.api 17 | 18 | import androidx.appcompat.app.AppCompatActivity 19 | 20 | interface NavigatorFactory { 21 | 22 | fun create(activity: AppCompatActivity): Navigator 23 | } 24 | -------------------------------------------------------------------------------- /guidomia/public/src/main/java/com/hadilq/guidomia/guidomia/api/GuidomiaNavigatorFactory.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.api 17 | 18 | import androidx.appcompat.app.AppCompatActivity 19 | 20 | interface GuidomiaNavigatorFactory { 21 | 22 | fun create(activity: AppCompatActivity): GuidomiaNavigator 23 | } 24 | -------------------------------------------------------------------------------- /database/impl/src/main/java/com/hadilq/guidomia/database/impl/CarDataEntityCommandHook.kt: -------------------------------------------------------------------------------- 1 | package com.hadilq.guidomia.database.impl 2 | 3 | import com.github.hadilq.commandku.api.* 4 | import com.hadilq.guidomia.database.api.GetCarEntityCommand 5 | import com.hadilq.guidomia.database.api.GetCarEntityCommandResult 6 | import com.hadilq.guidomia.di.api.AppScope 7 | import com.squareup.anvil.annotations.ContributesMultibinding 8 | import javax.inject.Inject 9 | 10 | @ContributesMultibinding(AppScope::class) 11 | class CarDataEntityCommandHook @Inject constructor( 12 | private val carDataEntityCommand: CarDataEntityCommandImpl, 13 | private val commandShooter: CommandResultShooter, 14 | ) : CommandHook { 15 | 16 | override fun hookUp(commandRegister: CommandRegister) { 17 | commandRegister.register(GetCarEntityCommand::class, 18 | CommandCallbackImpl(commandShooter) { 19 | GetCarEntityCommandResult(carDataEntityCommand) 20 | }) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /core/public/src/main/java/com/hadilq/guidomia/core/api/DispatcherProvider.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.core.api 17 | 18 | import kotlinx.coroutines.CoroutineDispatcher 19 | 20 | interface DispatcherProvider { 21 | val Main: CoroutineDispatcher 22 | val Default: CoroutineDispatcher 23 | val IO: CoroutineDispatcher 24 | } -------------------------------------------------------------------------------- /guidomia/public/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | plugins { 17 | id("com.android.library") 18 | kotlin("android") 19 | } 20 | 21 | configureAndroidLibrary() 22 | 23 | dependencies { 24 | implementation(project(Modules.featureFlagsPublic)) 25 | 26 | implementation(Depends.kotlinStdLib) 27 | implementation(Depends.appCompat) 28 | } 29 | -------------------------------------------------------------------------------- /database/public/src/main/java/com/hadilq/guidomia/database/api/CarDataEntityCommand.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.database.api 17 | 18 | interface CarDataEntityCommand { 19 | 20 | suspend fun getAll(): List 21 | 22 | suspend fun insertAll(cars: List) 23 | 24 | suspend fun isEmpty(): Boolean 25 | } 26 | -------------------------------------------------------------------------------- /core/public/src/main/java/com/hadilq/guidomia/core/api/ViewModelFactory.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.core.api 17 | 18 | import androidx.lifecycle.ViewModel 19 | import androidx.lifecycle.ViewModelProvider 20 | 21 | interface ViewModelFactory : ViewModelProvider.Factory { 22 | 23 | override fun create(modelClass: Class): T 24 | } 25 | -------------------------------------------------------------------------------- /database/public/src/main/java/com/hadilq/guidomia/database/api/CarDataEntity.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.database.api 17 | 18 | data class CarDatabaseEntity( 19 | val make: String, 20 | val model: String, 21 | val image: Int, 22 | val price: Float, 23 | val rating: Int, 24 | val prosList: List, 25 | val consList: List, 26 | ) 27 | -------------------------------------------------------------------------------- /single-activity/public/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | plugins { 17 | id("com.android.library") 18 | kotlin("android") 19 | } 20 | 21 | configureAndroidLibrary() 22 | 23 | dependencies { 24 | implementation(project(Modules.corePublic)) 25 | 26 | implementation(Depends.kotlinStdLib) 27 | implementation(Depends.appCompat) 28 | implementation(Depends.fragment) 29 | } 30 | -------------------------------------------------------------------------------- /feature-flags/public/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | plugins { 17 | kotlin("jvm") 18 | } 19 | 20 | tasks.withType().configureEach { 21 | kotlinOptions { 22 | freeCompilerArgs = listOf("-Xinline-classes") 23 | } 24 | } 25 | 26 | dependencies { 27 | implementation(Depends.kotlinStdLib) 28 | api(Depends.commandKuApi) 29 | } 30 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/java/com/hadilq/guidomia/guidomia/impl/data/datasource/CarsCacheDataSource.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.impl.data.datasource 17 | 18 | import com.hadilq.guidomia.guidomia.impl.domain.entity.CarEntity 19 | import javax.inject.Inject 20 | 21 | class CarsCacheDataSource @Inject constructor() { 22 | 23 | var caching: List = listOf() 24 | } 25 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/java/com/hadilq/guidomia/guidomia/impl/domain/entity/CarEntity.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.impl.domain.entity 17 | 18 | data class CarEntity( 19 | val model: ModelEntity, 20 | val make: MakeEntity, 21 | val image: ImageEntity, 22 | val price: PriceEntity, 23 | val rate: Rate, 24 | val pros: List, 25 | val cons: List, 26 | ) 27 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | include(":app") 17 | include(":di:public") 18 | include(":core:public") 19 | include(":core:impl") 20 | include(":single-activity:public") 21 | include(":single-activity:impl") 22 | include(":guidomia:public") 23 | include(":guidomia:impl") 24 | include(":database:public") 25 | include(":database:impl") 26 | include(":feature-flags:public") 27 | include(":feature-flags:impl") 28 | -------------------------------------------------------------------------------- /core/public/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | plugins { 17 | id("com.android.library") 18 | kotlin("android") 19 | } 20 | 21 | configureAndroidLibrary() 22 | 23 | android { 24 | buildFeatures { 25 | viewBinding = true 26 | } 27 | } 28 | 29 | dependencies { 30 | implementation(Depends.kotlinStdLib) 31 | implementation(Depends.material) 32 | implementation(Depends.dagger) 33 | implementation(Depends.viewModel) 34 | } 35 | -------------------------------------------------------------------------------- /core/public/src/main/java/com/hadilq/guidomia/core/api/FragmentKey.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.core.api 17 | 18 | import androidx.fragment.app.Fragment 19 | import dagger.MapKey 20 | import kotlin.reflect.KClass 21 | 22 | @MustBeDocumented 23 | @Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS) 24 | @Retention(AnnotationRetention.RUNTIME) 25 | @MapKey 26 | annotation class FragmentKey(val value: KClass) 27 | -------------------------------------------------------------------------------- /core/public/src/main/java/com/hadilq/guidomia/core/api/ViewModelKey.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.core.api 17 | 18 | import androidx.lifecycle.ViewModel 19 | import dagger.MapKey 20 | import kotlin.reflect.KClass 21 | 22 | @MustBeDocumented 23 | @Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS) 24 | @Retention(AnnotationRetention.RUNTIME) 25 | @MapKey 26 | annotation class ViewModelKey(val value: KClass) 27 | -------------------------------------------------------------------------------- /database/impl/src/main/java/com/hadilq/guidomia/database/impl/entiry/CarWithProsCons.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.database.impl.entiry 17 | 18 | import androidx.room.Embedded 19 | import androidx.room.Relation 20 | 21 | data class CarWithProsCons( 22 | @Embedded 23 | val car: CarEntity, 24 | 25 | @Relation( 26 | parentColumn = "id", 27 | entityColumn = "carId" 28 | ) 29 | val proConList: List 30 | ) 31 | -------------------------------------------------------------------------------- /database/impl/src/main/java/com/hadilq/guidomia/database/impl/entiry/CarEntity.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.database.impl.entiry 17 | 18 | import androidx.room.Entity 19 | import androidx.room.PrimaryKey 20 | 21 | @Entity(tableName = "car-entity") 22 | data class CarEntity( 23 | @PrimaryKey(autoGenerate = true) val id: Long = 0L, 24 | val make: String, 25 | val model: String, 26 | val image: Int, 27 | val price: Float, 28 | val rating: Int, 29 | ) 30 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/java/com/hadilq/guidomia/guidomia/impl/data/entity/CarDataEntity.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.impl.data.entity 17 | 18 | import kotlinx.serialization.Serializable 19 | 20 | @Serializable 21 | data class CarDataEntity( 22 | val make: String, 23 | val model: String, 24 | val marketPrice: Float, 25 | val customerPrice: Float, 26 | val rating: Int, 27 | val prosList: List, 28 | val consList: List, 29 | ) 30 | -------------------------------------------------------------------------------- /feature-flags/impl/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | plugins { 17 | kotlin("jvm") 18 | kotlin("kapt") 19 | id("com.squareup.anvil") version Versions.anvil 20 | } 21 | 22 | anvil { 23 | generateDaggerFactories = true 24 | } 25 | 26 | dependencies { 27 | implementation(project(Modules.featureFlagsPublic)) 28 | implementation(project(Modules.diPublic)) 29 | 30 | api(Depends.commandKuImpl) 31 | implementation(Depends.dagger) 32 | implementation(Depends.kotlinStdLib) 33 | implementation(Depends.coroutines) 34 | } 35 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Kotlin code style for this project: "official" or "obsolete": 19 | kotlin.code.style=official 20 | org.gradle.parallel=true 21 | -------------------------------------------------------------------------------- /guidomia/impl/src/test/java/com/hadilq/guidomia/guidomia/impl/domain/entity/CarEntityProvider.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.impl.domain.entity 17 | 18 | object CarEntityProvider { 19 | 20 | fun provide( 21 | make: MakeEntity = MakeEntity("make"), 22 | model: ModelEntity = ModelEntity("model") 23 | ) = CarEntity( 24 | make = make, 25 | model = model, 26 | image = ImageEntity(0), 27 | price = PriceEntity(1.0f), 28 | rate = Rate.FIVE, 29 | pros = listOf("pro"), 30 | cons = listOf("con"), 31 | ) 32 | } 33 | -------------------------------------------------------------------------------- /database/impl/src/main/java/com/hadilq/guidomia/database/impl/AppDatabase.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.database.impl 17 | 18 | import androidx.room.Database 19 | import androidx.room.RoomDatabase 20 | import com.hadilq.guidomia.database.impl.entiry.CarEntity 21 | import com.hadilq.guidomia.database.impl.entiry.ProConEntity 22 | 23 | @Database( 24 | entities = [ 25 | CarEntity::class, 26 | ProConEntity::class 27 | ], 28 | version = 1 29 | ) 30 | abstract class AppDatabase : RoomDatabase() { 31 | 32 | abstract fun carDao(): CarDao 33 | } 34 | -------------------------------------------------------------------------------- /guidomia/impl/src/main/java/com/hadilq/guidomia/guidomia/impl/domain/usecase/GetCars.kt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2021 Hadi Lashkari Ghouchani 3 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.hadilq.guidomia.guidomia.impl.domain.usecase 17 | 18 | import com.hadilq.guidomia.guidomia.impl.data.repository.CarsRepository 19 | import com.hadilq.guidomia.guidomia.impl.domain.entity.CarEntity 20 | import kotlinx.coroutines.flow.Flow 21 | import javax.inject.Inject 22 | 23 | class GetCars @Inject constructor( 24 | private val carsRepository: CarsRepository, 25 | ) { 26 | 27 | operator fun invoke(): Flow> = carsRepository.getCars() 28 | } 29 | -------------------------------------------------------------------------------- /core/public/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 21 | 22 |