From f5ac2bf7b616449d1438ce72bc12c85c9ca15d67 Mon Sep 17 00:00:00 2001 From: Hyesung82 Date: Sat, 16 Mar 2024 21:16:08 +0900 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20=ED=8C=A8=ED=82=A4=EC=A7=80=20?= =?UTF-8?q?=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/{ => local}/source/AuthLocalDataSource.kt | 2 +- .../data/{ => remote}/source/AuthRemoteDataSource.kt | 2 +- .../data/{ => remote}/source/GroupRemoteDataSource.kt | 2 +- .../data/{ => remote}/source/LoginRemoteDataSource.kt | 2 +- .../{ => remote}/source/MyGroupsRemoteDataSource.kt | 2 +- .../data/{ => remote}/source/WriteRemoteDataSource.kt | 2 +- .../cheocharm/data/repository/AuthRepositoryImpl.kt | 4 ++-- .../cheocharm/data/repository/GroupRepositoryImpl.kt | 2 +- .../cheocharm/data/repository/LoginRepositoryImpl.kt | 2 +- .../data/repository/MyGroupsRepositoryImpl.kt | 2 +- .../cheocharm/data/repository/WriteRepositoryImpl.kt | 2 +- .../java/com/cheocharm/local/di/DataSourceModule.kt | 2 +- .../cheocharm/local/source/AuthLocalDataSourceImpl.kt | 2 +- .../java/com/cheocharm/remote/di/DataSourceModule.kt | 10 +++++----- .../remote/source/AuthRemoteDataSourceImpl.kt | 3 +-- .../remote/source/GroupRemoteDataSourceImpl.kt | 2 +- .../remote/source/LoginRemoteDataSourceImpl.kt | 2 +- .../remote/source/MyGroupsRemoteDataSourceImpl.kt | 2 +- .../remote/source/WriteRemoteDataSourceImpl.kt | 2 +- 19 files changed, 24 insertions(+), 25 deletions(-) rename data/src/main/java/com/cheocharm/data/{ => local}/source/AuthLocalDataSource.kt (91%) rename data/src/main/java/com/cheocharm/data/{ => remote}/source/AuthRemoteDataSource.kt (78%) rename data/src/main/java/com/cheocharm/data/{ => remote}/source/GroupRemoteDataSource.kt (87%) rename data/src/main/java/com/cheocharm/data/{ => remote}/source/LoginRemoteDataSource.kt (94%) rename data/src/main/java/com/cheocharm/data/{ => remote}/source/MyGroupsRemoteDataSource.kt (77%) rename data/src/main/java/com/cheocharm/data/{ => remote}/source/WriteRemoteDataSource.kt (89%) diff --git a/data/src/main/java/com/cheocharm/data/source/AuthLocalDataSource.kt b/data/src/main/java/com/cheocharm/data/local/source/AuthLocalDataSource.kt similarity index 91% rename from data/src/main/java/com/cheocharm/data/source/AuthLocalDataSource.kt rename to data/src/main/java/com/cheocharm/data/local/source/AuthLocalDataSource.kt index 77646c4a..3c2822e3 100644 --- a/data/src/main/java/com/cheocharm/data/source/AuthLocalDataSource.kt +++ b/data/src/main/java/com/cheocharm/data/local/source/AuthLocalDataSource.kt @@ -1,4 +1,4 @@ -package com.cheocharm.data.source +package com.cheocharm.data.local.source interface AuthLocalDataSource { diff --git a/data/src/main/java/com/cheocharm/data/source/AuthRemoteDataSource.kt b/data/src/main/java/com/cheocharm/data/remote/source/AuthRemoteDataSource.kt similarity index 78% rename from data/src/main/java/com/cheocharm/data/source/AuthRemoteDataSource.kt rename to data/src/main/java/com/cheocharm/data/remote/source/AuthRemoteDataSource.kt index bac94920..383b12d0 100644 --- a/data/src/main/java/com/cheocharm/data/source/AuthRemoteDataSource.kt +++ b/data/src/main/java/com/cheocharm/data/remote/source/AuthRemoteDataSource.kt @@ -1,4 +1,4 @@ -package com.cheocharm.data.source +package com.cheocharm.data.remote.source import com.cheocharm.domain.model.Token diff --git a/data/src/main/java/com/cheocharm/data/source/GroupRemoteDataSource.kt b/data/src/main/java/com/cheocharm/data/remote/source/GroupRemoteDataSource.kt similarity index 87% rename from data/src/main/java/com/cheocharm/data/source/GroupRemoteDataSource.kt rename to data/src/main/java/com/cheocharm/data/remote/source/GroupRemoteDataSource.kt index 61718f52..d709ed14 100644 --- a/data/src/main/java/com/cheocharm/data/source/GroupRemoteDataSource.kt +++ b/data/src/main/java/com/cheocharm/data/remote/source/GroupRemoteDataSource.kt @@ -1,4 +1,4 @@ -package com.cheocharm.data.source +package com.cheocharm.data.remote.source import androidx.paging.PagingData import com.cheocharm.domain.model.Group diff --git a/data/src/main/java/com/cheocharm/data/source/LoginRemoteDataSource.kt b/data/src/main/java/com/cheocharm/data/remote/source/LoginRemoteDataSource.kt similarity index 94% rename from data/src/main/java/com/cheocharm/data/source/LoginRemoteDataSource.kt rename to data/src/main/java/com/cheocharm/data/remote/source/LoginRemoteDataSource.kt index 1fa7744d..464c8ce6 100644 --- a/data/src/main/java/com/cheocharm/data/source/LoginRemoteDataSource.kt +++ b/data/src/main/java/com/cheocharm/data/remote/source/LoginRemoteDataSource.kt @@ -1,4 +1,4 @@ -package com.cheocharm.data.source +package com.cheocharm.data.remote.source import com.cheocharm.domain.model.GoogleSignUpRequest import com.cheocharm.domain.model.Token diff --git a/data/src/main/java/com/cheocharm/data/source/MyGroupsRemoteDataSource.kt b/data/src/main/java/com/cheocharm/data/remote/source/MyGroupsRemoteDataSource.kt similarity index 77% rename from data/src/main/java/com/cheocharm/data/source/MyGroupsRemoteDataSource.kt rename to data/src/main/java/com/cheocharm/data/remote/source/MyGroupsRemoteDataSource.kt index 006465c6..148dbafd 100644 --- a/data/src/main/java/com/cheocharm/data/source/MyGroupsRemoteDataSource.kt +++ b/data/src/main/java/com/cheocharm/data/remote/source/MyGroupsRemoteDataSource.kt @@ -1,4 +1,4 @@ -package com.cheocharm.data.source +package com.cheocharm.data.remote.source import com.cheocharm.data.model.GroupData diff --git a/data/src/main/java/com/cheocharm/data/source/WriteRemoteDataSource.kt b/data/src/main/java/com/cheocharm/data/remote/source/WriteRemoteDataSource.kt similarity index 89% rename from data/src/main/java/com/cheocharm/data/source/WriteRemoteDataSource.kt rename to data/src/main/java/com/cheocharm/data/remote/source/WriteRemoteDataSource.kt index 65d6b589..5068beba 100644 --- a/data/src/main/java/com/cheocharm/data/source/WriteRemoteDataSource.kt +++ b/data/src/main/java/com/cheocharm/data/remote/source/WriteRemoteDataSource.kt @@ -1,4 +1,4 @@ -package com.cheocharm.data.source +package com.cheocharm.data.remote.source import com.cheocharm.domain.model.TempDiary import com.cheocharm.domain.model.WriteDiaryRequest diff --git a/data/src/main/java/com/cheocharm/data/repository/AuthRepositoryImpl.kt b/data/src/main/java/com/cheocharm/data/repository/AuthRepositoryImpl.kt index c59c20f4..2a1fcdb6 100644 --- a/data/src/main/java/com/cheocharm/data/repository/AuthRepositoryImpl.kt +++ b/data/src/main/java/com/cheocharm/data/repository/AuthRepositoryImpl.kt @@ -2,8 +2,8 @@ package com.cheocharm.data.repository import com.cheocharm.data.error.ErrorData import com.cheocharm.data.error.toDomain -import com.cheocharm.data.source.AuthLocalDataSource -import com.cheocharm.data.source.AuthRemoteDataSource +import com.cheocharm.data.local.source.AuthLocalDataSource +import com.cheocharm.data.remote.source.AuthRemoteDataSource import com.cheocharm.domain.model.Token import com.cheocharm.domain.repository.AuthRepository import javax.inject.Inject diff --git a/data/src/main/java/com/cheocharm/data/repository/GroupRepositoryImpl.kt b/data/src/main/java/com/cheocharm/data/repository/GroupRepositoryImpl.kt index 4cfac9eb..bc0fb313 100644 --- a/data/src/main/java/com/cheocharm/data/repository/GroupRepositoryImpl.kt +++ b/data/src/main/java/com/cheocharm/data/repository/GroupRepositoryImpl.kt @@ -3,7 +3,7 @@ package com.cheocharm.data.repository import androidx.paging.PagingData import com.cheocharm.data.error.ErrorData import com.cheocharm.data.error.toDomain -import com.cheocharm.data.source.GroupRemoteDataSource +import com.cheocharm.data.remote.source.GroupRemoteDataSource import com.cheocharm.domain.model.Group import com.cheocharm.domain.repository.GroupRepository import kotlinx.coroutines.flow.Flow diff --git a/data/src/main/java/com/cheocharm/data/repository/LoginRepositoryImpl.kt b/data/src/main/java/com/cheocharm/data/repository/LoginRepositoryImpl.kt index 3fdfb7d2..3c834368 100644 --- a/data/src/main/java/com/cheocharm/data/repository/LoginRepositoryImpl.kt +++ b/data/src/main/java/com/cheocharm/data/repository/LoginRepositoryImpl.kt @@ -2,7 +2,7 @@ package com.cheocharm.data.repository import com.cheocharm.data.error.ErrorData import com.cheocharm.data.error.toDomain -import com.cheocharm.data.source.LoginRemoteDataSource +import com.cheocharm.data.remote.source.LoginRemoteDataSource import com.cheocharm.domain.model.GoogleSignUpRequest import com.cheocharm.domain.model.Token import com.cheocharm.domain.model.MapZSignInRequest diff --git a/data/src/main/java/com/cheocharm/data/repository/MyGroupsRepositoryImpl.kt b/data/src/main/java/com/cheocharm/data/repository/MyGroupsRepositoryImpl.kt index e313205b..b9b4545e 100644 --- a/data/src/main/java/com/cheocharm/data/repository/MyGroupsRepositoryImpl.kt +++ b/data/src/main/java/com/cheocharm/data/repository/MyGroupsRepositoryImpl.kt @@ -3,7 +3,7 @@ package com.cheocharm.data.repository import com.cheocharm.data.error.ErrorData import com.cheocharm.data.error.toDomain import com.cheocharm.data.mapper.toDomain -import com.cheocharm.data.source.MyGroupsRemoteDataSource +import com.cheocharm.data.remote.source.MyGroupsRemoteDataSource import com.cheocharm.domain.model.Group import com.cheocharm.domain.repository.MyGroupsRepository import javax.inject.Inject diff --git a/data/src/main/java/com/cheocharm/data/repository/WriteRepositoryImpl.kt b/data/src/main/java/com/cheocharm/data/repository/WriteRepositoryImpl.kt index 73bc58e9..2ee45e87 100644 --- a/data/src/main/java/com/cheocharm/data/repository/WriteRepositoryImpl.kt +++ b/data/src/main/java/com/cheocharm/data/repository/WriteRepositoryImpl.kt @@ -2,7 +2,7 @@ package com.cheocharm.data.repository import com.cheocharm.data.error.ErrorData import com.cheocharm.data.error.toDomain -import com.cheocharm.data.source.WriteRemoteDataSource +import com.cheocharm.data.remote.source.WriteRemoteDataSource import com.cheocharm.domain.model.TempDiary import com.cheocharm.domain.model.WriteDiaryRequest import com.cheocharm.domain.model.WriteImageRequest diff --git a/local/src/main/java/com/cheocharm/local/di/DataSourceModule.kt b/local/src/main/java/com/cheocharm/local/di/DataSourceModule.kt index f015137c..efecdea3 100644 --- a/local/src/main/java/com/cheocharm/local/di/DataSourceModule.kt +++ b/local/src/main/java/com/cheocharm/local/di/DataSourceModule.kt @@ -1,6 +1,6 @@ package com.cheocharm.local.di -import com.cheocharm.data.source.AuthLocalDataSource +import com.cheocharm.data.local.source.AuthLocalDataSource import com.cheocharm.local.source.AuthLocalDataSourceImpl import dagger.Binds import dagger.Module diff --git a/local/src/main/java/com/cheocharm/local/source/AuthLocalDataSourceImpl.kt b/local/src/main/java/com/cheocharm/local/source/AuthLocalDataSourceImpl.kt index eeda72b0..34588aca 100644 --- a/local/src/main/java/com/cheocharm/local/source/AuthLocalDataSourceImpl.kt +++ b/local/src/main/java/com/cheocharm/local/source/AuthLocalDataSourceImpl.kt @@ -1,6 +1,6 @@ package com.cheocharm.local.source -import com.cheocharm.data.source.AuthLocalDataSource +import com.cheocharm.data.local.source.AuthLocalDataSource import com.cheocharm.local.SharedPrefManager import javax.inject.Inject diff --git a/remote/src/main/java/com/cheocharm/remote/di/DataSourceModule.kt b/remote/src/main/java/com/cheocharm/remote/di/DataSourceModule.kt index 9067511b..fe8423ef 100644 --- a/remote/src/main/java/com/cheocharm/remote/di/DataSourceModule.kt +++ b/remote/src/main/java/com/cheocharm/remote/di/DataSourceModule.kt @@ -1,11 +1,11 @@ package com.cheocharm.remote.di -import com.cheocharm.data.source.GroupRemoteDataSource +import com.cheocharm.data.remote.source.GroupRemoteDataSource import com.cheocharm.remote.source.GroupRemoteDataSourceImpl -import com.cheocharm.data.source.AuthRemoteDataSource -import com.cheocharm.data.source.LoginRemoteDataSource -import com.cheocharm.data.source.MyGroupsRemoteDataSource -import com.cheocharm.data.source.WriteRemoteDataSource +import com.cheocharm.data.remote.source.AuthRemoteDataSource +import com.cheocharm.data.remote.source.LoginRemoteDataSource +import com.cheocharm.data.remote.source.MyGroupsRemoteDataSource +import com.cheocharm.data.remote.source.WriteRemoteDataSource import com.cheocharm.remote.source.AuthRemoteDataSourceImpl import com.cheocharm.remote.source.LoginRemoteDataSourceImpl import com.cheocharm.remote.source.MyGroupsRemoteDataSourceImpl diff --git a/remote/src/main/java/com/cheocharm/remote/source/AuthRemoteDataSourceImpl.kt b/remote/src/main/java/com/cheocharm/remote/source/AuthRemoteDataSourceImpl.kt index 8cf926bd..0192e8ca 100644 --- a/remote/src/main/java/com/cheocharm/remote/source/AuthRemoteDataSourceImpl.kt +++ b/remote/src/main/java/com/cheocharm/remote/source/AuthRemoteDataSourceImpl.kt @@ -1,11 +1,10 @@ package com.cheocharm.remote.source import com.cheocharm.data.error.ErrorData -import com.cheocharm.data.source.AuthRemoteDataSource +import com.cheocharm.data.remote.source.AuthRemoteDataSource import com.cheocharm.domain.model.Token import com.cheocharm.remote.api.TokenApi import com.cheocharm.remote.mapper.toDomain -import com.cheocharm.remote.model.TokenResponse import java.net.UnknownHostException import javax.inject.Inject diff --git a/remote/src/main/java/com/cheocharm/remote/source/GroupRemoteDataSourceImpl.kt b/remote/src/main/java/com/cheocharm/remote/source/GroupRemoteDataSourceImpl.kt index d1acb7ba..e5dbbedb 100644 --- a/remote/src/main/java/com/cheocharm/remote/source/GroupRemoteDataSourceImpl.kt +++ b/remote/src/main/java/com/cheocharm/remote/source/GroupRemoteDataSourceImpl.kt @@ -4,7 +4,7 @@ import androidx.paging.Pager import androidx.paging.PagingConfig import androidx.paging.PagingData import com.cheocharm.data.error.ErrorData -import com.cheocharm.data.source.GroupRemoteDataSource +import com.cheocharm.data.remote.source.GroupRemoteDataSource import com.cheocharm.domain.model.Group import com.cheocharm.remote.api.GroupApi import kotlinx.coroutines.flow.Flow diff --git a/remote/src/main/java/com/cheocharm/remote/source/LoginRemoteDataSourceImpl.kt b/remote/src/main/java/com/cheocharm/remote/source/LoginRemoteDataSourceImpl.kt index 5ddb5324..59671687 100644 --- a/remote/src/main/java/com/cheocharm/remote/source/LoginRemoteDataSourceImpl.kt +++ b/remote/src/main/java/com/cheocharm/remote/source/LoginRemoteDataSourceImpl.kt @@ -1,7 +1,7 @@ package com.cheocharm.remote.source import com.cheocharm.data.error.ErrorData -import com.cheocharm.data.source.LoginRemoteDataSource +import com.cheocharm.data.remote.source.LoginRemoteDataSource import com.cheocharm.domain.model.GoogleSignUpRequest import com.cheocharm.domain.model.Token import com.cheocharm.domain.model.MapZSignInRequest diff --git a/remote/src/main/java/com/cheocharm/remote/source/MyGroupsRemoteDataSourceImpl.kt b/remote/src/main/java/com/cheocharm/remote/source/MyGroupsRemoteDataSourceImpl.kt index 8251d82a..ebb8f04f 100644 --- a/remote/src/main/java/com/cheocharm/remote/source/MyGroupsRemoteDataSourceImpl.kt +++ b/remote/src/main/java/com/cheocharm/remote/source/MyGroupsRemoteDataSourceImpl.kt @@ -2,7 +2,7 @@ package com.cheocharm.remote.source import com.cheocharm.data.error.ErrorData import com.cheocharm.data.model.GroupData -import com.cheocharm.data.source.MyGroupsRemoteDataSource +import com.cheocharm.data.remote.source.MyGroupsRemoteDataSource import com.cheocharm.remote.api.DiaryApi import com.cheocharm.remote.mapper.toData import java.net.UnknownHostException diff --git a/remote/src/main/java/com/cheocharm/remote/source/WriteRemoteDataSourceImpl.kt b/remote/src/main/java/com/cheocharm/remote/source/WriteRemoteDataSourceImpl.kt index fa0dd4c1..4d97d81d 100644 --- a/remote/src/main/java/com/cheocharm/remote/source/WriteRemoteDataSourceImpl.kt +++ b/remote/src/main/java/com/cheocharm/remote/source/WriteRemoteDataSourceImpl.kt @@ -1,7 +1,7 @@ package com.cheocharm.remote.source import com.cheocharm.data.error.ErrorData -import com.cheocharm.data.source.WriteRemoteDataSource +import com.cheocharm.data.remote.source.WriteRemoteDataSource import com.cheocharm.domain.model.TempDiary import com.cheocharm.domain.model.WriteDiaryRequest import com.cheocharm.domain.model.WriteImageRequest From 4c3741112ca145060a2111783f2aceb086bb4984 Mon Sep 17 00:00:00 2001 From: Hyesung82 Date: Sat, 16 Mar 2024 23:41:17 +0900 Subject: [PATCH 2/2] =?UTF-8?q?#72=20refactor:=20local,=20remote=20?= =?UTF-8?q?=EB=AA=A8=EB=93=88=EC=9D=84=20data=20=EB=AA=A8=EB=93=88?= =?UTF-8?q?=EC=97=90=20=EB=B3=91=ED=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 2 - data/build.gradle | 52 +++++++++++++-- {local => data}/consumer-rules.pro | 0 {local => data}/proguard-rules.pro | 0 .../data}/ExampleInstrumentedTest.kt | 2 +- .../cheocharm/data}/di/DataSourceModule.kt | 19 ++++-- .../com/cheocharm/data}/di/MapZRetrofit.kt | 4 +- .../com/cheocharm/data}/di/RemoteModule.kt | 12 ++-- .../data}/di/SharedPreferenceModule.kt | 6 +- .../data}/local/SharedPrefManager.kt | 2 +- .../data}/local/SharedPrefManagerImpl.kt | 2 +- .../local/source/AuthLocalDataSourceImpl.kt | 5 +- .../cheocharm/data}/remote/api/DiaryApi.kt | 14 ++-- .../cheocharm/data}/remote/api/GroupApi.kt | 6 +- .../cheocharm/data}/remote/api/LoginApi.kt | 12 ++-- .../cheocharm/data}/remote/api/TokenApi.kt | 6 +- .../data}/remote/mapper/GroupMapper.kt | 4 +- .../data}/remote/mapper/SignMapper.kt | 10 +-- .../data}/remote/mapper/WriteMapper.kt | 12 ++-- .../data}/remote/model/BaseResponse.kt | 2 +- .../data}/remote/model/TokenResponse.kt | 2 +- .../remote/model/request/GoogleSignUpDto.kt | 2 +- .../remote/model/request/MapZSignInDto.kt | 2 +- .../remote/model/request/MapZSignUpDto.kt | 2 +- .../remote/model/request/WriteDiaryDto.kt | 2 +- .../remote/model/request/WriteImageDto.kt | 2 +- .../model/response/group/GroupResponse.kt | 2 +- .../response/group/GroupSearchResponse.kt | 8 +++ .../remote/model/response/write/MyGroup.kt | 2 +- .../response/write/WriteDiaryResponse.kt | 3 + .../response/write/WriteImageResponse.kt | 2 +- .../data}/remote/network/AuthInterceptor.kt | 2 +- .../remote/source/AuthRemoteDataSourceImpl.kt | 7 +- .../source/GroupRemoteDataSourceImpl.kt | 5 +- .../remote/source/GroupSearchPagingSource.kt | 6 +- .../source/LoginRemoteDataSourceImpl.kt | 9 ++- .../source/MyGroupsRemoteDataSourceImpl.kt | 7 +- .../source/WriteRemoteDataSourceImpl.kt | 9 ++- .../com/cheocharm/data}/ExampleUnitTest.kt | 0 local/.gitignore | 1 - local/build.gradle | 49 -------------- local/src/main/AndroidManifest.xml | 4 -- .../cheocharm/local/di/DataSourceModule.kt | 18 ----- remote/.gitignore | 1 - remote/build.gradle | 65 ------------------- remote/consumer-rules.pro | 0 remote/proguard-rules.pro | 21 ------ .../remote/ExampleInstrumentedTest.kt | 24 ------- remote/src/main/AndroidManifest.xml | 2 - .../response/group/GroupSearchResponse.kt | 6 -- .../response/write/WriteDiaryResponse.kt | 3 - .../com/cheocharm/remote/ExampleUnitTest.kt | 17 ----- settings.gradle | 2 - 53 files changed, 147 insertions(+), 312 deletions(-) rename {local => data}/consumer-rules.pro (100%) rename {local => data}/proguard-rules.pro (100%) rename {local/src/androidTest/java/com/cheocharm/local => data/src/androidTest/java/com/cheocharm/data}/ExampleInstrumentedTest.kt (95%) rename {remote/src/main/java/com/cheocharm/remote => data/src/main/java/com/cheocharm/data}/di/DataSourceModule.kt (66%) rename {remote/src/main/java/com/cheocharm/remote => data/src/main/java/com/cheocharm/data}/di/MapZRetrofit.kt (85%) rename {remote/src/main/java/com/cheocharm/remote => data/src/main/java/com/cheocharm/data}/di/RemoteModule.kt (88%) rename {local/src/main/java/com/cheocharm/local => data/src/main/java/com/cheocharm/data}/di/SharedPreferenceModule.kt (73%) rename {local/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/local/SharedPrefManager.kt (87%) rename {local/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/local/SharedPrefManagerImpl.kt (96%) rename {local/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/local/source/AuthLocalDataSourceImpl.kt (91%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/api/DiaryApi.kt (58%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/api/GroupApi.kt (71%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/api/LoginApi.kt (73%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/api/TokenApi.kt (59%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/mapper/GroupMapper.kt (82%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/mapper/SignMapper.kt (72%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/mapper/WriteMapper.kt (64%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/model/BaseResponse.kt (75%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/model/TokenResponse.kt (68%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/model/request/GoogleSignUpDto.kt (70%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/model/request/MapZSignInDto.kt (61%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/model/request/MapZSignUpDto.kt (73%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/model/request/WriteDiaryDto.kt (67%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/model/request/WriteImageDto.kt (72%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/model/response/group/GroupResponse.kt (79%) create mode 100644 data/src/main/java/com/cheocharm/data/remote/model/response/group/GroupSearchResponse.kt rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/model/response/write/MyGroup.kt (73%) create mode 100644 data/src/main/java/com/cheocharm/data/remote/model/response/write/WriteDiaryResponse.kt rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/model/response/write/WriteImageResponse.kt (58%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/network/AuthInterceptor.kt (98%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/source/AuthRemoteDataSourceImpl.kt (84%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/source/GroupRemoteDataSourceImpl.kt (90%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/source/GroupSearchPagingSource.kt (92%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/source/LoginRemoteDataSourceImpl.kt (95%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/source/MyGroupsRemoteDataSourceImpl.kt (84%) rename {remote/src/main/java/com/cheocharm => data/src/main/java/com/cheocharm/data}/remote/source/WriteRemoteDataSourceImpl.kt (90%) rename {local/src/test/java/com/cheocharm/local => data/src/test/java/com/cheocharm/data}/ExampleUnitTest.kt (100%) delete mode 100644 local/.gitignore delete mode 100644 local/build.gradle delete mode 100644 local/src/main/AndroidManifest.xml delete mode 100644 local/src/main/java/com/cheocharm/local/di/DataSourceModule.kt delete mode 100644 remote/.gitignore delete mode 100644 remote/build.gradle delete mode 100644 remote/consumer-rules.pro delete mode 100644 remote/proguard-rules.pro delete mode 100644 remote/src/androidTest/java/com/cheocharm/remote/ExampleInstrumentedTest.kt delete mode 100644 remote/src/main/AndroidManifest.xml delete mode 100644 remote/src/main/java/com/cheocharm/remote/model/response/group/GroupSearchResponse.kt delete mode 100644 remote/src/main/java/com/cheocharm/remote/model/response/write/WriteDiaryResponse.kt delete mode 100644 remote/src/test/java/com/cheocharm/remote/ExampleUnitTest.kt diff --git a/app/build.gradle b/app/build.gradle index 04dd3e0e..0d2718a0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -43,8 +43,6 @@ dependencies { implementation project(":presentation") implementation project(":domain") implementation project(":data") - implementation project(":remote") - implementation project(":local") implementation "androidx.core:core-ktx:$coreKtxVersion" diff --git a/data/build.gradle b/data/build.gradle index 40c4d0aa..42eaf963 100644 --- a/data/build.gradle +++ b/data/build.gradle @@ -1,19 +1,54 @@ plugins { - id 'java-library' - id 'org.jetbrains.kotlin.jvm' + id 'com.android.library' + id 'org.jetbrains.kotlin.android' id 'kotlin-kapt' + id 'com.google.dagger.hilt.android' } -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 +Properties properties = new Properties() +properties.load(project.rootProject.file('local.properties').newDataInputStream()) + +android { + namespace = "com.cheocharm.data" + + compileSdk 34 + + defaultConfig { + minSdk 23 + targetSdk 34 + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles "consumer-rules.pro" + + buildConfigField "String", "BASE_URL", properties['base.url'] + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = jvmTarget + } } dependencies { implementation project(":domain") + def retrofitVersion = "2.9.0" + + testImplementation 'junit:junit:4.13.2' + androidTestImplementation "androidx.test.ext:junit:$junitVersion" + androidTestImplementation "androidx.test.espresso:espresso-core:$espressoCoreVersion" + // Hilt - implementation "com.google.dagger:hilt-core:$hiltVersion" + implementation "com.google.dagger:hilt-android:$hiltVersion" kapt "com.google.dagger:hilt-android-compiler:$hiltVersion" // kotlin coroutine @@ -21,4 +56,9 @@ dependencies { // paging - without Android dependencies implementation "androidx.paging:paging-common-ktx:$pagingVersion" + + // Retrofit + implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" + implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion" + implementation "com.squareup.okhttp3:logging-interceptor:4.9.3" } diff --git a/local/consumer-rules.pro b/data/consumer-rules.pro similarity index 100% rename from local/consumer-rules.pro rename to data/consumer-rules.pro diff --git a/local/proguard-rules.pro b/data/proguard-rules.pro similarity index 100% rename from local/proguard-rules.pro rename to data/proguard-rules.pro diff --git a/local/src/androidTest/java/com/cheocharm/local/ExampleInstrumentedTest.kt b/data/src/androidTest/java/com/cheocharm/data/ExampleInstrumentedTest.kt similarity index 95% rename from local/src/androidTest/java/com/cheocharm/local/ExampleInstrumentedTest.kt rename to data/src/androidTest/java/com/cheocharm/data/ExampleInstrumentedTest.kt index 5e9d97b0..501807e5 100644 --- a/local/src/androidTest/java/com/cheocharm/local/ExampleInstrumentedTest.kt +++ b/data/src/androidTest/java/com/cheocharm/data/ExampleInstrumentedTest.kt @@ -1,4 +1,4 @@ -package com.cheocharm.local +package com.cheocharm.data import androidx.test.platform.app.InstrumentationRegistry import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/remote/src/main/java/com/cheocharm/remote/di/DataSourceModule.kt b/data/src/main/java/com/cheocharm/data/di/DataSourceModule.kt similarity index 66% rename from remote/src/main/java/com/cheocharm/remote/di/DataSourceModule.kt rename to data/src/main/java/com/cheocharm/data/di/DataSourceModule.kt index fe8423ef..6359b4ff 100644 --- a/remote/src/main/java/com/cheocharm/remote/di/DataSourceModule.kt +++ b/data/src/main/java/com/cheocharm/data/di/DataSourceModule.kt @@ -1,15 +1,17 @@ -package com.cheocharm.remote.di +package com.cheocharm.data.di -import com.cheocharm.data.remote.source.GroupRemoteDataSource -import com.cheocharm.remote.source.GroupRemoteDataSourceImpl +import com.cheocharm.data.local.source.AuthLocalDataSource +import com.cheocharm.data.local.source.AuthLocalDataSourceImpl import com.cheocharm.data.remote.source.AuthRemoteDataSource +import com.cheocharm.data.remote.source.AuthRemoteDataSourceImpl +import com.cheocharm.data.remote.source.GroupRemoteDataSource +import com.cheocharm.data.remote.source.GroupRemoteDataSourceImpl import com.cheocharm.data.remote.source.LoginRemoteDataSource +import com.cheocharm.data.remote.source.LoginRemoteDataSourceImpl import com.cheocharm.data.remote.source.MyGroupsRemoteDataSource +import com.cheocharm.data.remote.source.MyGroupsRemoteDataSourceImpl import com.cheocharm.data.remote.source.WriteRemoteDataSource -import com.cheocharm.remote.source.AuthRemoteDataSourceImpl -import com.cheocharm.remote.source.LoginRemoteDataSourceImpl -import com.cheocharm.remote.source.MyGroupsRemoteDataSourceImpl -import com.cheocharm.remote.source.WriteRemoteDataSourceImpl +import com.cheocharm.data.remote.source.WriteRemoteDataSourceImpl import dagger.Binds import dagger.Module import dagger.hilt.InstallIn @@ -19,6 +21,9 @@ import javax.inject.Singleton @Module @InstallIn(SingletonComponent::class) internal abstract class DataSourceModule { + @Binds + @Singleton + abstract fun bindAuthLocalDataSource(dataSourceImpl: AuthLocalDataSourceImpl): AuthLocalDataSource @Binds @Singleton diff --git a/remote/src/main/java/com/cheocharm/remote/di/MapZRetrofit.kt b/data/src/main/java/com/cheocharm/data/di/MapZRetrofit.kt similarity index 85% rename from remote/src/main/java/com/cheocharm/remote/di/MapZRetrofit.kt rename to data/src/main/java/com/cheocharm/data/di/MapZRetrofit.kt index 4500fe48..b5c372d3 100644 --- a/remote/src/main/java/com/cheocharm/remote/di/MapZRetrofit.kt +++ b/data/src/main/java/com/cheocharm/data/di/MapZRetrofit.kt @@ -1,6 +1,6 @@ -package com.cheocharm.remote.di +package com.cheocharm.data.di -import com.cheocharm.remote.BuildConfig +import com.cheocharm.data.BuildConfig import okhttp3.OkHttpClient import retrofit2.Retrofit import retrofit2.converter.gson.GsonConverterFactory diff --git a/remote/src/main/java/com/cheocharm/remote/di/RemoteModule.kt b/data/src/main/java/com/cheocharm/data/di/RemoteModule.kt similarity index 88% rename from remote/src/main/java/com/cheocharm/remote/di/RemoteModule.kt rename to data/src/main/java/com/cheocharm/data/di/RemoteModule.kt index 5b3974f1..fe0b9e69 100644 --- a/remote/src/main/java/com/cheocharm/remote/di/RemoteModule.kt +++ b/data/src/main/java/com/cheocharm/data/di/RemoteModule.kt @@ -1,10 +1,10 @@ -package com.cheocharm.remote.di +package com.cheocharm.data.di -import com.cheocharm.remote.api.GroupApi -import com.cheocharm.remote.api.LoginApi -import com.cheocharm.remote.api.TokenApi -import com.cheocharm.remote.api.DiaryApi -import com.cheocharm.remote.network.AuthInterceptor +import com.cheocharm.data.remote.api.GroupApi +import com.cheocharm.data.remote.api.LoginApi +import com.cheocharm.data.remote.api.TokenApi +import com.cheocharm.data.remote.api.DiaryApi +import com.cheocharm.data.remote.network.AuthInterceptor import dagger.Module import dagger.Provides import dagger.hilt.InstallIn diff --git a/local/src/main/java/com/cheocharm/local/di/SharedPreferenceModule.kt b/data/src/main/java/com/cheocharm/data/di/SharedPreferenceModule.kt similarity index 73% rename from local/src/main/java/com/cheocharm/local/di/SharedPreferenceModule.kt rename to data/src/main/java/com/cheocharm/data/di/SharedPreferenceModule.kt index e5dfd2fa..ac7d432a 100644 --- a/local/src/main/java/com/cheocharm/local/di/SharedPreferenceModule.kt +++ b/data/src/main/java/com/cheocharm/data/di/SharedPreferenceModule.kt @@ -1,7 +1,7 @@ -package com.cheocharm.local.di +package com.cheocharm.data.di -import com.cheocharm.local.SharedPrefManager -import com.cheocharm.local.SharedPrefManagerImpl +import com.cheocharm.data.local.SharedPrefManager +import com.cheocharm.data.local.SharedPrefManagerImpl import dagger.Binds import dagger.Module import dagger.hilt.InstallIn diff --git a/local/src/main/java/com/cheocharm/local/SharedPrefManager.kt b/data/src/main/java/com/cheocharm/data/local/SharedPrefManager.kt similarity index 87% rename from local/src/main/java/com/cheocharm/local/SharedPrefManager.kt rename to data/src/main/java/com/cheocharm/data/local/SharedPrefManager.kt index 5b338003..8162867a 100644 --- a/local/src/main/java/com/cheocharm/local/SharedPrefManager.kt +++ b/data/src/main/java/com/cheocharm/data/local/SharedPrefManager.kt @@ -1,4 +1,4 @@ -package com.cheocharm.local +package com.cheocharm.data.local interface SharedPrefManager { diff --git a/local/src/main/java/com/cheocharm/local/SharedPrefManagerImpl.kt b/data/src/main/java/com/cheocharm/data/local/SharedPrefManagerImpl.kt similarity index 96% rename from local/src/main/java/com/cheocharm/local/SharedPrefManagerImpl.kt rename to data/src/main/java/com/cheocharm/data/local/SharedPrefManagerImpl.kt index 1b560b05..6c753b9d 100644 --- a/local/src/main/java/com/cheocharm/local/SharedPrefManagerImpl.kt +++ b/data/src/main/java/com/cheocharm/data/local/SharedPrefManagerImpl.kt @@ -1,4 +1,4 @@ -package com.cheocharm.local +package com.cheocharm.data.local import android.content.Context import dagger.hilt.android.qualifiers.ApplicationContext diff --git a/local/src/main/java/com/cheocharm/local/source/AuthLocalDataSourceImpl.kt b/data/src/main/java/com/cheocharm/data/local/source/AuthLocalDataSourceImpl.kt similarity index 91% rename from local/src/main/java/com/cheocharm/local/source/AuthLocalDataSourceImpl.kt rename to data/src/main/java/com/cheocharm/data/local/source/AuthLocalDataSourceImpl.kt index 34588aca..b39d902d 100644 --- a/local/src/main/java/com/cheocharm/local/source/AuthLocalDataSourceImpl.kt +++ b/data/src/main/java/com/cheocharm/data/local/source/AuthLocalDataSourceImpl.kt @@ -1,7 +1,6 @@ -package com.cheocharm.local.source +package com.cheocharm.data.local.source -import com.cheocharm.data.local.source.AuthLocalDataSource -import com.cheocharm.local.SharedPrefManager +import com.cheocharm.data.local.SharedPrefManager import javax.inject.Inject class AuthLocalDataSourceImpl @Inject constructor( diff --git a/remote/src/main/java/com/cheocharm/remote/api/DiaryApi.kt b/data/src/main/java/com/cheocharm/data/remote/api/DiaryApi.kt similarity index 58% rename from remote/src/main/java/com/cheocharm/remote/api/DiaryApi.kt rename to data/src/main/java/com/cheocharm/data/remote/api/DiaryApi.kt index 71f0067f..85ba258a 100644 --- a/remote/src/main/java/com/cheocharm/remote/api/DiaryApi.kt +++ b/data/src/main/java/com/cheocharm/data/remote/api/DiaryApi.kt @@ -1,11 +1,11 @@ -package com.cheocharm.remote.api +package com.cheocharm.data.remote.api -import com.cheocharm.remote.model.BaseResponse -import com.cheocharm.remote.model.request.WriteDiaryDto -import com.cheocharm.remote.model.request.WriteImageDto -import com.cheocharm.remote.model.response.write.MyGroup -import com.cheocharm.remote.model.response.write.WriteDiaryResponse -import com.cheocharm.remote.model.response.write.WriteImageResponse +import com.cheocharm.data.remote.model.BaseResponse +import com.cheocharm.data.remote.model.request.WriteDiaryDto +import com.cheocharm.data.remote.model.request.WriteImageDto +import com.cheocharm.data.remote.model.response.write.MyGroup +import com.cheocharm.data.remote.model.response.write.WriteDiaryResponse +import com.cheocharm.data.remote.model.response.write.WriteImageResponse import okhttp3.MultipartBody import retrofit2.http.Body import retrofit2.http.GET diff --git a/remote/src/main/java/com/cheocharm/remote/api/GroupApi.kt b/data/src/main/java/com/cheocharm/data/remote/api/GroupApi.kt similarity index 71% rename from remote/src/main/java/com/cheocharm/remote/api/GroupApi.kt rename to data/src/main/java/com/cheocharm/data/remote/api/GroupApi.kt index 997cd516..1335e3f1 100644 --- a/remote/src/main/java/com/cheocharm/remote/api/GroupApi.kt +++ b/data/src/main/java/com/cheocharm/data/remote/api/GroupApi.kt @@ -1,7 +1,7 @@ -package com.cheocharm.remote.api +package com.cheocharm.data.remote.api -import com.cheocharm.remote.model.BaseResponse -import com.cheocharm.remote.model.response.group.GroupSearchResponse +import com.cheocharm.data.remote.model.BaseResponse +import com.cheocharm.data.remote.model.response.group.GroupSearchResponse import retrofit2.http.Body import retrofit2.http.GET import retrofit2.http.POST diff --git a/remote/src/main/java/com/cheocharm/remote/api/LoginApi.kt b/data/src/main/java/com/cheocharm/data/remote/api/LoginApi.kt similarity index 73% rename from remote/src/main/java/com/cheocharm/remote/api/LoginApi.kt rename to data/src/main/java/com/cheocharm/data/remote/api/LoginApi.kt index c3c27b1f..f89f1426 100644 --- a/remote/src/main/java/com/cheocharm/remote/api/LoginApi.kt +++ b/data/src/main/java/com/cheocharm/data/remote/api/LoginApi.kt @@ -1,10 +1,10 @@ -package com.cheocharm.remote.api +package com.cheocharm.data.remote.api -import com.cheocharm.remote.model.BaseResponse -import com.cheocharm.remote.model.TokenResponse -import com.cheocharm.remote.model.request.GoogleSignUpDto -import com.cheocharm.remote.model.request.MapZSignInDto -import com.cheocharm.remote.model.request.MapZSignUpDto +import com.cheocharm.data.remote.model.BaseResponse +import com.cheocharm.data.remote.model.TokenResponse +import com.cheocharm.data.remote.model.request.GoogleSignUpDto +import com.cheocharm.data.remote.model.request.MapZSignInDto +import com.cheocharm.data.remote.model.request.MapZSignUpDto import okhttp3.MultipartBody import okhttp3.RequestBody import retrofit2.http.Body diff --git a/remote/src/main/java/com/cheocharm/remote/api/TokenApi.kt b/data/src/main/java/com/cheocharm/data/remote/api/TokenApi.kt similarity index 59% rename from remote/src/main/java/com/cheocharm/remote/api/TokenApi.kt rename to data/src/main/java/com/cheocharm/data/remote/api/TokenApi.kt index b8fc3c0a..bde732d7 100644 --- a/remote/src/main/java/com/cheocharm/remote/api/TokenApi.kt +++ b/data/src/main/java/com/cheocharm/data/remote/api/TokenApi.kt @@ -1,7 +1,7 @@ -package com.cheocharm.remote.api +package com.cheocharm.data.remote.api -import com.cheocharm.remote.model.BaseResponse -import com.cheocharm.remote.model.TokenResponse +import com.cheocharm.data.remote.model.BaseResponse +import com.cheocharm.data.remote.model.TokenResponse import retrofit2.http.GET import retrofit2.http.Header diff --git a/remote/src/main/java/com/cheocharm/remote/mapper/GroupMapper.kt b/data/src/main/java/com/cheocharm/data/remote/mapper/GroupMapper.kt similarity index 82% rename from remote/src/main/java/com/cheocharm/remote/mapper/GroupMapper.kt rename to data/src/main/java/com/cheocharm/data/remote/mapper/GroupMapper.kt index 053528e4..d3a9de55 100644 --- a/remote/src/main/java/com/cheocharm/remote/mapper/GroupMapper.kt +++ b/data/src/main/java/com/cheocharm/data/remote/mapper/GroupMapper.kt @@ -1,9 +1,9 @@ -package com.cheocharm.remote.mapper +package com.cheocharm.data.remote.mapper import com.cheocharm.domain.model.Group import com.cheocharm.domain.model.GroupMember import com.cheocharm.domain.model.GroupSearch -import com.cheocharm.remote.model.response.group.GroupSearchResponse +import com.cheocharm.data.remote.model.response.group.GroupSearchResponse // remote -> domain internal fun GroupSearchResponse.toDomain(): GroupSearch { diff --git a/remote/src/main/java/com/cheocharm/remote/mapper/SignMapper.kt b/data/src/main/java/com/cheocharm/data/remote/mapper/SignMapper.kt similarity index 72% rename from remote/src/main/java/com/cheocharm/remote/mapper/SignMapper.kt rename to data/src/main/java/com/cheocharm/data/remote/mapper/SignMapper.kt index c3a2a69c..e5cb5764 100644 --- a/remote/src/main/java/com/cheocharm/remote/mapper/SignMapper.kt +++ b/data/src/main/java/com/cheocharm/data/remote/mapper/SignMapper.kt @@ -1,13 +1,13 @@ -package com.cheocharm.remote.mapper +package com.cheocharm.data.remote.mapper import com.cheocharm.domain.model.GoogleSignUpRequest import com.cheocharm.domain.model.Token import com.cheocharm.domain.model.MapZSignInRequest import com.cheocharm.domain.model.MapZSignUpRequest -import com.cheocharm.remote.model.TokenResponse -import com.cheocharm.remote.model.request.GoogleSignUpDto -import com.cheocharm.remote.model.request.MapZSignInDto -import com.cheocharm.remote.model.request.MapZSignUpDto +import com.cheocharm.data.remote.model.TokenResponse +import com.cheocharm.data.remote.model.request.GoogleSignUpDto +import com.cheocharm.data.remote.model.request.MapZSignInDto +import com.cheocharm.data.remote.model.request.MapZSignUpDto // domain -> remote internal fun MapZSignUpRequest.toDto(): MapZSignUpDto { diff --git a/remote/src/main/java/com/cheocharm/remote/mapper/WriteMapper.kt b/data/src/main/java/com/cheocharm/data/remote/mapper/WriteMapper.kt similarity index 64% rename from remote/src/main/java/com/cheocharm/remote/mapper/WriteMapper.kt rename to data/src/main/java/com/cheocharm/data/remote/mapper/WriteMapper.kt index 67460133..6281c659 100644 --- a/remote/src/main/java/com/cheocharm/remote/mapper/WriteMapper.kt +++ b/data/src/main/java/com/cheocharm/data/remote/mapper/WriteMapper.kt @@ -1,14 +1,14 @@ -package com.cheocharm.remote.mapper +package com.cheocharm.data.remote.mapper import com.cheocharm.data.model.GroupData import com.cheocharm.domain.model.TempDiary import com.cheocharm.domain.model.WriteDiaryRequest import com.cheocharm.domain.model.WriteImageRequest -import com.cheocharm.remote.model.request.WriteDiaryDto -import com.cheocharm.remote.model.request.WriteImageDto -import com.cheocharm.remote.model.response.write.MyGroup -import com.cheocharm.remote.model.response.write.WriteDiaryResponse -import com.cheocharm.remote.model.response.write.WriteImageResponse +import com.cheocharm.data.remote.model.request.WriteDiaryDto +import com.cheocharm.data.remote.model.request.WriteImageDto +import com.cheocharm.data.remote.model.response.write.MyGroup +import com.cheocharm.data.remote.model.response.write.WriteDiaryResponse +import com.cheocharm.data.remote.model.response.write.WriteImageResponse internal fun MyGroup.toData(): GroupData { return GroupData(groupName, groupImageUrl, count, listOf(chiefUserImage), groupId) diff --git a/remote/src/main/java/com/cheocharm/remote/model/BaseResponse.kt b/data/src/main/java/com/cheocharm/data/remote/model/BaseResponse.kt similarity index 75% rename from remote/src/main/java/com/cheocharm/remote/model/BaseResponse.kt rename to data/src/main/java/com/cheocharm/data/remote/model/BaseResponse.kt index 2dc10650..2c6c4fcd 100644 --- a/remote/src/main/java/com/cheocharm/remote/model/BaseResponse.kt +++ b/data/src/main/java/com/cheocharm/data/remote/model/BaseResponse.kt @@ -1,4 +1,4 @@ -package com.cheocharm.remote.model +package com.cheocharm.data.remote.model data class BaseResponse( val statusCode: Int, diff --git a/remote/src/main/java/com/cheocharm/remote/model/TokenResponse.kt b/data/src/main/java/com/cheocharm/data/remote/model/TokenResponse.kt similarity index 68% rename from remote/src/main/java/com/cheocharm/remote/model/TokenResponse.kt rename to data/src/main/java/com/cheocharm/data/remote/model/TokenResponse.kt index 79263aa2..21badcea 100644 --- a/remote/src/main/java/com/cheocharm/remote/model/TokenResponse.kt +++ b/data/src/main/java/com/cheocharm/data/remote/model/TokenResponse.kt @@ -1,4 +1,4 @@ -package com.cheocharm.remote.model +package com.cheocharm.data.remote.model data class TokenResponse( val accessToken: String?, diff --git a/remote/src/main/java/com/cheocharm/remote/model/request/GoogleSignUpDto.kt b/data/src/main/java/com/cheocharm/data/remote/model/request/GoogleSignUpDto.kt similarity index 70% rename from remote/src/main/java/com/cheocharm/remote/model/request/GoogleSignUpDto.kt rename to data/src/main/java/com/cheocharm/data/remote/model/request/GoogleSignUpDto.kt index 5265c287..47272d3f 100644 --- a/remote/src/main/java/com/cheocharm/remote/model/request/GoogleSignUpDto.kt +++ b/data/src/main/java/com/cheocharm/data/remote/model/request/GoogleSignUpDto.kt @@ -1,4 +1,4 @@ -package com.cheocharm.remote.model.request +package com.cheocharm.data.remote.model.request data class GoogleSignUpDto( val username: String, diff --git a/remote/src/main/java/com/cheocharm/remote/model/request/MapZSignInDto.kt b/data/src/main/java/com/cheocharm/data/remote/model/request/MapZSignInDto.kt similarity index 61% rename from remote/src/main/java/com/cheocharm/remote/model/request/MapZSignInDto.kt rename to data/src/main/java/com/cheocharm/data/remote/model/request/MapZSignInDto.kt index c5a35d36..f528737d 100644 --- a/remote/src/main/java/com/cheocharm/remote/model/request/MapZSignInDto.kt +++ b/data/src/main/java/com/cheocharm/data/remote/model/request/MapZSignInDto.kt @@ -1,4 +1,4 @@ -package com.cheocharm.remote.model.request +package com.cheocharm.data.remote.model.request data class MapZSignInDto( val email: String, diff --git a/remote/src/main/java/com/cheocharm/remote/model/request/MapZSignUpDto.kt b/data/src/main/java/com/cheocharm/data/remote/model/request/MapZSignUpDto.kt similarity index 73% rename from remote/src/main/java/com/cheocharm/remote/model/request/MapZSignUpDto.kt rename to data/src/main/java/com/cheocharm/data/remote/model/request/MapZSignUpDto.kt index 93f7047b..cbb013c8 100644 --- a/remote/src/main/java/com/cheocharm/remote/model/request/MapZSignUpDto.kt +++ b/data/src/main/java/com/cheocharm/data/remote/model/request/MapZSignUpDto.kt @@ -1,4 +1,4 @@ -package com.cheocharm.remote.model.request +package com.cheocharm.data.remote.model.request data class MapZSignUpDto( val email: String, diff --git a/remote/src/main/java/com/cheocharm/remote/model/request/WriteDiaryDto.kt b/data/src/main/java/com/cheocharm/data/remote/model/request/WriteDiaryDto.kt similarity index 67% rename from remote/src/main/java/com/cheocharm/remote/model/request/WriteDiaryDto.kt rename to data/src/main/java/com/cheocharm/data/remote/model/request/WriteDiaryDto.kt index d9e1a0f9..7c2ebefd 100644 --- a/remote/src/main/java/com/cheocharm/remote/model/request/WriteDiaryDto.kt +++ b/data/src/main/java/com/cheocharm/data/remote/model/request/WriteDiaryDto.kt @@ -1,4 +1,4 @@ -package com.cheocharm.remote.model.request +package com.cheocharm.data.remote.model.request data class WriteDiaryDto( val diaryId: Long, diff --git a/remote/src/main/java/com/cheocharm/remote/model/request/WriteImageDto.kt b/data/src/main/java/com/cheocharm/data/remote/model/request/WriteImageDto.kt similarity index 72% rename from remote/src/main/java/com/cheocharm/remote/model/request/WriteImageDto.kt rename to data/src/main/java/com/cheocharm/data/remote/model/request/WriteImageDto.kt index a3d80dd5..3f73b740 100644 --- a/remote/src/main/java/com/cheocharm/remote/model/request/WriteImageDto.kt +++ b/data/src/main/java/com/cheocharm/data/remote/model/request/WriteImageDto.kt @@ -1,4 +1,4 @@ -package com.cheocharm.remote.model.request +package com.cheocharm.data.remote.model.request data class WriteImageDto( val groupId: Long, diff --git a/remote/src/main/java/com/cheocharm/remote/model/response/group/GroupResponse.kt b/data/src/main/java/com/cheocharm/data/remote/model/response/group/GroupResponse.kt similarity index 79% rename from remote/src/main/java/com/cheocharm/remote/model/response/group/GroupResponse.kt rename to data/src/main/java/com/cheocharm/data/remote/model/response/group/GroupResponse.kt index 1aeff2a8..b55695b3 100644 --- a/remote/src/main/java/com/cheocharm/remote/model/response/group/GroupResponse.kt +++ b/data/src/main/java/com/cheocharm/data/remote/model/response/group/GroupResponse.kt @@ -1,4 +1,4 @@ -package com.cheocharm.remote.model.response.group +package com.cheocharm.data.remote.model.response.group data class GroupResponse( val groupName: String, diff --git a/data/src/main/java/com/cheocharm/data/remote/model/response/group/GroupSearchResponse.kt b/data/src/main/java/com/cheocharm/data/remote/model/response/group/GroupSearchResponse.kt new file mode 100644 index 00000000..52434851 --- /dev/null +++ b/data/src/main/java/com/cheocharm/data/remote/model/response/group/GroupSearchResponse.kt @@ -0,0 +1,8 @@ +package com.cheocharm.data.remote.model.response.group + +import com.cheocharm.data.remote.model.response.group.GroupResponse + +data class GroupSearchResponse( + val hasNextPage: Boolean, + val groupList: List +) diff --git a/remote/src/main/java/com/cheocharm/remote/model/response/write/MyGroup.kt b/data/src/main/java/com/cheocharm/data/remote/model/response/write/MyGroup.kt similarity index 73% rename from remote/src/main/java/com/cheocharm/remote/model/response/write/MyGroup.kt rename to data/src/main/java/com/cheocharm/data/remote/model/response/write/MyGroup.kt index a0e53c4b..bf5f2e48 100644 --- a/remote/src/main/java/com/cheocharm/remote/model/response/write/MyGroup.kt +++ b/data/src/main/java/com/cheocharm/data/remote/model/response/write/MyGroup.kt @@ -1,4 +1,4 @@ -package com.cheocharm.remote.model.response.write +package com.cheocharm.data.remote.model.response.write data class MyGroup( val groupName: String, diff --git a/data/src/main/java/com/cheocharm/data/remote/model/response/write/WriteDiaryResponse.kt b/data/src/main/java/com/cheocharm/data/remote/model/response/write/WriteDiaryResponse.kt new file mode 100644 index 00000000..872e99b6 --- /dev/null +++ b/data/src/main/java/com/cheocharm/data/remote/model/response/write/WriteDiaryResponse.kt @@ -0,0 +1,3 @@ +package com.cheocharm.data.remote.model.response.write + +data class WriteDiaryResponse(val diaryId: Long) diff --git a/remote/src/main/java/com/cheocharm/remote/model/response/write/WriteImageResponse.kt b/data/src/main/java/com/cheocharm/data/remote/model/response/write/WriteImageResponse.kt similarity index 58% rename from remote/src/main/java/com/cheocharm/remote/model/response/write/WriteImageResponse.kt rename to data/src/main/java/com/cheocharm/data/remote/model/response/write/WriteImageResponse.kt index 7c4e6427..76ca8c83 100644 --- a/remote/src/main/java/com/cheocharm/remote/model/response/write/WriteImageResponse.kt +++ b/data/src/main/java/com/cheocharm/data/remote/model/response/write/WriteImageResponse.kt @@ -1,3 +1,3 @@ -package com.cheocharm.remote.model.response.write +package com.cheocharm.data.remote.model.response.write data class WriteImageResponse(val diaryId: Long, val imageURLs: List) diff --git a/remote/src/main/java/com/cheocharm/remote/network/AuthInterceptor.kt b/data/src/main/java/com/cheocharm/data/remote/network/AuthInterceptor.kt similarity index 98% rename from remote/src/main/java/com/cheocharm/remote/network/AuthInterceptor.kt rename to data/src/main/java/com/cheocharm/data/remote/network/AuthInterceptor.kt index d4de8f9b..c6175aa9 100644 --- a/remote/src/main/java/com/cheocharm/remote/network/AuthInterceptor.kt +++ b/data/src/main/java/com/cheocharm/data/remote/network/AuthInterceptor.kt @@ -1,4 +1,4 @@ -package com.cheocharm.remote.network +package com.cheocharm.data.remote.network import com.cheocharm.domain.repository.AuthRepository import android.util.Log diff --git a/remote/src/main/java/com/cheocharm/remote/source/AuthRemoteDataSourceImpl.kt b/data/src/main/java/com/cheocharm/data/remote/source/AuthRemoteDataSourceImpl.kt similarity index 84% rename from remote/src/main/java/com/cheocharm/remote/source/AuthRemoteDataSourceImpl.kt rename to data/src/main/java/com/cheocharm/data/remote/source/AuthRemoteDataSourceImpl.kt index 0192e8ca..881aefec 100644 --- a/remote/src/main/java/com/cheocharm/remote/source/AuthRemoteDataSourceImpl.kt +++ b/data/src/main/java/com/cheocharm/data/remote/source/AuthRemoteDataSourceImpl.kt @@ -1,10 +1,9 @@ -package com.cheocharm.remote.source +package com.cheocharm.data.remote.source import com.cheocharm.data.error.ErrorData -import com.cheocharm.data.remote.source.AuthRemoteDataSource import com.cheocharm.domain.model.Token -import com.cheocharm.remote.api.TokenApi -import com.cheocharm.remote.mapper.toDomain +import com.cheocharm.data.remote.api.TokenApi +import com.cheocharm.data.remote.mapper.toDomain import java.net.UnknownHostException import javax.inject.Inject diff --git a/remote/src/main/java/com/cheocharm/remote/source/GroupRemoteDataSourceImpl.kt b/data/src/main/java/com/cheocharm/data/remote/source/GroupRemoteDataSourceImpl.kt similarity index 90% rename from remote/src/main/java/com/cheocharm/remote/source/GroupRemoteDataSourceImpl.kt rename to data/src/main/java/com/cheocharm/data/remote/source/GroupRemoteDataSourceImpl.kt index e5dbbedb..a75cd96a 100644 --- a/remote/src/main/java/com/cheocharm/remote/source/GroupRemoteDataSourceImpl.kt +++ b/data/src/main/java/com/cheocharm/data/remote/source/GroupRemoteDataSourceImpl.kt @@ -1,12 +1,11 @@ -package com.cheocharm.remote.source +package com.cheocharm.data.remote.source import androidx.paging.Pager import androidx.paging.PagingConfig import androidx.paging.PagingData import com.cheocharm.data.error.ErrorData -import com.cheocharm.data.remote.source.GroupRemoteDataSource import com.cheocharm.domain.model.Group -import com.cheocharm.remote.api.GroupApi +import com.cheocharm.data.remote.api.GroupApi import kotlinx.coroutines.flow.Flow import java.net.UnknownHostException import javax.inject.Inject diff --git a/remote/src/main/java/com/cheocharm/remote/source/GroupSearchPagingSource.kt b/data/src/main/java/com/cheocharm/data/remote/source/GroupSearchPagingSource.kt similarity index 92% rename from remote/src/main/java/com/cheocharm/remote/source/GroupSearchPagingSource.kt rename to data/src/main/java/com/cheocharm/data/remote/source/GroupSearchPagingSource.kt index 63ef4c69..750aed3f 100644 --- a/remote/src/main/java/com/cheocharm/remote/source/GroupSearchPagingSource.kt +++ b/data/src/main/java/com/cheocharm/data/remote/source/GroupSearchPagingSource.kt @@ -1,11 +1,11 @@ -package com.cheocharm.remote.source +package com.cheocharm.data.remote.source import androidx.paging.PagingSource import androidx.paging.PagingState import com.cheocharm.data.error.ErrorData import com.cheocharm.domain.model.Group -import com.cheocharm.remote.api.GroupApi -import com.cheocharm.remote.mapper.toDomain +import com.cheocharm.data.remote.api.GroupApi +import com.cheocharm.data.remote.mapper.toDomain import java.net.UnknownHostException class GroupSearchPagingSource( diff --git a/remote/src/main/java/com/cheocharm/remote/source/LoginRemoteDataSourceImpl.kt b/data/src/main/java/com/cheocharm/data/remote/source/LoginRemoteDataSourceImpl.kt similarity index 95% rename from remote/src/main/java/com/cheocharm/remote/source/LoginRemoteDataSourceImpl.kt rename to data/src/main/java/com/cheocharm/data/remote/source/LoginRemoteDataSourceImpl.kt index 59671687..76e926d2 100644 --- a/remote/src/main/java/com/cheocharm/remote/source/LoginRemoteDataSourceImpl.kt +++ b/data/src/main/java/com/cheocharm/data/remote/source/LoginRemoteDataSourceImpl.kt @@ -1,14 +1,13 @@ -package com.cheocharm.remote.source +package com.cheocharm.data.remote.source import com.cheocharm.data.error.ErrorData -import com.cheocharm.data.remote.source.LoginRemoteDataSource import com.cheocharm.domain.model.GoogleSignUpRequest import com.cheocharm.domain.model.Token import com.cheocharm.domain.model.MapZSignInRequest import com.cheocharm.domain.model.MapZSignUpRequest -import com.cheocharm.remote.api.LoginApi -import com.cheocharm.remote.mapper.toDomain -import com.cheocharm.remote.mapper.toDto +import com.cheocharm.data.remote.api.LoginApi +import com.cheocharm.data.remote.mapper.toDomain +import com.cheocharm.data.remote.mapper.toDto import okhttp3.MediaType.Companion.toMediaType import okhttp3.MultipartBody import okhttp3.RequestBody.Companion.asRequestBody diff --git a/remote/src/main/java/com/cheocharm/remote/source/MyGroupsRemoteDataSourceImpl.kt b/data/src/main/java/com/cheocharm/data/remote/source/MyGroupsRemoteDataSourceImpl.kt similarity index 84% rename from remote/src/main/java/com/cheocharm/remote/source/MyGroupsRemoteDataSourceImpl.kt rename to data/src/main/java/com/cheocharm/data/remote/source/MyGroupsRemoteDataSourceImpl.kt index ebb8f04f..bc544548 100644 --- a/remote/src/main/java/com/cheocharm/remote/source/MyGroupsRemoteDataSourceImpl.kt +++ b/data/src/main/java/com/cheocharm/data/remote/source/MyGroupsRemoteDataSourceImpl.kt @@ -1,10 +1,9 @@ -package com.cheocharm.remote.source +package com.cheocharm.data.remote.source import com.cheocharm.data.error.ErrorData import com.cheocharm.data.model.GroupData -import com.cheocharm.data.remote.source.MyGroupsRemoteDataSource -import com.cheocharm.remote.api.DiaryApi -import com.cheocharm.remote.mapper.toData +import com.cheocharm.data.remote.api.DiaryApi +import com.cheocharm.data.remote.mapper.toData import java.net.UnknownHostException import javax.inject.Inject diff --git a/remote/src/main/java/com/cheocharm/remote/source/WriteRemoteDataSourceImpl.kt b/data/src/main/java/com/cheocharm/data/remote/source/WriteRemoteDataSourceImpl.kt similarity index 90% rename from remote/src/main/java/com/cheocharm/remote/source/WriteRemoteDataSourceImpl.kt rename to data/src/main/java/com/cheocharm/data/remote/source/WriteRemoteDataSourceImpl.kt index 4d97d81d..a422f0b9 100644 --- a/remote/src/main/java/com/cheocharm/remote/source/WriteRemoteDataSourceImpl.kt +++ b/data/src/main/java/com/cheocharm/data/remote/source/WriteRemoteDataSourceImpl.kt @@ -1,13 +1,12 @@ -package com.cheocharm.remote.source +package com.cheocharm.data.remote.source import com.cheocharm.data.error.ErrorData -import com.cheocharm.data.remote.source.WriteRemoteDataSource import com.cheocharm.domain.model.TempDiary import com.cheocharm.domain.model.WriteDiaryRequest import com.cheocharm.domain.model.WriteImageRequest -import com.cheocharm.remote.api.DiaryApi -import com.cheocharm.remote.mapper.toDomain -import com.cheocharm.remote.mapper.toDto +import com.cheocharm.data.remote.api.DiaryApi +import com.cheocharm.data.remote.mapper.toDomain +import com.cheocharm.data.remote.mapper.toDto import okhttp3.MediaType.Companion.toMediaType import okhttp3.MultipartBody import okhttp3.RequestBody.Companion.asRequestBody diff --git a/local/src/test/java/com/cheocharm/local/ExampleUnitTest.kt b/data/src/test/java/com/cheocharm/data/ExampleUnitTest.kt similarity index 100% rename from local/src/test/java/com/cheocharm/local/ExampleUnitTest.kt rename to data/src/test/java/com/cheocharm/data/ExampleUnitTest.kt diff --git a/local/.gitignore b/local/.gitignore deleted file mode 100644 index 42afabfd..00000000 --- a/local/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/local/build.gradle b/local/build.gradle deleted file mode 100644 index 1024a369..00000000 --- a/local/build.gradle +++ /dev/null @@ -1,49 +0,0 @@ -plugins { - id 'com.android.library' - id 'org.jetbrains.kotlin.android' - id 'kotlin-kapt' -} - -android { - namespace = "com.cheocharm.local" - - compileSdk 34 - - defaultConfig { - minSdk 23 - targetSdk 34 - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles "consumer-rules.pro" - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_17 - targetCompatibility JavaVersion.VERSION_17 - } - kotlinOptions { - jvmTarget = jvmTarget - } -} - -dependencies { - implementation project(":data") - implementation project(":domain") - - testImplementation 'junit:junit:4.13.2' - androidTestImplementation "androidx.test.ext:junit:$junitVersion" - androidTestImplementation "androidx.test.espresso:espresso-core:$espressoCoreVersion" - - // Hilt - implementation "com.google.dagger:hilt-android:$hiltVersion" - kapt "com.google.dagger:hilt-android-compiler:$hiltVersion" - - // kotlin coroutine - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion" -} diff --git a/local/src/main/AndroidManifest.xml b/local/src/main/AndroidManifest.xml deleted file mode 100644 index a5918e68..00000000 --- a/local/src/main/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/local/src/main/java/com/cheocharm/local/di/DataSourceModule.kt b/local/src/main/java/com/cheocharm/local/di/DataSourceModule.kt deleted file mode 100644 index efecdea3..00000000 --- a/local/src/main/java/com/cheocharm/local/di/DataSourceModule.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.cheocharm.local.di - -import com.cheocharm.data.local.source.AuthLocalDataSource -import com.cheocharm.local.source.AuthLocalDataSourceImpl -import dagger.Binds -import dagger.Module -import dagger.hilt.InstallIn -import dagger.hilt.components.SingletonComponent -import javax.inject.Singleton - -@Module -@InstallIn(SingletonComponent::class) -internal abstract class DataSourceModule { - - @Binds - @Singleton - abstract fun bindAuthLocalDataSource(dataSourceImpl: AuthLocalDataSourceImpl): AuthLocalDataSource -} diff --git a/remote/.gitignore b/remote/.gitignore deleted file mode 100644 index 42afabfd..00000000 --- a/remote/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/remote/build.gradle b/remote/build.gradle deleted file mode 100644 index d6bbdd5e..00000000 --- a/remote/build.gradle +++ /dev/null @@ -1,65 +0,0 @@ -plugins { - id 'com.android.library' - id 'org.jetbrains.kotlin.android' - id 'kotlin-kapt' -} - -Properties properties = new Properties() -properties.load(project.rootProject.file('local.properties').newDataInputStream()) - -android { - namespace = "com.cheocharm.remote" - - compileSdk 34 - - defaultConfig { - minSdk 23 - targetSdk 34 - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles "consumer-rules.pro" - - buildConfigField "String", "BASE_URL", properties['base.url'] - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_17 - targetCompatibility JavaVersion.VERSION_17 - } - kotlinOptions { - jvmTarget = jvmTarget - } -} - -dependencies { - implementation project(":data") - implementation project(":domain") - - def retrofitVersion = "2.9.0" - - // Test - testImplementation 'junit:junit:4.13.2' - androidTestImplementation "androidx.test.ext:junit:$junitVersion" - androidTestImplementation "androidx.test.espresso:espresso-core:$espressoCoreVersion" - - // Hilt - implementation "com.google.dagger:hilt-core:$hiltVersion" - kapt "com.google.dagger:hilt-android-compiler:$hiltVersion" - - // Retrofit - implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" - implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion" - implementation "com.squareup.okhttp3:logging-interceptor:4.9.3" - - // kotlin coroutine - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion" - - // paging - implementation "androidx.paging:paging-runtime:$pagingVersion" -} diff --git a/remote/consumer-rules.pro b/remote/consumer-rules.pro deleted file mode 100644 index e69de29b..00000000 diff --git a/remote/proguard-rules.pro b/remote/proguard-rules.pro deleted file mode 100644 index 481bb434..00000000 --- a/remote/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/remote/src/androidTest/java/com/cheocharm/remote/ExampleInstrumentedTest.kt b/remote/src/androidTest/java/com/cheocharm/remote/ExampleInstrumentedTest.kt deleted file mode 100644 index 5c40d8e0..00000000 --- a/remote/src/androidTest/java/com/cheocharm/remote/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.cheocharm.remote - -import androidx.test.platform.app.InstrumentationRegistry -import androidx.test.ext.junit.runners.AndroidJUnit4 - -import org.junit.Test -import org.junit.runner.RunWith - -import org.junit.Assert.* - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.cheocharm.remote2.test", appContext.packageName) - } -} diff --git a/remote/src/main/AndroidManifest.xml b/remote/src/main/AndroidManifest.xml deleted file mode 100644 index 8072ee00..00000000 --- a/remote/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/remote/src/main/java/com/cheocharm/remote/model/response/group/GroupSearchResponse.kt b/remote/src/main/java/com/cheocharm/remote/model/response/group/GroupSearchResponse.kt deleted file mode 100644 index cb28a605..00000000 --- a/remote/src/main/java/com/cheocharm/remote/model/response/group/GroupSearchResponse.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.cheocharm.remote.model.response.group - -data class GroupSearchResponse( - val hasNextPage: Boolean, - val groupList: List -) diff --git a/remote/src/main/java/com/cheocharm/remote/model/response/write/WriteDiaryResponse.kt b/remote/src/main/java/com/cheocharm/remote/model/response/write/WriteDiaryResponse.kt deleted file mode 100644 index b7b4f962..00000000 --- a/remote/src/main/java/com/cheocharm/remote/model/response/write/WriteDiaryResponse.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.cheocharm.remote.model.response.write - -data class WriteDiaryResponse(val diaryId: Long) diff --git a/remote/src/test/java/com/cheocharm/remote/ExampleUnitTest.kt b/remote/src/test/java/com/cheocharm/remote/ExampleUnitTest.kt deleted file mode 100644 index c507d69c..00000000 --- a/remote/src/test/java/com/cheocharm/remote/ExampleUnitTest.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.cheocharm.remote - -import org.junit.Test - -import org.junit.Assert.* - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} diff --git a/settings.gradle b/settings.gradle index 47c40e9c..ff983a66 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,5 +17,3 @@ include ':app' include ':domain' include ':data' include ':presentation' -include ':local' -include ':remote'