Skip to content

Commit

Permalink
Merge pull request #536 from woowacourse-teams/release/v3.0
Browse files Browse the repository at this point in the history
[ALL] 버전 3 출시(versionName1.1.4)
  • Loading branch information
dooboocookie authored Nov 5, 2023
2 parents 6b2f1eb + f25ad92 commit 343306a
Show file tree
Hide file tree
Showing 139 changed files with 2,881 additions and 1,186 deletions.
Binary file added .DS_Store
Binary file not shown.
9 changes: 0 additions & 9 deletions .idea/2023-naaga.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
![제목](etc/images/header.png)

## 💌 나아가로부터의 초대장이 도착했습니다

반복되는 인스타 피드를 보고, 게임을 하며 보내는 일상이 지루하지 않으시나요?
공부와 일에 치여 실내에서 보내는 시간이 많을 텐데요. 작은 화면 속을 벗어나 현실 세계의 경험을 해보고 싶지 않으신가요?

그런 당신을 ‘나아가’로 초대합니다.

## 🚶🏻 추리와 발걸음의 만남
나아가는 현실 세계를 누비며 진행되는 추리 게임입니다. 게임을 시작하면, 당신 주변 어딘가의 사진이 제공됩니다. 사진이 알쏭달쏭하여 그곳이 어딘지 알아맞히기 어렵겠지만, 우선 발걸음을 옮겨보세요.


<a href="https://play.google.com/store/apps/details?id=com.now.naaga&pcampaignid=web_share"><img src="etc/images/google play store.png"/></a>

![상세 페이지](etc/images/service%20intro.png)
11 changes: 9 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ android {
applicationId "com.now.naaga"
minSdk 28
targetSdk 33
versionCode 9
versionName "1.1.3"
versionCode 10
versionName "1.1.4"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "com.now.naaga.HiltTestRunner"
Expand All @@ -31,8 +31,15 @@ android {
}

buildTypes {
debug {
minifyEnabled true
firebaseCrashlytics {
mappingFileUploadEnabled false
}
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

ndk.debugSymbolLevel 'FULL'
Expand Down
11 changes: 6 additions & 5 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-feature
android:name="android.hardware.camera"
android:required="false" />

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />

<application
android:name=".NaagaApplication"
Expand Down Expand Up @@ -73,6 +70,10 @@
android:name=".presentation.setting.SettingActivity"
android:screenOrientation="portrait"
android:exported="false" />
<activity
android:name=".presentation.adventuredetail.AdventureDetailActivity"
android:screenOrientation="portrait"
android:exported="false" />
<activity
android:name="com.kakao.sdk.auth.AuthCodeHandlerActivity"
android:exported="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ const val BEGIN_GO_SETTING = "GO_SETTING"
const val BEGIN_GO_UPLOAD = "GO_UPLOAD"
const val BEGIN_GO_MYPAGE = "GO_MYPAGE"

// LocationPermissionDialog
const val LOCATION_PERMISSION_OPEN_SETTING = "OPEN_SETTING"

// AdventureResultActivity
const val RESULT_RESULT_RETURN = "RESULT_RETURN"

Expand All @@ -23,7 +20,6 @@ const val ON_ADVENTURE_END_ADVENTURE = "END_ADVENTURE"

// UploadActivity
const val UPLOAD_OPEN_CAMERA = "OPEN_CAMERA"
const val UPLOAD_SET_COORDINATE = "SET_COORDINATE"

// CameraPermissionDialog
const val CAMERA_PERMISSION_OPEN_SETTING = "OPEN_SETTING"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.now.naaga.data.mapper

import com.now.domain.model.AdventureResult
import com.now.domain.model.AdventureResultType
import com.now.domain.model.type.AdventureResultType
import com.now.naaga.data.remote.dto.AdventureResultDto
import java.time.LocalDateTime

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.now.naaga.data.mapper

import com.now.domain.model.AuthPlatformType
import com.now.domain.model.PlatformAuth
import com.now.domain.model.type.AuthPlatformType
import com.now.naaga.data.remote.dto.PlatformAuthDto

fun PlatformAuthDto.toDomain(): PlatformAuth {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.now.naaga.data.mapper

import com.now.domain.model.letter.Letter
import com.now.naaga.data.remote.dto.LetterDto

fun LetterDto.toDomain(): Letter {
return Letter(
id = id,
player = player.toDomain(),
coordinate = coordinateDto.toDomain(),
message = message,
registerDate = registerDate,
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.now.naaga.data.mapper

import com.now.domain.model.letter.LetterPreview
import com.now.naaga.data.remote.dto.LetterPreviewDto

fun LetterPreviewDto.toDomain(): LetterPreview {
return LetterPreview(
id = id,
coordinate = coordinateDto.toDomain(),
)
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.now.naaga.data.mapper

import com.now.domain.model.Place
import com.now.domain.model.PreferenceState
import com.now.naaga.data.remote.dto.PlaceDto
import com.now.naaga.data.remote.dto.PostPlaceDto
import com.now.naaga.data.remote.dto.PreferenceStateDto
import com.now.naaga.data.remote.dto.post.PostPlaceDto

fun Place.toDto(): PlaceDto {
return PlaceDto(
Expand Down Expand Up @@ -33,3 +35,7 @@ fun PostPlaceDto.toDomain(): Place {
description = description,
)
}

fun PreferenceStateDto.toPreferenceState(): PreferenceState {
return PreferenceState.valueOf(this.type)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,11 @@ fun PlayerDto.toDomain(): Player {
score = totalScore,
)
}

fun Player.toDto(): PlayerDto {
return PlayerDto(
id = id,
nickname = nickname,
totalScore = score,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.now.naaga.data.remote.dto
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

// AdventureDto로 네이밍 수정해야됨. 일단 현재 AdventureDto를 지울 수 없어 이렇게 두었음
@Serializable
data class AdventureDto(
@SerialName("id")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.now.naaga.data.remote.dto

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class LetterDto(
@SerialName("id")
val id: Long,
@SerialName("player")
val player: PlayerDto,
@SerialName("coordinate")
val coordinateDto: CoordinateDto,
@SerialName("message")
val message: String,
@SerialName("registerDate")
val registerDate: String,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.now.naaga.data.remote.dto

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class LetterPreviewDto(
@SerialName("id")
val id: Long,
@SerialName("coordinate")
val coordinateDto: CoordinateDto,
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class RefreshTokenDto(
@SerialName("refreshToken")
val refreshToken: String,
data class LikeCountDto(
@SerialName("placeLikeCount")
val placeLikeCount: Int,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.now.naaga.data.remote.dto

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class PreferenceDto(
@SerialName("id")
val id: Int,
@SerialName("playerId")
val playerId: Int,
@SerialName("placeId")
val placeId: Int,
@SerialName("type")
val type: String,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.now.naaga.data.remote.dto

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class PreferenceStateDto(
@SerialName("type")
val type: String,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.now.naaga.data.remote.dto.post

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class PostLetterDto(
@SerialName("message")
val message: String,
@SerialName("latitude")
val latitude: Double,
@SerialName("longitude")
val longitude: Double,
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.now.naaga.data.remote.dto
package com.now.naaga.data.remote.dto.post

import com.now.naaga.data.remote.dto.CoordinateDto
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package com.now.naaga.data.remote.retrofit.service

import com.now.naaga.data.remote.dto.LetterDto
import com.now.naaga.data.remote.dto.LetterPreviewDto
import com.now.naaga.data.remote.dto.post.PostLetterDto
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query

interface LetterService {
@POST("/letters")
suspend fun registerLetter(
@Body postLetterDto: PostLetterDto,
): Response<LetterDto>

@GET("/letters/nearby")
suspend fun getNearbyLetters(
@Query("latitude") latitude: Double,
@Query("longitude") longitude: Double,
): Response<List<LetterPreviewDto>>

@GET("/letters/{letterId}")
suspend fun getLetter(
@Path("letterId") letterId: Long,
): Response<LetterDto>

@GET("/letterlogs")
suspend fun getInGameLetters(
@Query("gameId") gameId: Long,
@Query("logType") logType: String,
): Response<List<LetterDto>>
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
package com.now.naaga.data.remote.retrofit.service

import com.now.naaga.data.remote.dto.LikeCountDto
import com.now.naaga.data.remote.dto.PlaceDto
import com.now.naaga.data.remote.dto.PostPlaceDto
import com.now.naaga.data.remote.dto.PreferenceDto
import com.now.naaga.data.remote.dto.PreferenceStateDto
import com.now.naaga.data.remote.dto.post.PostPlaceDto
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.Multipart
import retrofit2.http.POST
Expand All @@ -31,4 +36,25 @@ interface PlaceService {
@PartMap postData: HashMap<String, RequestBody>,
@Part imageFile: MultipartBody.Part,
): Response<PostPlaceDto>

@GET("/places/{placeId}/likes/count")
suspend fun getLikeCount(
@Path("placeId") placedId: Int,
): Response<LikeCountDto>

@DELETE("/places/{placeId}/likes/my")
suspend fun deletePreference(
@Path("placeId") placedId: Int,
): Response<Unit>

@POST("/places/{placeId}/likes")
suspend fun postPreference(
@Path("placeId") placedId: Int,
@Body body: PreferenceStateDto,
): Response<PreferenceDto>

@GET("/places/{placeId}/likes/my")
suspend fun getMyPreference(
@Path("placeId") placedId: Int,
): Response<PreferenceStateDto>
}
Loading

0 comments on commit 343306a

Please sign in to comment.