Skip to content

Commit

Permalink
Merge pull request #263 from boostcampwm2023/dev/and
Browse files Browse the repository at this point in the history
v1.2.0 ๋ฐฐํฌ ์ค€๋น„
  • Loading branch information
ootr47 authored Apr 1, 2024
2 parents 38783a1 + 34bba30 commit 513ebf3
Show file tree
Hide file tree
Showing 100 changed files with 3,270 additions and 380 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/firebase-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
deploy:
runs-on: ubuntu-latest
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -41,4 +41,4 @@ jobs:
serviceCredentialsFileContent: ${{ secrets.FIREBASE_APP_DISTRIBUTION }}
groups: tester
releaseNotesFile: android/release_notes.txt
file: android/app/build/outputs/apk/release/app-release.apk
file: android/app/build/outputs/bundle/release/app-release.aab
2 changes: 2 additions & 0 deletions android/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions android/.idea/appInsightsSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 14 additions & 12 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ android {
applicationId = "app.priceguard"
minSdk = 29
targetSdk = 34
versionCode = 8
versionName = "1.0.1"
versionCode = 10
versionName = "1.2.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -58,7 +58,7 @@ android {

dependencies {
// Firebase
implementation(platform("com.google.firebase:firebase-bom:32.6.0"))
implementation(platform("com.google.firebase:firebase-bom:32.8.0"))
implementation("com.google.firebase:firebase-analytics")
implementation("com.google.firebase:firebase-crashlytics")
implementation("com.google.firebase:firebase-perf")
Expand All @@ -67,11 +67,9 @@ dependencies {
// Android
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.10.0")
implementation("androidx.activity:activity-ktx:1.8.1")
implementation("com.google.android.material:material:1.11.0")
implementation("androidx.activity:activity-ktx:1.8.2")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.navigation:navigation-fragment-ktx:2.7.5")
implementation("androidx.navigation:navigation-ui-ktx:2.7.5")

// Retrofit, Serialization
implementation("com.squareup.retrofit2:retrofit:2.9.0")
Expand All @@ -82,7 +80,7 @@ dependencies {
implementation("androidx.datastore:datastore-preferences:1.0.0")

// Hilt
val hiltVersion = "2.48.1"
val hiltVersion = "2.49"
implementation("com.google.dagger:hilt-android:$hiltVersion")
kapt("com.google.dagger:hilt-android-compiler:$hiltVersion")

Expand All @@ -92,7 +90,7 @@ dependencies {
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")

// Navigation
val navVersion = "2.7.5"
val navVersion = "2.7.7"
implementation("androidx.navigation:navigation-fragment-ktx:$navVersion")
implementation("androidx.navigation:navigation-ui-ktx:$navVersion")

Expand All @@ -107,11 +105,15 @@ dependencies {

// Worker
implementation("androidx.work:work-runtime-ktx:2.9.0")
implementation("androidx.hilt:hilt-work:1.1.0")
kapt("androidx.hilt:hilt-compiler:1.1.0")
implementation("androidx.hilt:hilt-work:1.2.0")
kapt("androidx.hilt:hilt-compiler:1.2.0")

// Material chart
implementation("app.priceguard:materialchart:0.2.1")
implementation("app.priceguard:materialchart:0.2.2")

// In app update
implementation("com.google.android.play:app-update:2.1.0")
implementation("com.google.android.play:app-update-ktx:2.1.0")
}

kapt {
Expand Down
14 changes: 9 additions & 5 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_priceguard_notification" />

<activity
android:name=".ui.additem.link.LinkHelperWebViewActivity"
android:exported="false" />
<activity
android:name=".ui.splash.SplashScreenActivity"
android:exported="true">
Expand Down Expand Up @@ -78,6 +74,15 @@
<activity
android:name="com.google.android.gms.oss.licenses.OssLicensesActivity"
android:theme="@style/Theme.PriceGuard.WithActionBar" />
<activity
android:name=".ui.additem.link.LinkHelperWebViewActivity"
android:exported="false" />
<activity
android:name=".ui.home.mypage.DeleteAccountActivity"
android:exported="false" />
<activity
android:name=".ui.login.findpassword.FindPasswordActivity"
android:exported="false" />

<service
android:name=".service.PriceGuardFirebaseMessagingService"
Expand All @@ -91,7 +96,6 @@
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
tools:node="remove" />

</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ package app.priceguard.data.datastore

interface TokenDataSource {
suspend fun saveTokens(accessToken: String, refreshToken: String)
suspend fun saveEmailVerified(isVerified: Boolean)
suspend fun getAccessToken(): String?
suspend fun getRefreshToken(): String?
suspend fun getIsEmailVerified(): Boolean?
suspend fun clearTokens()
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package app.priceguard.data.datastore

import androidx.datastore.core.DataStore
import androidx.datastore.preferences.core.Preferences
import androidx.datastore.preferences.core.booleanPreferencesKey
import androidx.datastore.preferences.core.edit
import androidx.datastore.preferences.core.stringPreferencesKey
import app.priceguard.di.TokensQualifier
Expand All @@ -15,6 +16,7 @@ class TokenDataSourceImpl @Inject constructor(

private val accessTokenKey = stringPreferencesKey("access_token")
private val refreshTokenKey = stringPreferencesKey("refresh_token")
private val isEmailVerifiedKey = booleanPreferencesKey("is_email_verified")

override suspend fun saveTokens(accessToken: String, refreshToken: String) {
dataStore.edit { preferences ->
Expand All @@ -23,6 +25,12 @@ class TokenDataSourceImpl @Inject constructor(
}
}

override suspend fun saveEmailVerified(isVerified: Boolean) {
dataStore.edit { preferences ->
preferences[isEmailVerifiedKey] = isVerified
}
}

override suspend fun getAccessToken(): String? {
return dataStore.data.map { preferences ->
preferences[accessTokenKey]
Expand All @@ -35,6 +43,12 @@ class TokenDataSourceImpl @Inject constructor(
}.first()
}

override suspend fun getIsEmailVerified(): Boolean? {
return dataStore.data.map { preferences ->
preferences[isEmailVerifiedKey]
}.first()
}

override suspend fun clearTokens() {
dataStore.edit { preferences ->
preferences.clear()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import kotlinx.serialization.Serializable

@Serializable
data class ProductAddRequest(
val shop: String,
val productCode: String,
val targetPrice: Int
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package app.priceguard.data.dto.deleteaccount

import kotlinx.serialization.Serializable

@Serializable
data class DeleteAccountRequest(
val email: String,
val password: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package app.priceguard.data.dto.deleteaccount

import kotlinx.serialization.Serializable

@Serializable
data class DeleteAccountResponse(
val statusCode: Int,
val message: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package app.priceguard.data.dto.isverified

import kotlinx.serialization.Serializable

@Serializable
data class IsEmailVerifiedResponse(
val statusCode: Int,
val message: String,
val verified: Boolean? = null
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package app.priceguard.data.dto.password

import kotlinx.serialization.Serializable

@Serializable
data class ResetPasswordRequest(
val password: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package app.priceguard.data.dto.password

import kotlinx.serialization.Serializable

@Serializable
data class ResetPasswordResponse(
val statusCode: Int,
val message: String
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import kotlinx.serialization.Serializable

@Serializable
data class PricePatchRequest(
val shop: String,
val productCode: String,
val targetPrice: Int
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ import kotlinx.serialization.Serializable
data class SignupRequest(
val email: String,
val userName: String,
val verificationCode: String,
val password: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package app.priceguard.data.dto.verifyemail

import kotlinx.serialization.Serializable

@Serializable
data class RequestVerificationCodeRequest(
val email: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package app.priceguard.data.dto.verifyemail

import kotlinx.serialization.Serializable

@Serializable
data class RequestVerificationCodeResponse(
val statusCode: Int,
val message: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package app.priceguard.data.dto.verifyemail

import kotlinx.serialization.Serializable

@Serializable
data class VerifyEmailRequest(
val email: String,
val verificationCode: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package app.priceguard.data.dto.verifyemail

import kotlinx.serialization.Serializable

@Serializable
data class VerifyEmailResponse(
val statusCode: Int,
val message: String,
val verifyToken: String? = null
)
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
package app.priceguard.data.network

import app.priceguard.data.dto.renew.RenewResponse
import app.priceguard.data.dto.verifyemail.VerifyEmailRequest
import app.priceguard.data.dto.verifyemail.VerifyEmailResponse
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.POST

interface AuthAPI {

@GET("refreshJWT")
suspend fun renewTokens(
@Header("Authorization") authToken: String
): Response<RenewResponse>

@POST("verify/email")
suspend fun verifyEmail(
@Body verifyEmailRequest: VerifyEmailRequest
): Response<VerifyEmailResponse>
}
Loading

0 comments on commit 513ebf3

Please sign in to comment.