-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔀 #77 from boostcampwm-2022/feat/runningdatamanager_module
러닝 상태를 관리하는 RunningDataManager를 모듈로 분리
- Loading branch information
Showing
27 changed files
with
241 additions
and
92 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
2 changes: 2 additions & 0 deletions
2
presentation/src/main/java/com/whyranoid/presentation/running/Event.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
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
15 changes: 0 additions & 15 deletions
15
presentation/src/main/java/com/whyranoid/presentation/running/RunningPosition.kt
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
presentation/src/main/java/com/whyranoid/presentation/running/RunningUtil.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,35 @@ | ||
package com.whyranoid.presentation.running | ||
|
||
import com.naver.maps.geometry.LatLng | ||
import com.whyranoid.domain.model.RunningHistory | ||
import com.whyranoid.presentation.model.RunningHistoryUiModel | ||
import com.whyranoid.runningdata.model.RunningHistoryModel | ||
import com.whyranoid.runningdata.model.RunningPosition | ||
|
||
fun RunningPosition.toLatLng(): LatLng { | ||
return LatLng( | ||
this.latitude, | ||
this.longitude | ||
) | ||
} | ||
|
||
fun RunningHistoryModel.toRunningHistoryUiModel() = | ||
RunningHistoryUiModel( | ||
historyId = historyId, | ||
date = startedAt, | ||
startedAt = startedAt, | ||
finishedAt = finishedAt, | ||
totalRunningTime = totalRunningTime, | ||
pace = pace, | ||
totalDistance = totalDistance | ||
) | ||
|
||
fun RunningHistoryModel.toRunningHistory() = | ||
RunningHistory( | ||
historyId = historyId, | ||
startedAt = startedAt, | ||
finishedAt = finishedAt, | ||
totalRunningTime = totalRunningTime, | ||
pace = pace, | ||
totalDistance = totalDistance | ||
) |
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
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
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
4 changes: 2 additions & 2 deletions
4
...ranoid/presentation/util/pxdp/PxDpUtil.kt → ...ntation/util/converters/UnitConverters.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
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
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 @@ | ||
/build |
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,41 @@ | ||
plugins { | ||
id "com.android.library" | ||
id "org.jetbrains.kotlin.android" | ||
} | ||
|
||
android { | ||
namespace "com.whyranoid.runningdata" | ||
compileSdk 33 | ||
|
||
defaultConfig { | ||
minSdk 23 | ||
targetSdk 33 | ||
|
||
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_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
} | ||
|
||
dependencies { | ||
|
||
implementation "androidx.core:core-ktx:$coreKtxVersion" | ||
implementation "androidx.appcompat:appcompat:$appcompatVersion" | ||
implementation "com.google.android.material:material:$materialVersion" | ||
testImplementation "junit:junit:$junitVersion" | ||
androidTestImplementation "androidx.test.ext:junit:$junitUiVersion" | ||
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoCoreVersion" | ||
} |
Empty file.
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,21 @@ | ||
# 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 |
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,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
</manifest> |
Oops, something went wrong.