Skip to content

Commit 4c2bd3a

Browse files
committed
feat : conflict 해결
1 parent a7d05fc commit 4c2bd3a

File tree

13 files changed

+28
-22
lines changed

13 files changed

+28
-22
lines changed

data/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ dependencies {
7373
implementation 'com.tickaroo.tikxml:core:0.8.13'
7474
implementation 'com.tickaroo.tikxml:retrofit-converter:0.8.13'
7575
kapt 'com.tickaroo.tikxml:processor:0.8.13'
76+
77+
// Room
78+
implementation "androidx.room:room-runtime:2.4.3"
79+
annotationProcessor "androidx.room:room-compiler:2.4.3"
80+
kapt "androidx.room:room-compiler:2.4.3"
81+
implementation "androidx.room:room-ktx:2.4.3"
7682
}
7783

7884
kapt {

data/src/main/java/com/stop/data/local/database/dao/AlarmDao.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import kotlinx.coroutines.flow.Flow
1111
interface AlarmDao {
1212

1313
@Insert(onConflict = OnConflictStrategy.REPLACE)
14-
suspend fun insertAlarm(alarmEntity: AlarmEntity)
14+
fun insertAlarm(alarmEntity: AlarmEntity)
1515

1616
@Query("DELETE FROM AlarmEntity")
17-
suspend fun deleteAlarm()
17+
fun deleteAlarm()
1818

1919
@Query("SELECT * FROM AlarmEntity")
20-
suspend fun selectAlarm(): Flow<AlarmEntity>
20+
fun selectAlarm(): Flow<AlarmEntity>
2121

2222
}

data/src/main/java/com/stop/data/local/source/alarm/AlarmLocalDataSource.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import kotlinx.coroutines.flow.Flow
55

66
interface AlarmLocalDataSource {
77

8-
suspend fun insertAlarm(alarmRepositoryItem: AlarmRepositoryItem)
8+
fun insertAlarm(alarmRepositoryItem: AlarmRepositoryItem)
99

10-
suspend fun deleteAlarm()
10+
fun deleteAlarm()
1111

12-
suspend fun selectAlarm(): Flow<AlarmRepositoryItem>
12+
fun selectAlarm(): Flow<AlarmRepositoryItem>
1313

1414
}

data/src/main/java/com/stop/data/local/source/alarm/AlarmLocalDataSourceImpl.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ internal class AlarmLocalDataSourceImpl @Inject constructor(
1010
private val alarmDao: AlarmDao
1111
) : AlarmLocalDataSource {
1212

13-
override suspend fun insertAlarm(alarmRepositoryItem: AlarmRepositoryItem) {
13+
override fun insertAlarm(alarmRepositoryItem: AlarmRepositoryItem) {
1414
alarmDao.insertAlarm(alarmRepositoryItem.toEntity())
1515
}
1616

17-
override suspend fun deleteAlarm() {
17+
override fun deleteAlarm() {
1818
alarmDao.deleteAlarm()
1919
}
2020

21-
override suspend fun selectAlarm(): Flow<AlarmRepositoryItem> {
21+
override fun selectAlarm(): Flow<AlarmRepositoryItem> {
2222
return alarmDao.selectAlarm().map { it.toRepositoryModel() }
2323
}
2424

data/src/main/java/com/stop/data/repository/AlarmRepositoryImpl.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ internal class AlarmRepositoryImpl @Inject constructor(
1212
private val alarmLocalDataSource: AlarmLocalDataSource
1313
) : AlarmRepository {
1414

15-
override suspend fun insertAlarm(alarmUseCaseItem: AlarmUseCaseItem) {
15+
override fun insertAlarm(alarmUseCaseItem: AlarmUseCaseItem) {
1616
alarmLocalDataSource.insertAlarm(
1717
AlarmRepositoryItem(
1818
alarmUseCaseItem.routeInfo,
@@ -26,11 +26,11 @@ internal class AlarmRepositoryImpl @Inject constructor(
2626
)
2727
}
2828

29-
override suspend fun deleteAlarm() {
29+
override fun deleteAlarm() {
3030
alarmLocalDataSource.deleteAlarm()
3131
}
3232

33-
override suspend fun selectAlarm(): Flow<AlarmUseCaseItem> {
33+
override fun selectAlarm(): Flow<AlarmUseCaseItem> {
3434
return alarmLocalDataSource.selectAlarm().map { it.toUseCaseModel() }
3535
}
3636

domain/src/main/java/com/stop/domain/repository/AlarmRepository.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import kotlinx.coroutines.flow.Flow
55

66
interface AlarmRepository {
77

8-
suspend fun insertAlarm(alarmUseCaseItem: AlarmUseCaseItem)
8+
fun insertAlarm(alarmUseCaseItem: AlarmUseCaseItem)
99

10-
suspend fun deleteAlarm()
10+
fun deleteAlarm()
1111

12-
suspend fun selectAlarm(): Flow<AlarmUseCaseItem>
12+
fun selectAlarm(): Flow<AlarmUseCaseItem>
1313

1414
}

domain/src/main/java/com/stop/domain/usecase/alarm/DeleteAlarmUseCase.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ package com.stop.domain.usecase.alarm
22

33
interface DeleteAlarmUseCase {
44

5-
suspend fun deleteAlarm()
5+
fun deleteAlarm()
66

77
}

domain/src/main/java/com/stop/domain/usecase/alarm/DeleteAlarmUseCaseImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class DeleteAlarmUseCaseImpl @Inject constructor(
77
private val alarmRepository: AlarmRepository
88
) : DeleteAlarmUseCase{
99

10-
override suspend fun deleteAlarm() {
10+
override fun deleteAlarm() {
1111
alarmRepository.deleteAlarm()
1212
}
1313

domain/src/main/java/com/stop/domain/usecase/alarm/GetAlarmUseCase.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ import kotlinx.coroutines.flow.Flow
55

66
interface GetAlarmUseCase {
77

8-
suspend fun getAlarm() : Flow<AlarmUseCaseItem>
8+
fun getAlarm() : Flow<AlarmUseCaseItem>
99

1010
}

domain/src/main/java/com/stop/domain/usecase/alarm/GetAlarmUseCaseImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class GetAlarmUseCaseImpl @Inject constructor(
99
private val alarmRepository: AlarmRepository
1010
) : GetAlarmUseCase{
1111

12-
override suspend fun getAlarm(): Flow<AlarmUseCaseItem> {
12+
override fun getAlarm(): Flow<AlarmUseCaseItem> {
1313
return alarmRepository.selectAlarm()
1414
}
1515

0 commit comments

Comments
 (0)