-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from Hyesung82/feature/data
[develop] 모듈 병합
- Loading branch information
Showing
65 changed files
with
194 additions
and
360 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,64 @@ | ||
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 | ||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion" | ||
|
||
// 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" | ||
} |
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...heocharm/local/ExampleInstrumentedTest.kt → ...cheocharm/data/ExampleInstrumentedTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
data/src/main/java/com/cheocharm/data/di/DataSourceModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.cheocharm.data.di | ||
|
||
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.data.remote.source.WriteRemoteDataSourceImpl | ||
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 | ||
|
||
@Binds | ||
@Singleton | ||
abstract fun bindLoginRemoteDataSource(dataSource: LoginRemoteDataSourceImpl): LoginRemoteDataSource | ||
|
||
@Binds | ||
@Singleton | ||
abstract fun bindAuthRemoteDataSource(dataSource: AuthRemoteDataSourceImpl): AuthRemoteDataSource | ||
|
||
@Binds | ||
@Singleton | ||
abstract fun bindGroupRemoteDataSource(dataSource: GroupRemoteDataSourceImpl): GroupRemoteDataSource | ||
|
||
@Binds | ||
@Singleton | ||
abstract fun bindMyGroupsRemoteDataSource(dataSource: MyGroupsRemoteDataSourceImpl): MyGroupsRemoteDataSource | ||
|
||
@Binds | ||
@Singleton | ||
abstract fun bindWriteRemoteDataSource(dataSource: WriteRemoteDataSourceImpl): WriteRemoteDataSource | ||
} |
4 changes: 2 additions & 2 deletions
4
...a/com/cheocharm/remote/di/MapZRetrofit.kt → ...ava/com/cheocharm/data/di/MapZRetrofit.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...a/com/cheocharm/remote/di/RemoteModule.kt → ...ava/com/cheocharm/data/di/RemoteModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ocharm/local/di/SharedPreferenceModule.kt → ...eocharm/data/di/SharedPreferenceModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../com/cheocharm/local/SharedPrefManager.kt → ...cheocharm/data/local/SharedPrefManager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.cheocharm.local | ||
package com.cheocharm.data.local | ||
|
||
interface SharedPrefManager { | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
.../cheocharm/local/SharedPrefManagerImpl.kt → ...charm/data/local/SharedPrefManagerImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ocharm/data/source/AuthLocalDataSource.kt → .../data/local/source/AuthLocalDataSource.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.cheocharm.data.source | ||
package com.cheocharm.data.local.source | ||
|
||
interface AuthLocalDataSource { | ||
|
||
|
5 changes: 2 additions & 3 deletions
5
...m/local/source/AuthLocalDataSourceImpl.kt → ...a/local/source/AuthLocalDataSourceImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
...java/com/cheocharm/remote/api/DiaryApi.kt → ...com/cheocharm/data/remote/api/DiaryApi.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...java/com/cheocharm/remote/api/GroupApi.kt → ...com/cheocharm/data/remote/api/GroupApi.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...java/com/cheocharm/remote/api/LoginApi.kt → ...com/cheocharm/data/remote/api/LoginApi.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...java/com/cheocharm/remote/api/TokenApi.kt → ...com/cheocharm/data/remote/api/TokenApi.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...om/cheocharm/remote/mapper/GroupMapper.kt → ...eocharm/data/remote/mapper/GroupMapper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...com/cheocharm/remote/mapper/SignMapper.kt → ...heocharm/data/remote/mapper/SignMapper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...om/cheocharm/remote/mapper/WriteMapper.kt → ...eocharm/data/remote/mapper/WriteMapper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...om/cheocharm/remote/model/BaseResponse.kt → ...eocharm/data/remote/model/BaseResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...m/cheocharm/remote/model/TokenResponse.kt → ...ocharm/data/remote/model/TokenResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...m/remote/model/request/GoogleSignUpDto.kt → ...a/remote/model/request/GoogleSignUpDto.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...arm/remote/model/request/MapZSignInDto.kt → ...ata/remote/model/request/MapZSignInDto.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...arm/remote/model/request/MapZSignUpDto.kt → ...ata/remote/model/request/MapZSignUpDto.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...arm/remote/model/request/WriteDiaryDto.kt → ...ata/remote/model/request/WriteDiaryDto.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...arm/remote/model/request/WriteImageDto.kt → ...ata/remote/model/request/WriteImageDto.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ote/model/response/group/GroupResponse.kt → ...ote/model/response/group/GroupResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
data/src/main/java/com/cheocharm/data/remote/model/response/group/GroupSearchResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<GroupResponse> | ||
) |
2 changes: 1 addition & 1 deletion
2
...rm/remote/model/response/write/MyGroup.kt → ...ta/remote/model/response/write/MyGroup.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
data/src/main/java/com/cheocharm/data/remote/model/response/write/WriteDiaryResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package com.cheocharm.data.remote.model.response.write | ||
|
||
data class WriteDiaryResponse(val diaryId: Long) |
2 changes: 1 addition & 1 deletion
2
...odel/response/write/WriteImageResponse.kt → ...odel/response/write/WriteImageResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<String>) |
2 changes: 1 addition & 1 deletion
2
...eocharm/remote/network/AuthInterceptor.kt → ...rm/data/remote/network/AuthInterceptor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...charm/data/source/AuthRemoteDataSource.kt → ...ata/remote/source/AuthRemoteDataSource.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.