Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.0.1v #165

Merged
merged 36 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
054d8d3
[ADD] : 1.0.0 ๋ฆด๋ฆฌ์ฆˆ ๋…ธํŠธ ์ถ”๊ฐ€
jeongjaino Mar 8, 2024
af0529b
[ADD] : ๋ฆด๋ฆฌ์ฆˆ ๋…ธํŠธ ์‚ญ์ œ
jeongjaino Mar 8, 2024
9e61605
Merge pull request #156 from pknu-wap/develop
jeongjaino Mar 8, 2024
418dcde
Merge pull request #157 from pknu-wap/develop
jeongjaino Mar 11, 2024
2968f7a
Update released-app-distribution.yml
jeongjaino Mar 11, 2024
65e71b0
[CHORE] #161 : ์Šคํ”Œ๋ž˜์‰ฌ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์†Œ๊ฑฐ
tgyuuAn Mar 24, 2024
6b8496f
[FEATURE] #161 : SignIn -> Notice ๋„ค๋น„๊ฒŒ์ด์…˜ ์‹œ ๋ฐฑ์Šคํƒ ์ œ๊ฑฐ
tgyuuAn Mar 24, 2024
82ec570
[CHORE] #161 : isUserSignIn() suspend ์‹œ๊ทธ๋‹ˆ์ฒ˜ ์ œ๊ฑฐ ๋ฐ viewModelScope init -โ€ฆ
tgyuuAn Mar 24, 2024
645fa12
Update gradle.properties
jeongjaino Mar 25, 2024
62e16cb
Update opened-pr-notification.yml
jeongjaino Mar 25, 2024
261f8a3
Update closed-pr-notification.yml
jeongjaino Mar 25, 2024
bd18b3a
Update released-app-distribution.yml
jeongjaino Mar 25, 2024
6b4ac9d
Merge branch 'release' into feature/tgyuu/#161
jeongjaino Mar 25, 2024
96ff294
Update closed-pr-notification.yml
jeongjaino Mar 25, 2024
f19eb0a
Update opened-pr-notification.yml
jeongjaino Mar 25, 2024
a927f4d
Update released-app-distribution.yml
jeongjaino Mar 25, 2024
d9af2a9
Merge pull request #162 from pknu-wap/feature/tgyuu/#161
jeongjaino Mar 25, 2024
37ef449
[CHORE] : Analytics ๋ชจ๋“ˆ ์ƒ์„ฑ
jeongjaino Mar 27, 2024
66f03b3
[FEATURE] : Analytics Event Model ํด๋ž˜์Šค ๊ตฌํ˜„
jeongjaino Mar 27, 2024
670a062
[FEATURE] : AnalyticsHelper, AnalyticsHelperImpl ๊ตฌํ˜„
jeongjaino Mar 27, 2024
3eb2537
[FEATURE] : common๋‚ด์˜ Screen analytics Extenstion ๊ตฌํ˜„
jeongjaino Mar 27, 2024
2ef1b2a
[FEATURE] : AnalyticsHelper CompositionLocal ๊ตฌํ˜„์ฒด ์ฃผ์ž… ๋ฐ ์•”์‹œ์  ์ „๋‹ฌ ๊ตฌํ˜„
jeongjaino Mar 27, 2024
50455f5
[FEATURE] : AnalyticsHelper CompositionLocal ๊ตฌํ˜„์ฒด ๊ตฌํ˜„
jeongjaino Mar 27, 2024
f8aed83
[FEATURE] : Screen Event ๋กœ๊น… ๊ตฌํ˜„
jeongjaino Mar 27, 2024
348df2a
[CHORE] : ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ์œ ํ‹ธ ํด๋ž˜์Šค ์†Œ๊ฑฐ
jeongjaino Mar 27, 2024
2f3979a
[CHORE] : ์œ ์Šค์ผ€์ด์Šค ๋‚ด ๋ถˆํ•„์š”ํ•œ HiltScope ์†Œ๊ฑฐ
jeongjaino Mar 27, 2024
49bba05
[CHORE] : ktlint ํ…Œ์ŠคํŠธ ํŒŒ์ผ ์†Œ๊ฑฐ
jeongjaino Mar 27, 2024
937ee94
[CHORE] : ๋กœ๊ทธ์ธ Analytics Extension ๊ตฌํ˜„
jeongjaino Mar 28, 2024
f7004ae
[FEATURE] : ๋กœ๊ทธ์ธ Analytics Event ๋กœ๊น… ๊ตฌํ˜„
jeongjaino Mar 28, 2024
e540589
[FEATURE] : ๋กœ๊ทธ์•„์›ƒ, ํƒˆํ‡ด Analytics Event ๋กœ๊น… ๊ตฌํ˜„
jeongjaino Mar 28, 2024
d7aa788
[FEATURE] : ๋กœ๊ทธ์•„์›ƒ Analytics Event ๋กœ๊น… ๊ตฌํ˜„
jeongjaino Mar 28, 2024
ea71a76
[CHORE] : logUserSignedIn Route๋กœ ๋กœ์ง ์˜ฌ๋ฆฌ๊ธฐ
jeongjaino Mar 29, 2024
ab45c86
[CHORE] : onSignInSucceed ๋„ค์ด๋ฐ ์ˆ˜์ •
jeongjaino Mar 29, 2024
bc31171
Merge pull request #163 from pknu-wap/feature/jaino/#160
jeongjaino Mar 29, 2024
d0b65d1
[CHORE] : onGuestModeButtonClicked() Parameter ์ถ”๊ฐ€
jeongjaino Mar 29, 2024
e6f9a14
[CHORE] : trailing comma add
jeongjaino Mar 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/closed-pr-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Closed PR Notification
on:
pull_request:
branches:
- dev
- main
- develop
- release
- main
types:
- closed

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/opened-pr-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request:
branches:
- develop
- release
- main
types:
- opened
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/released-app-distribution.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Released-App-Distribution

on:
push:
push:
branches:
- 'release'
- release

jobs:
build:
Expand Down
15 changes: 14 additions & 1 deletion .idea/deploymentTargetDropDown.xml

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

4 changes: 3 additions & 1 deletion .idea/gradle.xml

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

2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ dependencies {
implementation(project(":feature:management-survey"))
implementation(project(":feature:management-event"))
implementation(project(":feature:splash"))
implementation(project(":core:common"))
implementation(project(":core:analytics"))
implementation(project(":core:designresource"))
implementation(project(":core:designsystem"))
implementation(project(":core:domain"))
Expand Down
81 changes: 44 additions & 37 deletions app/src/main/java/com/wap/wapp/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.material3.Scaffold
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.saveable.rememberSaveable
Expand All @@ -24,6 +25,8 @@ import androidx.navigation.compose.currentBackStackEntryAsState
import androidx.navigation.compose.rememberNavController
import com.wap.designsystem.WappTheme
import com.wap.wapp.component.WappBottomBar
import com.wap.wapp.core.analytics.AnalyticsHelper
import com.wap.wapp.core.analytics.LocalAnalyticsHelper
import com.wap.wapp.core.domain.usecase.auth.SignInUseCase
import com.wap.wapp.feature.attendance.management.navigation.attendanceManagementNavigationRoute
import com.wap.wapp.feature.auth.signin.navigation.signInNavigationRoute
Expand All @@ -47,50 +50,54 @@ class MainActivity : ComponentActivity() {
@Inject
lateinit var signInUseCase: SignInUseCase

@Inject
lateinit var analyticsHelper: AnalyticsHelper

override fun onCreate(savedInstanceState: Bundle?) {
setSystemBarStyle()
super.onCreate(savedInstanceState)
setContent {
WappTheme {
val navController = rememberNavController()

Scaffold(
containerColor = WappTheme.colors.backgroundBlack,
bottomBar = {
val navBackStackEntry by
navController.currentBackStackEntryAsState()
val navController = rememberNavController()
val navBackStackEntry by navController.currentBackStackEntryAsState()
val currentRoute = navBackStackEntry?.destination?.route
var bottomBarState by rememberSaveable { mutableStateOf(false) }

val currentRoute = navBackStackEntry?.destination?.route
var bottomBarState by rememberSaveable { mutableStateOf(false) }

handleBottomBarState(
currentRoute,
setBottomBarState = { boolean ->
bottomBarState = boolean
},
)
CompositionLocalProvider(
LocalAnalyticsHelper provides analyticsHelper,
) {
WappTheme {
Scaffold(
containerColor = WappTheme.colors.backgroundBlack,
bottomBar = {
handleBottomBarState(
currentRoute,
setBottomBarState = { boolean ->
bottomBarState = boolean
},
)

WappBottomBar(
currentRoute = currentRoute,
bottomBarState = bottomBarState,
onNavigateToDestination = { destination ->
navigateToTopLevelDestination(
navController,
destination,
)
},
modifier = Modifier.height(70.dp),
WappBottomBar(
currentRoute = currentRoute,
bottomBarState = bottomBarState,
onNavigateToDestination = { destination ->
navigateToTopLevelDestination(
navController,
destination,
)
},
modifier = Modifier.height(70.dp),
)
},
modifier = Modifier
.windowInsetsPadding(WindowInsets.navigationBars)
.fillMaxSize(),
) { innerPadding ->
WappNavHost(
signInUseCase = signInUseCase,
navController = navController,
modifier = Modifier.padding(innerPadding),
)
},
modifier = Modifier
.windowInsetsPadding(WindowInsets.navigationBars)
.fillMaxSize(),
) { innerPadding ->
WappNavHost(
signInUseCase = signInUseCase,
navController = navController,
modifier = Modifier.padding(innerPadding),
)
}
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion app/src/main/java/com/wap/wapp/navigation/WappNavHost.kt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ fun WappNavHost(
)
signInScreen(
signInUseCase = signInUseCase,
navigateToNotice = navController::navigateToNotice,
navigateToNotice = {
navController.navigateToNotice(
navOptions { popUpTo(signInNavigationRoute) { inclusive = true } },
)
},
navigateToSignUp = navController::navigateToSignUp,
)
signUpScreen(
Expand Down
1 change: 1 addition & 0 deletions core/analytics/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
29 changes: 29 additions & 0 deletions core/analytics/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
plugins {
id("com.wap.wapp.library")
id("com.wap.wapp.hilt")
id("com.wap.wapp.compose")
}

android {
namespace = "com.wap.wapp.core.analytics"

defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}
}
}

dependencies {
implementation(platform(libs.firebase.bom))
implementation(libs.firebase.analytics)
}
Empty file.
21 changes: 21 additions & 0 deletions core/analytics/proguard-rules.pro
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.wap.wapp.core.analytics

data class AnalyticsEvent(
val type: String,
val extras: List<Param> = emptyList(),
) {
data class Param(
val key: String,
val value: String,
)

companion object {
const val SCREEN_VIEW = "screen_view" // TYPE
const val SCREEN_NAME = "screen_name" // EXTRA_KEY
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.wap.wapp.core.analytics

interface AnalyticsHelper {
fun logEvent(event: AnalyticsEvent)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.wap.wapp.core.analytics

import com.google.firebase.analytics.FirebaseAnalytics
import com.google.firebase.analytics.ktx.logEvent
import javax.inject.Inject

class AnalyticsHelperImpl @Inject constructor(
private val firebaseAnalytics: FirebaseAnalytics,
) : AnalyticsHelper {
override fun logEvent(event: AnalyticsEvent) {
firebaseAnalytics.logEvent(event.type) {
for (extra in event.extras) {
// Key, Value Max Length์— ๋”ฐ๋ฅธ slicing
param(
key = extra.key.take(40),
value = extra.value.take(100),
)
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.wap.wapp.core.analytics

import androidx.compose.runtime.staticCompositionLocalOf

val LocalAnalyticsHelper = staticCompositionLocalOf<AnalyticsHelper> {
error("Any AnalyticsHelper Did Not Provided")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.wap.wapp.core.analytics.di

import com.google.firebase.analytics.FirebaseAnalytics
import com.google.firebase.analytics.ktx.analytics
import com.google.firebase.ktx.Firebase
import com.wap.wapp.core.analytics.AnalyticsHelper
import com.wap.wapp.core.analytics.AnalyticsHelperImpl
import dagger.Binds
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
abstract class AnalyticsModule {
@Binds
@Singleton
abstract fun bindsAnalyticsHelper(analyticsHelperImpl: AnalyticsHelperImpl): AnalyticsHelper

companion object {
@Provides
@Singleton
fun provideFirebaseAnalytics(): FirebaseAnalytics {
return Firebase.analytics
}
}
}
3 changes: 2 additions & 1 deletion core/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

android {
namespace = "com.wap.wapp.core.base"
namespace = "com.wap.wapp.core.common"

defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -22,6 +22,7 @@ android {
}

dependencies {
implementation(project(":core:analytics"))
implementation(libs.bundles.androidx)
implementation(platform(libs.firebase.bom))
implementation(libs.firebase.auth)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.wap.wapp.core.commmon.extensions

import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import com.wap.wapp.core.analytics.AnalyticsEvent
import com.wap.wapp.core.analytics.AnalyticsEvent.Param
import com.wap.wapp.core.analytics.AnalyticsHelper
import com.wap.wapp.core.analytics.LocalAnalyticsHelper

fun AnalyticsHelper.logScreenView(screenName: String) {
logEvent(
AnalyticsEvent(
type = AnalyticsEvent.SCREEN_VIEW,
extras = listOf(
Param(AnalyticsEvent.SCREEN_NAME, screenName),
),
),
)
}

fun AnalyticsHelper.logUserSignedIn(userId: String, userName: String) {
logEvent(
AnalyticsEvent(
type = "signed_in",
extras = listOf(
Param("user_id", userId),
Param("user_name", userName),
),
),
)
}

@Composable
fun TrackScreenViewEvent(
screenName: String,
analyticsHelper: AnalyticsHelper = LocalAnalyticsHelper.current,
) = LaunchedEffect(Unit) {
analyticsHelper.logScreenView(screenName)
}
Loading
Loading