Skip to content

Commit

Permalink
Merge pull request #164 from pknu-wap/release
Browse files Browse the repository at this point in the history
Release 1.0.1v
  • Loading branch information
jeongjaino authored Apr 1, 2024
2 parents 88d2554 + e6f9a14 commit d7e0081
Show file tree
Hide file tree
Showing 64 changed files with 544 additions and 298 deletions.
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
3 changes: 2 additions & 1 deletion .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:
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.

10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@

<br><br><br>

<br><br><br>

<img src="https://github.com/pknu-wap/WAPP/assets/116813010/aa89aa41-9406-42d8-b245-40bca847b63d" width="250"/>
<img src="https://github.com/pknu-wap/WAPP/assets/116813010/9e7ec50f-404e-436c-ab7a-7037da2873a7" width="250"/>
<img src="https://github.com/pknu-wap/WAPP/assets/116813010/4e973d3d-7f35-432e-b6e1-3ce36d070c1a" width="250"/>
<img src="https://github.com/pknu-wap/WAPP/assets/116813010/c9e92d35-f7e4-49ad-ac9a-a923dd6fca6b" width="250"/>
<img src="https://github.com/pknu-wap/WAPP/assets/116813010/6c8a85d3-7ca1-46fb-919b-55d4a7309a3e" width="250"/>

<br><br><br>

## 🌱 Feature Introduce

#### 인트로 화면
Expand Down
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
Loading

0 comments on commit d7e0081

Please sign in to comment.