Skip to content

Commit

Permalink
Use Kotlinx-serialization instead of Gson (#7)
Browse files Browse the repository at this point in the history
* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Feat(presentation): Add ui state to show data in view

* Refactor(common): Add Main Dispatcher

* Refactor(data, domain): Update package

* Feat(presentation): Add UI state management

* Fix(data): Fix package name

* Refactor(domain): Use DataState instead of result to emit network data state from useCase to viewModel

* Feat(all): add base MVI architectural pattern to project

* Add State Management for the UI (#5)

* Feat(test): add required dependencies for testing

* test(network): add test file for the app NetworkModule

* Feat(network): add header provider to the NetworkModule

* docs(Readme): move test item to done section

* Test(coroutine): add test requirement rule for the Coroutines

* Test(dagger): add required test implementations for the Dagger Hilt

* Chore(gradle): add CustomTestRunner to support Dagger Hilt

* Test(ui): add some UI tests

* Chore(gradle): add new test dependencies for the project

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(test): add a mock file used to hold some fake data for testing

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Test(usecase): add new passed test cases for the GetNextDaysForecastsUseCase

* Chore(IDE): Update project configs

* Refactor(project): Change project name

* Chore(docs): add items to the backlog

* Feat(icon): add app icon

* Chore(IDE): Update project settings

* Feat(logo): Add application logo

* Feat(common): Add extension for Fragment to easier using SnackBar

* Feat(vm): Add base class to provide network error into ViewState

* Feat(vm): Add new error constants

* Refactor(ui): changed to network connection error

* Refactor(data): moved into safe getResult call body

* Refactor(ui): Use new extension to show snackBar

* Fix(vm): Fix failure detection issues and notify the view from event properly

* Refactor(image-api): Use better API to showing random images

* Refactor(package): move di to a new package

* Feat(di): Add new di ImageModule for the Coil + use in UI

* Fix(package): Fix package name

* Chore(IDE): Update project settings

* Feat(release): Add required implementations for generating release signed APK

* Feat(art): Add some shots from the release app

* Feat(ci): Add different jobs for run tests, release apk and upload

* Chore(art): Add extension

* Feat(art): Add new screen shots

* Fix(ci): Fix typo

* Fix(docs): Fix typo

* Chore(docs): Add item to done section

* WIP(ci): Upload entire directory to artifacts

* WIP(ci): Change the path

* Refactor(ci): Change master to main. Upload only release apk file

* Refactor(ci): Run only on main and develop branch

* Docs(readme): Add release information to docs

* Docs(readme): Add reference to all releases

* Chore(IDE): Update Project settings

* Chore(anim): Add new fading effect on transitions

* Feat(data): Add new Error handling code for the project. Because the current API does not have any http result wrapper

* Docs(readme): Add some notes in docs

* Fix(domain): Remove useless code

* Feat(docs): Add new ui screen shot

* Chore(docs): Add new release version url

* Chore(docs): Move offline item to done section

* Feat(gradle): add required dependencies for the offline db

* Feat(base-db): add new base implementations required for offline room database

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(di): Provide domain repositories to use in UseCases, and remove data repository wrong dependencies in UseCases and ViewModels

* Refactor(core): Repackaged

* Feat(domain): Add some domain models

* Feat(data): Add db configs

* Chore(docs): Add cache strategy info

* Chore(project): Upgrade version to create publish release

* Refactor(all): remove useless file

* Feat(data): add new DAOs to the app database

* Refactor(di): Remove useless context from class

* Refactor(data): repackaged

* Feat(data): add new entity in database

* Feat(data): add new helper class to communicate with dao

* Refactor(data): Update Base Mapper for domain-entity to use with inject method in other classes

* Refactor(data): repackaged, Update WebServices data type

* Feat(domain): Add new domain models for the project

* Feat(domain): Add new domain repository to use in domain useCases to be implemented in data layer

* Refactor(domain): change id type to long

* Refactor(presentation-domain): change used model type from entity to domain

* Refactor(test-domain): change used data schema

* Feat(data): add new data mapper to map domain models to entity or inverse

* WIP(data): add new base data source factory to get related datasource instance

* Feat(data): add new datasource with related implementor for local and remote useCases

* Feat(data): add new remote network data entity response

* Feat(common): add new context extension to check network

* Feat(data): add new enum class to handle different cache types of First Offline and First Online data management

* Refactor(data): Remove unused datasource

* Feat(domain): Add new useCase to get data from Location details repository

* Feat(data): Add new data layer repository to get just remote data from location details

* Feat(data): Add new data layer repository to get remote/local data with cache strategy methods of First Online and First Offline

* Feat(di-domain): Add new repository

* Feat(test,domain): Add new UseCase to get data from repository

* Refactor(all): Add new Logger Tag retrieve possible length size for TAG

* Fix(ci): Add branch to ci job

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Chore(docs): Move offline item to done section

* Feat(gradle): add required dependencies for the offline db

* Feat(base-db): add new base implementations required for offline room database

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(di): Provide domain repositories to use in UseCases, and remove data repository wrong dependencies in UseCases and ViewModels

* Refactor(core): Repackaged

* Feat(domain): Add some domain models

* Feat(data): Add db configs

* Chore(docs): Add cache strategy info

* Chore(project): Upgrade version to create publish release

* Refactor(all): remove useless file

* Feat(data): add new DAOs to the app database

* Refactor(di): Remove useless context from class

* Refactor(data): repackaged

* Feat(data): add new entity in database

* Feat(data): add new helper class to communicate with dao

* Refactor(data): Update Base Mapper for domain-entity to use with inject method in other classes

* Refactor(data): repackaged, Update WebServices data type

* Feat(domain): Add new domain models for the project

* Feat(domain): Add new domain repository to use in domain useCases to be implemented in data layer

* Refactor(domain): change id type to long

* Refactor(presentation-domain): change used model type from entity to domain

* Refactor(test-domain): change used data schema

* Feat(data): add new data mapper to map domain models to entity or inverse

* WIP(data): add new base data source factory to get related datasource instance

* Feat(data): add new datasource with related implementor for local and remote useCases

* Feat(data): add new remote network data entity response

* Feat(common): add new context extension to check network

* Feat(data): add new enum class to handle different cache types of First Offline and First Online data management

* Refactor(data): Remove unused datasource

* Feat(domain): Add new useCase to get data from Location details repository

* Feat(data): Add new data layer repository to get just remote data from location details

* Feat(data): Add new data layer repository to get remote/local data with cache strategy methods of First Online and First Offline

* Feat(di-domain): Add new repository

* Feat(test,domain): Add new UseCase to get data from repository

* Refactor(all): Add new Logger Tag retrieve possible length size for TAG

* Fix(ci): Add branch to ci job

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Feat(presentation): Add ui state to show data in view

* Refactor(common): Add Main Dispatcher

* Refactor(data, domain): Update package

* Feat(presentation): Add UI state management

* Fix(data): Fix package name

* Refactor(domain): Use DataState instead of result to emit network data state from useCase to viewModel

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Feat(presentation): Add ui state to show data in view

* Refactor(common): Add Main Dispatcher

* Refactor(data, domain): Update package

* Feat(presentation): Add UI state management

* Fix(data): Fix package name

* Refactor(domain): Use DataState instead of result to emit network data state from useCase to viewModel

* Refactor(all): Add new Logger Tag retrieve possible length size for TAG

* Feat(presentation): Add UI state management

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Refactor(all): Add new Logger Tag retrieve possible length size for TAG

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Feat(presentation): Add UI state management

* Feat(all): add base MVI architectural pattern to project

* Add State Management for the UI (#5)

* Feat(test): add required dependencies for testing

* test(network): add test file for the app NetworkModule

* Feat(network): add header provider to the NetworkModule

* docs(Readme): move test item to done section

* Test(coroutine): add test requirement rule for the Coroutines

* Test(dagger): add required test implementations for the Dagger Hilt

* Chore(gradle): add CustomTestRunner to support Dagger Hilt

* Test(ui): add some UI tests

* Chore(gradle): add new test dependencies for the project

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(test): add a mock file used to hold some fake data for testing

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Test(usecase): add new passed test cases for the GetNextDaysForecastsUseCase

* Chore(IDE): Update project configs

* Refactor(project): Change project name

* Chore(docs): add items to the backlog

* Feat(icon): add app icon

* Chore(IDE): Update project settings

* Feat(logo): Add application logo

* Feat(common): Add extension for Fragment to easier using SnackBar

* Feat(vm): Add base class to provide network error into ViewState

* Feat(vm): Add new error constants

* Refactor(ui): changed to network connection error

* Refactor(data): moved into safe getResult call body

* Refactor(ui): Use new extension to show snackBar

* Fix(vm): Fix failure detection issues and notify the view from event properly

* Refactor(image-api): Use better API to showing random images

* Refactor(package): move di to a new package

* Feat(di): Add new di ImageModule for the Coil + use in UI

* Fix(package): Fix package name

* Chore(IDE): Update project settings

* Feat(release): Add required implementations for generating release signed APK

* Feat(art): Add some shots from the release app

* Feat(ci): Add different jobs for run tests, release apk and upload

* Chore(art): Add extension

* Feat(art): Add new screen shots

* Fix(ci): Fix typo

* Fix(docs): Fix typo

* Chore(docs): Add item to done section

* WIP(ci): Upload entire directory to artifacts

* WIP(ci): Change the path

* Refactor(ci): Change master to main. Upload only release apk file

* Refactor(ci): Run only on main and develop branch

* Docs(readme): Add release information to docs

* Docs(readme): Add reference to all releases

* Chore(IDE): Update Project settings

* Chore(anim): Add new fading effect on transitions

* Feat(data): Add new Error handling code for the project. Because the current API does not have any http result wrapper

* Docs(readme): Add some notes in docs

* Fix(domain): Remove useless code

* Feat(docs): Add new ui screen shot

* Chore(docs): Add new release version url

* Chore(docs): Move offline item to done section

* Feat(gradle): add required dependencies for the offline db

* Feat(base-db): add new base implementations required for offline room database

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(di): Provide domain repositories to use in UseCases, and remove data repository wrong dependencies in UseCases and ViewModels

* Refactor(core): Repackaged

* Feat(domain): Add some domain models

* Feat(data): Add db configs

* Chore(docs): Add cache strategy info

* Chore(project): Upgrade version to create publish release

* Refactor(all): remove useless file

* Feat(data): add new DAOs to the app database

* Refactor(di): Remove useless context from class

* Refactor(data): repackaged

* Feat(data): add new entity in database

* Feat(data): add new helper class to communicate with dao

* Refactor(data): Update Base Mapper for domain-entity to use with inject method in other classes

* Refactor(data): repackaged, Update WebServices data type

* Feat(domain): Add new domain models for the project

* Feat(domain): Add new domain repository to use in domain useCases to be implemented in data layer

* Refactor(domain): change id type to long

* Refactor(presentation-domain): change used model type from entity to domain

* Refactor(test-domain): change used data schema

* Feat(data): add new data mapper to map domain models to entity or inverse

* WIP(data): add new base data source factory to get related datasource instance

* Feat(data): add new datasource with related implementor for local and remote useCases

* Feat(data): add new remote network data entity response

* Feat(common): add new context extension to check network

* Feat(data): add new enum class to handle different cache types of First Offline and First Online data management

* Refactor(data): Remove unused datasource

* Feat(domain): Add new useCase to get data from Location details repository

* Feat(data): Add new data layer repository to get just remote data from location details

* Feat(data): Add new data layer repository to get remote/local data with cache strategy methods of First Online and First Offline

* Feat(di-domain): Add new repository

* Feat(test,domain): Add new UseCase to get data from repository

* Refactor(all): Add new Logger Tag retrieve possible length size for TAG

* Fix(ci): Add branch to ci job

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Chore(docs): Move offline item to done section

* Feat(gradle): add required dependencies for the offline db

* Feat(base-db): add new base implementations required for offline room database

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(di): Provide domain repositories to use in UseCases, and remove data repository wrong dependencies in UseCases and ViewModels

* Refactor(core): Repackaged

* Feat(domain): Add some domain models

* Feat(data): Add db configs

* Chore(docs): Add cache strategy info

* Chore(project): Upgrade version to create publish release

* Refactor(all): remove useless file

* Feat(data): add new DAOs to the app database

* Refactor(di): Remove useless context from class

* Refactor(data): repackaged

* Feat(data): add new entity in database

* Feat(data): add new helper class to communicate with dao

* Refactor(data): Update Base Mapper for domain-entity to use with inject method in other classes

* Refactor(data): repackaged, Update WebServices data type

* Feat(domain): Add new domain models for the project

* Feat(domain): Add new domain repository to use in domain useCases to be implemented in data layer

* Refactor(domain): change id type to long

* Refactor(presentation-domain): change used model type from entity to domain

* Refactor(test-domain): change used data schema

* Feat(data): add new data mapper to map domain models to entity or inverse

* WIP(data): add new base data source factory to get related datasource instance

* Feat(data): add new datasource with related implementor for local and remote useCases

* Feat(data): add new remote network data entity response

* Feat(common): add new context extension to check network

* Feat(data): add new enum class to handle different cache types of First Offline and First Online data management

* Refactor(data): Remove unused datasource

* Feat(domain): Add new useCase to get data from Location details repository

* Feat(data): Add new data layer repository to get just remote data from location details

* Feat(data): Add new data layer repository to get remote/local data with cache strategy methods of First Online and First Offline

* Feat(di-domain): Add new repository

* Feat(test,domain): Add new UseCase to get data from repository

* Refactor(all): Add new Logger Tag retrieve possible length size for TAG

* Fix(ci): Add branch to ci job

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Feat(presentation): Add ui state to show data in view

* Refactor(common): Add Main Dispatcher

* Refactor(data, domain): Update package

* Feat(presentation): Add UI state management

* Fix(data): Fix package name

* Refactor(domain): Use DataState instead of result to emit network data state from useCase to viewModel

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Feat(presentation): Add ui state to show data in view

* Refactor(common): Add Main Dispatcher

* Refactor(data, domain): Update package

* Feat(presentation): Add UI state management

* Fix(data): Fix package name

* Refactor(domain): Use DataState instead of result to emit network data state from useCase to viewModel

* Refactor(all): Add new Logger Tag retrieve possible length size for TAG

* Feat(presentation): Add UI state management

* Feat(di): add qualifier to inject different strings in application

* Feat(proguard): add required rules for the kotlinx-serialization

* Refactor(api): move base media api url to gradle

* Feat(all): replace Gson with kotlinx-serialization

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Refactor(all): Add new Logger Tag retrieve possible length size for TAG

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Feat(presentation): Add UI state management

* Feat(all): add base MVI architectural pattern to project

* Add State Management for the UI (#5)

* Feat(test): add required dependencies for testing

* test(network): add test file for the app NetworkModule

* Feat(network): add header provider to the NetworkModule

* docs(Readme): move test item to done section

* Test(coroutine): add test requirement rule for the Coroutines

* Test(dagger): add required test implementations for the Dagger Hilt

* Chore(gradle): add CustomTestRunner to support Dagger Hilt

* Test(ui): add some UI tests

* Chore(gradle): add new test dependencies for the project

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(test): add a mock file used to hold some fake data for testing

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Test(usecase): add new passed test cases for the GetNextDaysForecastsUseCase

* Chore(IDE): Update project configs

* Refactor(project): Change project name

* Chore(docs): add items to the backlog

* Feat(icon): add app icon

* Chore(IDE): Update project settings

* Feat(logo): Add application logo

* Feat(common): Add extension for Fragment to easier using SnackBar

* Feat(vm): Add base class to provide network error into ViewState

* Feat(vm): Add new error constants

* Refactor(ui): changed to network connection error

* Refactor(data): moved into safe getResult call body

* Refactor(ui): Use new extension to show snackBar

* Fix(vm): Fix failure detection issues and notify the view from event properly

* Refactor(image-api): Use better API to showing random images

* Refactor(package): move di to a new package

* Feat(di): Add new di ImageModule for the Coil + use in UI

* Fix(package): Fix package name

* Chore(IDE): Update project settings

* Feat(release): Add required implementations for generating release signed APK

* Feat(art): Add some shots from the release app

* Feat(ci): Add different jobs for run tests, release apk and upload

* Chore(art): Add extension

* Feat(art): Add new screen shots

* Fix(ci): Fix typo

* Fix(docs): Fix typo

* Chore(docs): Add item to done section

* WIP(ci): Upload entire directory to artifacts

* WIP(ci): Change the path

* Refactor(ci): Change master to main. Upload only release apk file

* Refactor(ci): Run only on main and develop branch

* Docs(readme): Add release information to docs

* Docs(readme): Add reference to all releases

* Chore(IDE): Update Project settings

* Chore(anim): Add new fading effect on transitions

* Feat(data): Add new Error handling code for the project. Because the current API does not have any http result wrapper

* Docs(readme): Add some notes in docs

* Fix(domain): Remove useless code

* Feat(docs): Add new ui screen shot

* Chore(docs): Add new release version url

* Chore(docs): Move offline item to done section

* Feat(gradle): add required dependencies for the offline db

* Feat(base-db): add new base implementations required for offline room database

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(di): Provide domain repositories to use in UseCases, and remove data repository wrong dependencies in UseCases and ViewModels

* Refactor(core): Repackaged

* Feat(domain): Add some domain models

* Feat(data): Add db configs

* Chore(docs): Add cache strategy info

* Chore(project): Upgrade version to create publish release

* Refactor(all): remove useless file

* Feat(data): add new DAOs to the app database

* Refactor(di): Remove useless context from class

* Refactor(data): repackaged

* Feat(data): add new entity in database

* Feat(data): add new helper class to communicate with dao

* Refactor(data): Update Base Mapper for domain-entity to use with inject method in other classes

* Refactor(data): repackaged, Update WebServices data type

* Feat(domain): Add new domain models for the project

* Feat(domain): Add new domain repository to use in domain useCases to be implemented in data layer

* Refactor(domain): change id type to long

* Refactor(presentation-domain): change used model type from entity to domain

* Refactor(test-domain): change used data schema

* Feat(data): add new data mapper to map domain models to entity or inverse

* WIP(data): add new base data source factory to get related datasource instance

* Feat(data): add new datasource with related implementor for local and remote useCases

* Feat(data): add new remote network data entity response

* Feat(common): add new context extension to check network

* Feat(data): add new enum class to handle different cache types of First Offline and First Online data management

* Refactor(data): Remove unused datasource

* Feat(domain): Add new useCase to get data from Location details repository

* Feat(data): Add new data layer repository to get just remote data from location details

* Feat(data): Add new data layer repository to get remote/local data with cache strategy methods of First Online and First Offline

* Feat(di-domain): Add new repository

* Feat(test,domain): Add new UseCase to get data from repository

* Refactor(all): Add new Logger Tag retrieve possible length size for TAG

* Fix(ci): Add branch to ci job

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Chore(docs): Move offline item to done section

* Feat(gradle): add required dependencies for the offline db

* Feat(base-db): add new base implementations required for offline room database

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(di): Provide domain repositories to use in UseCases, and remove data repository wrong dependencies in UseCases and ViewModels

* Refactor(core): Repackaged

* Feat(domain): Add some domain models

* Feat(data): Add db configs

* Chore(docs): Add cache strategy info

* Chore(project): Upgrade version to create publish release

* Refactor(all): remove useless file

* Feat(data): add new DAOs to the app database

* Refactor(di): Remove useless context from class

* Refactor(data): repackaged

* Feat(data): add new entity in database

* Feat(data): add new helper class to communicate with dao

* Refactor(data): Update Base Mapper for domain-entity to use with inject method in other classes

* Refactor(data): repackaged, Update WebServices data type

* Feat(domain): Add new domain models for the project

* Feat(domain): Add new domain repository to use in domain useCases to be implemented in data layer

* Refactor(domain): change id type to long

* Refactor(presentation-domain): change used model type from entity to domain

* Refactor(test-domain): change used data schema

* Feat(data): add new data mapper to map domain models to entity or inverse

* WIP(data): add new base data source factory to get related datasource instance

* Feat(data): add new datasource with related implementor for local and remote useCases

* Feat(data): add new remote network data entity response

* Feat(common): add new context extension to check network

* Feat(data): add new enum class to handle different cache types of First Offline and First Online data management

* Refactor(data): Remove unused datasource

* Feat(domain): Add new useCase to get data from Location details repository

* Feat(data): Add new data layer repository to get just remote data from location details

* Feat(data): Add new data layer repository to get remote/local data with cache strategy methods of First Online and First Offline

* Feat(di-domain): Add new repository

* Feat(test,domain): Add new UseCase to get data from repository

* Refactor(all): Add new Logger Tag retrieve possible length size for TAG

* Fix(ci): Add branch to ci job

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Feat(presentation): Add ui state to show data in view

* Refactor(common): Add Main Dispatcher

* Refactor(data, domain): Update package

* Feat(presentation): Add UI state management

* Fix(data): Fix package name

* Refactor(domain): Use DataState instead of result to emit network data state from useCase to viewModel

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Feat(presentation): Add ui state to show data in view

* Refactor(common): Add Main Dispatcher

* Refactor(data, domain): Update package

* Feat(presentation): Add UI state management

* Fix(data): Fix package name

* Refactor(domain): Use DataState instead of result to emit network data state from useCase to viewModel

* Refactor(all): Add new Logger Tag retrieve possible length size for TAG

* Feat(presentation): Add UI state management

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Refactor(all): Add new Logger Tag retrieve possible length size for TAG

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Feat(all): add base MVI architectural pattern to project

* Add State Management for the UI (#5)

* Feat(test): add required dependencies for testing

* test(network): add test file for the app NetworkModule

* Feat(network): add header provider to the NetworkModule

* docs(Readme): move test item to done section

* Test(coroutine): add test requirement rule for the Coroutines

* Test(dagger): add required test implementations for the Dagger Hilt

* Chore(gradle): add CustomTestRunner to support Dagger Hilt

* Test(ui): add some UI tests

* Chore(gradle): add new test dependencies for the project

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(test): add a mock file used to hold some fake data for testing

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Test(usecase): add new passed test cases for the GetNextDaysForecastsUseCase

* Chore(IDE): Update project configs

* Refactor(project): Change project name

* Chore(docs): add items to the backlog

* Feat(icon): add app icon

* Chore(IDE): Update project settings

* Feat(logo): Add application logo

* Feat(common): Add extension for Fragment to easier using SnackBar

* Feat(vm): Add base class to provide network error into ViewState

* Feat(vm): Add new error constants

* Refactor(ui): changed to network connection error

* Refactor(data): moved into safe getResult call body

* Refactor(ui): Use new extension to show snackBar

* Fix(vm): Fix failure detection issues and notify the view from event properly

* Refactor(image-api): Use better API to showing random images

* Refactor(package): move di to a new package

* Feat(di): Add new di ImageModule for the Coil + use in UI

* Fix(package): Fix package name

* Chore(IDE): Update project settings

* Feat(release): Add required implementations for generating release signed APK

* Feat(art): Add some shots from the release app

* Feat(ci): Add different jobs for run tests, release apk and upload

* Chore(art): Add extension

* Feat(art): Add new screen shots

* Fix(ci): Fix typo

* Fix(docs): Fix typo

* Chore(docs): Add item to done section

* WIP(ci): Upload entire directory to artifacts

* WIP(ci): Change the path

* Refactor(ci): Change master to main. Upload only release apk file

* Refactor(ci): Run only on main and develop branch

* Docs(readme): Add release information to docs

* Docs(readme): Add reference to all releases

* Chore(IDE): Update Project settings

* Chore(anim): Add new fading effect on transitions

* Feat(data): Add new Error handling code for the project. Because the current API does not have any http result wrapper

* Docs(readme): Add some notes in docs

* Fix(domain): Remove useless code

* Feat(docs): Add new ui screen shot

* Chore(docs): Add new release version url

* Chore(docs): Move offline item to done section

* Feat(gradle): add required dependencies for the offline db

* Feat(base-db): add new base implementations required for offline room database

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(di): Provide domain repositories to use in UseCases, and remove data repository wrong dependencies in UseCases and ViewModels

* Refactor(core): Repackaged

* Feat(domain): Add some domain models

* Feat(data): Add db configs

* Chore(docs): Add cache strategy info

* Chore(project): Upgrade version to create publish release

* Refactor(all): remove useless file

* Feat(data): add new DAOs to the app database

* Refactor(di): Remove useless context from class

* Refactor(data): repackaged

* Feat(data): add new entity in database

* Feat(data): add new helper class to communicate with dao

* Refactor(data): Update Base Mapper for domain-entity to use with inject method in other classes

* Refactor(data): repackaged, Update WebServices data type

* Feat(domain): Add new domain models for the project

* Feat(domain): Add new domain repository to use in domain useCases to be implemented in data layer

* Refactor(domain): change id type to long

* Refactor(presentation-domain): change used model type from entity to domain

* Refactor(test-domain): change used data schema

* Feat(data): add new data mapper to map domain models to entity or inverse

* WIP(data): add new base data source factory to get related datasource instance

* Feat(data): add new datasource with related implementor for local and remote useCases

* Feat(data): add new remote network data entity response

* Feat(common): add new context extension to check network

* Feat(data): add new enum class to handle different cache types of First Offline and First Online data management

* Refactor(data): Remove unused datasource

* Feat(domain): Add new useCase to get data from Location details repository

* Feat(data): Add new data layer repository to get just remote data from location details

* Feat(data): Add new data layer repository to get remote/local data with cache strategy methods of First Online and First Offline

* Feat(di-domain): Add new repository

* Feat(test,domain): Add new UseCase to get data from repository

* Refactor(all): Add new Logger Tag retrieve possible length size for TAG

* Fix(ci): Add branch to ci job

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Chore(docs): Move offline item to done section

* Feat(gradle): add required dependencies for the offline db

* Feat(base-db): add new base implementations required for offline room database

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(di): Provide domain repositories to use in UseCases, and remove data repository wrong dependencies in UseCases and ViewModels

* Refactor(core): Repackaged

* Feat(domain): Add some domain models

* Feat(data): Add db configs

* Chore(docs): Add cache strategy info

* Chore(project): Upgrade version to create publish release

* Refactor(all): remove useless file

* Feat(data): add new DAOs to the app database

* Refactor(di): Remove useless context from class

* Refactor(data): repackaged

* Feat(data): add new entity in database

* Feat(data): add new helper class to communicate with dao

* Refactor(data): Update Base Mapper for domain-entity to use with inject method in other classes

* Refactor(data): repackaged, Update WebServices data type

* Feat(domain): Add new domain models for the project

* Feat(domain): Add new domain repository to use in domain useCases to be implemented in data layer

* Refactor(domain): change id type to long

* Refactor(presentation-domain): change used model type from entity to domain

* Refactor(test-domain): change used data schema

* Feat(data): add new data mapper to map domain models to entity or inverse

* WIP(data): add new base data source factory to get related datasource instance

* Feat(data): add new datasource with related implementor for local and remote useCases

* Feat(data): add new remote network data entity response

* Feat(common): add new context extension to check network

* Feat(data): add new enum class to handle different cache types of First Offline and First Online data management

* Refactor(data): Remove unused datasource

* Feat(domain): Add new useCase to get data from Location details repository

* Feat(data): Add new data layer repository to get just remote data from location details

* Feat(data): Add new data layer repository to get remote/local data with cache strategy methods of First Online and First Offline

* Feat(di-domain): Add new repository

* Feat(test,domain): Add new UseCase to get data from repository

* Refactor(all): Add new Logger Tag retrieve possible length size for TAG

* Fix(ci): Add branch to ci job

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Feat(presentation): Add ui state to show data in view

* Refactor(common): Add Main Dispatcher

* Refactor(data, domain): Update package

* Feat(presentation): Add UI state management

* Fix(data): Fix package name

* Refactor(domain): Use DataState instead of result to emit network data state from useCase to viewModel

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Test(dagger): add required test implementations for the Dagger Hilt

* Fix(test): fix failed test when HomeFragmentTest executed (test passed)

* Test(usecase): add new passed test cases for the current and location weather UseCases

* Feat(data): add new base Mapper class to transform Entities to Domain models

* Feat(data): add new data access object for the places table

* Refactor(all): remove useless file

* Feat(data): add new datasource with related implementor for local and remote useCases

* Refactor(data): Remove unused datasource

* Feat(presentation): Add ui state to show data in view

* Refactor(common): Add Main Dispatcher

* Refactor(data, domain): Update package

* Feat(presentation): Add UI state management

* Fix(data): Fix package name

* Refactor(domain): Use DataState instead of result to emit network data state from useCase to viewModel

* Feat(presentation): Add UI state management

* Feat(di): add qualifier to inject different strings in application

* Feat(proguard): add required rules for the kotlinx-serialization

* Refactor(api): move base media api url to gradle

* Feat(all): replace Gson with kotlinx-serialization

* Fix(data): remove unused api call
  • Loading branch information
MortezaNedaei authored Jun 5, 2022
1 parent 8a0ec66 commit cc8a1cc
Show file tree
Hide file tree
Showing 50 changed files with 322 additions and 165 deletions.
8 changes: 7 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id("com.google.devtools.ksp")
id("kotlin-parcelize")
id("kotlin-kapt")
id("kotlinx-serialization")
id("dagger.hilt.android.plugin")
id("androidx.navigation.safeargs.kotlin")
}
Expand Down Expand Up @@ -32,6 +33,7 @@ android {
}

buildConfigField "String", "API_BASE_URL", "${API_BASE_URL}"
buildConfigField "String", "API_MEDIA_BASE_URL", "${API_MEDIA_BASE_URL}"
}

signingConfigs {
Expand Down Expand Up @@ -120,12 +122,16 @@ dependencies {
//region Retrofit
implementation("com.squareup.retrofit2:retrofit:$retrofitVersion")
implementation("com.squareup.retrofit2:converter-moshi:$retrofitVersion")
implementation("com.squareup.retrofit2:converter-gson:$retrofitVersion")
implementation("com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:$retrofitSerializationVersion")
implementation("com.squareup.okhttp3:logging-interceptor:$okhttpVersion")
implementation("com.squareup.moshi:moshi-kotlin:$moshiVersion")
ksp("com.squareup.moshi:moshi-kotlin-codegen:$moshiVersion")
//endregion

//region Room
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$serializationVersion")
//endregion

//region DB
implementation("androidx.room:room-runtime:$roomVersion")
ksp("androidx.room:room-compiler:$roomVersion")
Expand Down
1 change: 1 addition & 0 deletions app/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
################## Web Api Url ########################
API_BASE_URL="https://weather.aw.ee/api/"
API_MEDIA_BASE_URL="https://placeimg.com/"
#######################################################


Expand Down
31 changes: 30 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,33 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile

####### KotlinX-Serialization #########
# Keep `Companion` object fields of serializable classes.
# This avoids serializer lookup through `getDeclaredClasses` as done for named companion objects.
-if @kotlinx.serialization.Serializable class **
-keepclassmembers class <1> {
static <1>$Companion Companion;
}

# Keep `serializer()` on companion objects (both default and named) of serializable classes.
-if @kotlinx.serialization.Serializable class ** {
static **$* *;
}
-keepclassmembers class <2>$<3> {
kotlinx.serialization.KSerializer serializer(...);
}

# Keep `INSTANCE.serializer()` of serializable objects.
-if @kotlinx.serialization.Serializable class ** {
public static ** INSTANCE;
}
-keepclassmembers class <1> {
public static <1> INSTANCE;
kotlinx.serialization.KSerializer serializer(...);
}

# @Serializable and @Polymorphic are used at runtime for polymorphic serialization.
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault
##############
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package com.mooncascade.data.cache

import android.util.Log
import androidx.room.TypeConverter
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import com.mooncascade.common.extensions.TAG
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
import org.json.JSONException
import org.json.JSONObject
import java.util.*
Expand Down Expand Up @@ -67,13 +68,13 @@ object AppTypeConverters {
}

@TypeConverter
fun stringToMap(value: String?): Map<String, String>? {
return Gson().fromJson(value, object : TypeToken<Map<String, String>?>() {}.type)
fun stringToMap(value: String): Map<String, String>? {
return Json.decodeFromString(value)
}

@TypeConverter
fun mapToString(value: Map<String, String>?): String? {
return if (value == null) null else Gson().toJson(value)
return if (value == null) null else Json.encodeToString(value)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ data class DayNightEntity(
val phenomenon: String?,
// val places: List<PlaceEntity>?,
val sea: String?,
val tempmax: Int?,
val tempmin: Int?,
val tempmax: Double?,
val tempmin: Double?,
val text: String?,
// val winds: List<WindEntity>?
)
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import androidx.annotation.Keep
data class PlaceEntity(
val name: String?,
val phenomenon: String?,
val tempmax: Int?,
val tempmin: Int?
val tempmax: Double?,
val tempmin: Double?
)
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import androidx.annotation.Keep
data class WindEntity(
val direction: String?,
val name: String?,
val speedmax: Int?,
val speedmin: Int?
val speedmax: Double?,
val speedmin: Double?
)
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package com.mooncascade.data.network.entity.current

import android.os.Parcelable
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kotlinx.parcelize.Parcelize
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Keep
@Parcelize
@Serializable
data class CurrentWeatherResponse(
@SerializedName("timestamp")
@SerialName("timestamp")
val timestamp: String,
@SerializedName("observations")
@SerialName("observations")
val observations: List<ObservationResponse>,
) : Parcelable
)
Original file line number Diff line number Diff line change
@@ -1,46 +1,45 @@
package com.mooncascade.data.network.entity.current


import android.os.Parcelable
import com.google.gson.annotations.SerializedName
import androidx.annotation.Keep
import kotlinx.parcelize.Parcelize
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Keep
@Parcelize
@Serializable
data class ObservationResponse(
@SerializedName("airpressure")
@SerialName("airpressure")
val airpressure: String?,
@SerializedName("airtemperature")
@SerialName("airtemperature")
val airtemperature: String?,
@SerializedName("latitude")
@SerialName("latitude")
val latitude: String?,
@SerializedName("longitude")
@SerialName("longitude")
val longitude: String?,
@SerializedName("name")
@SerialName("name")
val name: String?,
@SerializedName("phenomenon")
@SerialName("phenomenon")
val phenomenon: String?,
@SerializedName("precipitations")
@SerialName("precipitations")
val precipitations: String?,
@SerializedName("relativehumidity")
@SerialName("relativehumidity")
val relativehumidity: String?,
@SerializedName("uvindex")
@SerialName("uvindex")
val uvindex: String?,
@SerializedName("visibility")
@SerialName("visibility")
val visibility: String?,
@SerializedName("waterlevel")
@SerialName("waterlevel")
val waterlevel: String?,
@SerializedName("waterlevel_eh2000")
@SerialName("waterlevel_eh2000")
val waterlevelEh2000: String?,
@SerializedName("watertemperature")
@SerialName("watertemperature")
val watertemperature: String?,
@SerializedName("winddirection")
@SerialName("winddirection")
val winddirection: String?,
@SerializedName("windspeed")
@SerialName("windspeed")
val windspeed: String?,
@SerializedName("windspeedmax")
@SerialName("windspeedmax")
val windspeedmax: String?,
@SerializedName("wmocode")
@SerialName("wmocode")
val wmocode: String?
) : Parcelable
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,26 @@ package com.mooncascade.data.network.entity.forecast


import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Keep
@Serializable
data class DayNightResponse(
@SerializedName("peipsi")
@SerialName("peipsi")
val peipsi: String?,
@SerializedName("phenomenon")
@SerialName("phenomenon")
val phenomenon: String?,
@SerializedName("places")
@SerialName("places")
val places: List<PlaceResponse>?,
@SerializedName("sea")
@SerialName("sea")
val sea: String?,
@SerializedName("tempmax")
val tempmax: Int?,
@SerializedName("tempmin")
val tempmin: Int?,
@SerializedName("text")
@SerialName("tempmax")
val tempmax: Double?,
@SerialName("tempmin")
val tempmin: Double?,
@SerialName("text")
val text: String?,
@SerializedName("winds")
@SerialName("winds")
val winds: List<WindResponse>?
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ package com.mooncascade.data.network.entity.forecast


import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Keep
@Serializable
data class ForecastResponse(
@SerializedName("date")
@SerialName("date")
val date: String?,
@SerializedName("day")
@SerialName("day")
val day: DayNightResponse?,
@SerializedName("night")
@SerialName("night")
val night: DayNightResponse?
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ package com.mooncascade.data.network.entity.forecast


import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Keep
@Serializable
data class NextDaysForecastResponse(
@SerializedName("forecasts")
@SerialName("forecasts")
val forecasts: List<ForecastResponse>?,
)
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
package com.mooncascade.data.network.entity.forecast


import android.os.Parcelable
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kotlinx.parcelize.Parcelize
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Keep
@Parcelize
@Serializable
data class PlaceResponse(
@SerializedName("name")
@SerialName("name")
val name: String?,
@SerializedName("phenomenon")
@SerialName("phenomenon")
val phenomenon: String?,
@SerializedName("tempmax")
val tempmax: Int?,
@SerializedName("tempmin")
val tempmin: Int?
) : Parcelable
@SerialName("tempmax")
val tempmax: Double?,
@SerialName("tempmin")
val tempmin: Double?
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ package com.mooncascade.data.network.entity.forecast


import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Keep
@Serializable
data class WindResponse(
@SerializedName("direction")
@SerialName("direction")
val direction: String?,
@SerializedName("name")
@SerialName("name")
val name: String?,
@SerializedName("speedmax")
val speedmax: Int?,
@SerializedName("speedmin")
val speedmin: Int?
@SerialName("speedmax")
val speedmax: Double?,
@SerialName("speedmin")
val speedmin: Double?
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ package com.mooncascade.data.network.entity.location


import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Keep
@Serializable
data class DewpointResponse(
@SerializedName("units")
@SerialName("units")
val units: String?,
@SerializedName("value")
@SerialName("value")
val value: String?
)
Loading

0 comments on commit cc8a1cc

Please sign in to comment.