Skip to content

Commit

Permalink
Merge pull request #13 from bibbi-team/release/1.2.0
Browse files Browse the repository at this point in the history
[RELEASE/1.2.0->MAIN] 앱 버전 v1.2.0 릴리즈
  • Loading branch information
CChuYong authored Jun 1, 2024
2 parents bf185f4 + 4d0db41 commit 6ad4ff2
Show file tree
Hide file tree
Showing 93 changed files with 4,546 additions and 1,242 deletions.
1 change: 1 addition & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
jobs:
deploy-dev:
runs-on: macos-latest
if: ${{ !contains(github.event.head_commit.message, '[skip-ci]') }}
environment: development
steps:
- name: 브랜치 가져오기
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
jobs:
deploy-stage:
runs-on: macos-latest
if: ${{ !contains(github.event.head_commit.message, '[skip-ci]') }}
environment: internal-test
steps:
- name: 브랜치 가져오기
Expand Down
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ GEM
xcpretty (~> 0.2, >= 0.0.7)

PLATFORMS
arm64-darwin-22
arm64-darwin-23
x86_64-darwin-19

Expand Down
56 changes: 19 additions & 37 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ plugins {
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin")
id("io.sentry.android.gradle") version "4.3.0"
id("io.sentry.kotlin.compiler.gradle") version "4.3.0"
}

java {
Expand All @@ -30,20 +28,6 @@ val secretProperties = Properties().apply {
load(secretFile.inputStream())
}

sentry {
debug = false
org = "bibbi"
projectName = "android"
authToken = secretProperties["sentryAuthToken"]?.toString()
url = secretProperties["sentryUrl"]?.toString()

includeProguardMapping = true
autoUploadProguardMapping = true
autoInstallation {
enabled = false
}
}


android {
namespace = "com.no5ing.bbibbi"
Expand All @@ -63,7 +47,7 @@ android {
minSdk = 26
targetSdk = 34
versionCode = 11011
versionName = "1.1.3"
versionName = "1.2.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down Expand Up @@ -121,30 +105,30 @@ dependencies {
implementation("androidx.activity:activity-ktx:1.8.2")
implementation("androidx.annotation:annotation-experimental:1.4.0")
implementation("androidx.annotation:annotation:1.7.1")
implementation("androidx.browser:browser:1.7.0")
implementation("androidx.browser:browser:1.8.0")
implementation("androidx.camera:camera-core:1.4.0-alpha04")
implementation("androidx.camera:camera-lifecycle:1.4.0-alpha04")
implementation("androidx.camera:camera-camera2:1.4.0-alpha04")
implementation("androidx.compose.animation:animation-core:1.6.1")
implementation("androidx.compose.animation:animation:1.6.1")
implementation("androidx.compose.foundation:foundation-layout:1.6.1")
implementation("androidx.compose.foundation:foundation:1.6.1")
implementation("androidx.compose.material3:material3:1.2.0")
implementation("androidx.compose.material:material-icons-core:1.6.1")
implementation("androidx.compose.material:material:1.6.1")
implementation("androidx.compose.runtime:runtime-livedata:1.6.1")
implementation("androidx.compose.runtime:runtime-saveable:1.6.1")
implementation("androidx.compose.runtime:runtime:1.6.1")
implementation("androidx.compose.animation:animation-core:1.6.3")
implementation("androidx.compose.animation:animation:1.6.3")
implementation("androidx.compose.foundation:foundation-layout:1.6.3")
implementation("androidx.compose.foundation:foundation:1.6.3")
implementation("androidx.compose.material3:material3:1.2.1")
implementation("androidx.compose.material:material-icons-core:1.6.3")
implementation("androidx.compose.material:material:1.6.3")
implementation("androidx.compose.runtime:runtime-livedata:1.6.3")
implementation("androidx.compose.runtime:runtime-saveable:1.6.3")
implementation("androidx.compose.runtime:runtime:1.6.3")
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-geometry:1.6.1")
implementation("androidx.compose.ui:ui-geometry:1.6.3")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-text:1.6.1")
implementation("androidx.compose.ui:ui-text:1.6.3")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.ui:ui-unit:1.6.1")
implementation("androidx.compose.ui:ui-unit:1.6.3")
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.core:core-splashscreen:1.0.1")
implementation("androidx.glance:glance-appwidget:1.0.0")
implementation("androidx.hilt:hilt-navigation-compose:1.2.0-rc01")
implementation("androidx.hilt:hilt-navigation-compose:1.2.0")
implementation("androidx.lifecycle:lifecycle-common:2.7.0")
implementation("androidx.lifecycle:lifecycle-livedata-core-ktx:2.7.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
Expand All @@ -154,8 +138,8 @@ dependencies {
implementation("androidx.navigation:navigation-common:2.7.7")
implementation("androidx.navigation:navigation-compose:2.7.7")
implementation("androidx.navigation:navigation-runtime-ktx:2.7.7")
implementation("androidx.paging:paging-common-ktx:3.3.0-alpha03")
implementation("androidx.paging:paging-compose:3.3.0-alpha03")
implementation("androidx.paging:paging-common-ktx:3.3.0-alpha04")
implementation("androidx.paging:paging-compose:3.3.0-alpha04")
implementation("androidx.savedstate:savedstate:1.2.1")
implementation("androidx.security:security-crypto:1.1.0-alpha06")
implementation("com.airbnb.android:lottie-compose:6.3.0")
Expand All @@ -170,7 +154,7 @@ dependencies {
implementation("com.github.skydoves:sandwich-retrofit:2.0.5")
implementation("com.github.skydoves:sandwich:2.0.5")
implementation("com.google.accompanist:accompanist-permissions:0.33.2-alpha")
implementation("com.google.android.gms:play-services-auth:20.7.0")
implementation("com.google.android.gms:play-services-auth:21.0.0")
implementation("com.google.code.gson:gson:2.10.1")
implementation("com.google.dagger:dagger:2.49")
implementation("com.google.dagger:hilt-android:2.49")
Expand Down Expand Up @@ -205,6 +189,4 @@ dependencies {
kapt("com.google.dagger:dagger-compiler:2.49")
kapt("com.google.dagger:hilt-android-compiler:2.49")
testImplementation("junit:junit:4.13.2")
implementation("io.sentry:sentry-android:7.4.0")
implementation("io.sentry:sentry-compose-android:7.4.0")
}
11 changes: 0 additions & 11 deletions app/src/main/java/com/no5ing/bbibbi/BBiBBiApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import com.google.firebase.appcheck.appCheck
import com.google.firebase.appcheck.playintegrity.PlayIntegrityAppCheckProviderFactory
import com.kakao.sdk.common.KakaoSdk
import dagger.hilt.android.HiltAndroidApp
import io.sentry.android.core.SentryAndroid
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import timber.log.Timber
Expand All @@ -32,16 +31,6 @@ class BBiBBiApplication : Application(), ImageLoaderFactory {
PlayIntegrityAppCheckProviderFactory.getInstance(),
)
KakaoSdk.init(this, BuildConfig.kakaoApiKey)
SentryAndroid.init(this) { options ->
options.dsn = BuildConfig.sentryDsn
options.isEnableUserInteractionTracing = true
options.isEnableUserInteractionBreadcrumbs = true
options.isAttachViewHierarchy = true
options.sampleRate = 1.0
options.tracesSampleRate = 0.6
options.isAttachScreenshot = true
options.environment = BuildConfig.BUILD_TYPE
}
}

override fun newImageLoader(): ImageLoader {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.google.gson.Gson
import com.no5ing.bbibbi.data.model.auth.AuthResult
import com.no5ing.bbibbi.data.model.member.MemberRealEmoji
import timber.log.Timber
import java.time.LocalDate
import javax.inject.Inject
import javax.inject.Singleton

Expand Down Expand Up @@ -41,6 +42,7 @@ class LocalDataStorage @Inject constructor(val context: Context) {
const val REAL_EMOJI_KEY = "real_emoji"
const val TEMPORARY_POST_URI = "temporary_post_uri"
const val WIDGET_POPUP_PERIOD_KEY = "widget_popup_period"
const val MISSION_WIDGET_PERIOD_KEY = "mission_widget_period"
}

fun logOut() {
Expand Down Expand Up @@ -140,4 +142,16 @@ class LocalDataStorage @Inject constructor(val context: Context) {
}
return false
}

fun getLastWidgetPopupSeenDate(): LocalDate? {
val date = preferences.getString(MISSION_WIDGET_PERIOD_KEY, null)
return date?.let(LocalDate::parse)
}

fun setLastWidgetPopupSeenDate(date: LocalDate) {
val editor = preferences.edit()
editor.putString(MISSION_WIDGET_PERIOD_KEY, date.toString())
editor.apply()
editor.commit()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package com.no5ing.bbibbi.data.datasource.local

import com.google.common.cache.CacheBuilder
import com.google.common.cache.CacheLoader
import com.no5ing.bbibbi.data.datasource.network.RestAPI
import com.no5ing.bbibbi.data.model.APIResponse.Companion.wrapToAPIResponse
import com.no5ing.bbibbi.data.model.mission.Mission
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withContext
import java.util.concurrent.TimeUnit
import javax.inject.Inject
import javax.inject.Singleton

@Singleton
class MissionCacheProvider @Inject constructor(
private val restApi: RestAPI,
) {
private val cache = CacheBuilder.newBuilder()
.maximumSize(100)
.expireAfterWrite(10, TimeUnit.MINUTES)
.build(object : CacheLoader<String, Mission>() {
override fun load(key: String): Mission {
return runBlocking {
restApi.getPostApi().getMissionById(key).wrapToAPIResponse().data
}
}
})

suspend fun getMission(missionId: String): Mission? {
return coroutineScope {
withContext(Dispatchers.IO) {
runCatching {
return@runCatching cache.get(missionId)
}.getOrNull()
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@ import com.no5ing.bbibbi.data.model.member.ImageUploadLink
import com.no5ing.bbibbi.data.model.member.Member
import com.no5ing.bbibbi.data.model.member.MemberRealEmoji
import com.no5ing.bbibbi.data.model.member.MemberRealEmojiList
import com.no5ing.bbibbi.data.model.mission.Mission
import com.no5ing.bbibbi.data.model.post.CalendarBanner
import com.no5ing.bbibbi.data.model.post.CalendarElement
import com.no5ing.bbibbi.data.model.post.DailyCalendarElement
import com.no5ing.bbibbi.data.model.post.Post
import com.no5ing.bbibbi.data.model.post.PostComment
import com.no5ing.bbibbi.data.model.post.PostReaction
import com.no5ing.bbibbi.data.model.post.PostReactionSummary
import com.no5ing.bbibbi.data.model.post.PostRealEmoji
import com.no5ing.bbibbi.data.model.view.MainPageModel
import com.no5ing.bbibbi.data.model.view.NightMainPageModel
import com.skydoves.sandwich.ApiResponse
import retrofit2.http.Body
import retrofit2.http.DELETE
Expand All @@ -45,6 +49,7 @@ import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Path
import retrofit2.http.Query
import java.time.LocalDate

interface RestAPI {
/**
Expand Down Expand Up @@ -144,6 +149,11 @@ interface RestAPI {
@Path("realEmojiId") realEmojiId: String,
@Body body: UpdateMemberRealEmojiRequest,
): ApiResponse<MemberRealEmoji>

@POST("v1/members/{memberId}/pick")
suspend fun pickMember(
@Path("memberId") memberId: String,
): ApiResponse<DefaultResponse>
}

/**
Expand All @@ -156,6 +166,7 @@ interface RestAPI {
@Query("size") size: Int?,
@Query("date") date: String?,
@Query("memberId") memberId: String?,
@Query("type") type: String? = null,
@Query("sort") sort: String? = "DESC",
): ApiResponse<Pagination<Post>>

Expand All @@ -167,6 +178,7 @@ interface RestAPI {
@POST("v1/posts")
suspend fun createPost(
@Body body: CreatePostRequest,
@Query("type") type: String? = null,
): ApiResponse<Post>

@POST("v1/posts/image-upload-request")
Expand Down Expand Up @@ -196,17 +208,11 @@ interface RestAPI {
@Body body: CreatePostReactionRequest,
): ApiResponse<DefaultResponse>

@GET("v1/calendar?type=MONTHLY")
@GET("v1/calendar/monthly")
suspend fun getMonthlyCalendar(
@Query("yearMonth") yearMonth: String,
): ApiResponse<ArrayResponse<CalendarElement>>

@GET("v1/calendar?type=WEEKLY")
suspend fun getWeeklyCalendar(
@Query("yearMonth") yearMonth: String,
@Query("week") week: Int,
): ApiResponse<ArrayResponse<CalendarElement>>

@GET("v1/calendar/banner")
suspend fun getCalendarBanner(
@Query("yearMonth") yearMonth: String,
Expand All @@ -217,6 +223,11 @@ interface RestAPI {
@Query("yearMonth") yearMonth: String,
): ApiResponse<FamilySummary>

@GET("v1/calendar/daily")
suspend fun getDailyCalendar(
@Query("yearMonthDay") date: LocalDate,
): ApiResponse<ArrayResponse<DailyCalendarElement>>

@GET("v1/posts/{postId}/comments")
suspend fun getPostComments(
@Path("postId") postId: String,
Expand Down Expand Up @@ -261,6 +272,13 @@ interface RestAPI {
@Path("postRealEmojiId") postRealEmojiId: String,
): ApiResponse<DefaultResponse>

@GET("v1/missions/today")
suspend fun getDailyMission(): ApiResponse<Mission>

@GET("v1/missions/{missionId}")
suspend fun getMissionById(
@Path("missionId") missionId: String,
): ApiResponse<Mission>
}

/**
Expand Down Expand Up @@ -300,6 +318,14 @@ interface RestAPI {
): ApiResponse<DeepLink>
}

interface ViewApi {
@GET("v1/view/main/daytime-page")
suspend fun getMainView(): ApiResponse<MainPageModel>

@GET("v1/view/main/nighttime-page")
suspend fun getNightMainView(): ApiResponse<NightMainPageModel>
}

/**
* API 모음
*/
Expand All @@ -308,4 +334,5 @@ interface RestAPI {
fun getPostApi(): PostApi
fun getAuthApi(): AuthApi
fun getLinkApi(): LinkApi
fun getViewApi(): ViewApi
}
13 changes: 13 additions & 0 deletions app/src/main/java/com/no5ing/bbibbi/data/model/mission/Mission.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.no5ing.bbibbi.data.model.mission

import android.os.Parcelable
import com.no5ing.bbibbi.data.model.BaseModel
import kotlinx.parcelize.Parcelize
import java.time.LocalDate

@Parcelize
data class Mission(
val id: String,
val date: LocalDate?,
val content: String,
) : Parcelable, BaseModel()
Loading

0 comments on commit 6ad4ff2

Please sign in to comment.