Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*.{kt,kts}]
ktlint_standard_filename = disabled

[app/src/main/java/**/presentation/**/*.kt]
ktlint_standard_function-naming = disabled

[app/src/main/java/**/core/designsystem/**/*.kt]
ktlint_standard_function-naming = disabled
24 changes: 24 additions & 0 deletions .run/ByeBoo [ktLintCheck].run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ByeBoo [ktLintCheck]" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="ktLintCheck" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
24 changes: 24 additions & 0 deletions .run/ByeBoo [ktLintFormat].run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ByeBoo [ktLintFormat]" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="ktLintFormat" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
37 changes: 25 additions & 12 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,33 @@ plugins {
alias(libs.plugins.googleGmsServices)
}

val properties = Properties().apply {
val f = project.rootProject.file("local.properties")
if (f.exists()) f.inputStream().use { load(it) }
}
val properties =
Properties().apply {
val f = project.rootProject.file("local.properties")
if (f.exists()) f.inputStream().use { load(it) }
}

android {
namespace = "com.byeboo.app"
compileSdk = libs.versions.compileSdk.get().toInt()
compileSdk =
libs.versions.compileSdk
.get()
.toInt()

defaultConfig {
applicationId = "com.byeboo.app"
minSdk = libs.versions.minSdk.get().toInt()
targetSdk = libs.versions.targetSdk.get().toInt()
versionCode = libs.versions.versionCode.get().toInt()
minSdk =
libs.versions.minSdk
.get()
.toInt()
targetSdk =
libs.versions.targetSdk
.get()
.toInt()
versionCode =
libs.versions.versionCode
.get()
.toInt()
versionName = libs.versions.versionName.get()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -38,7 +51,7 @@ android {
buildConfigField(
"String",
"KAKAO_NATIVE_APP_KEY",
"\"$kakaoNativeAppKey\""
"\"$kakaoNativeAppKey\"",
)
manifestPlaceholders["KAKAO_NATIVE_APP_KEY"] = kakaoNativeAppKey

Expand All @@ -48,12 +61,12 @@ android {
buildConfigField(
"String",
"BYEBOO_PRIVACY_POLICY",
properties["byeboo.privacy.policy"].toString()
properties["byeboo.privacy.policy"].toString(),
)
buildConfigField(
"String",
"BYEBOO_TERMS_OF_SERVICE",
properties["byeboo.terms.of.service"].toString()
properties["byeboo.terms.of.service"].toString(),
)
}

Expand Down Expand Up @@ -84,7 +97,7 @@ android {
signingConfig = signingConfigs.getByName("release")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
"proguard-rules.pro",
)
}
}
Expand Down
15 changes: 7 additions & 8 deletions app/src/main/java/com/byeboo/app/ByeBoo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ import android.app.NotificationManager
import android.os.Build
import androidx.appcompat.app.AppCompatDelegate
import com.byeboo.app.core.util.MixpanelUtil
import com.byeboo.app.fcm.ByebooMessagingService
import com.byeboo.app.fcm.ByebooNotificationHandler
import com.kakao.sdk.common.KakaoSdk
import dagger.hilt.android.HiltAndroidApp
import javax.inject.Inject
import timber.log.Timber
import javax.inject.Inject

@HiltAndroidApp
class ByeBoo : Application() {

@Inject
lateinit var mixpanelUtil: MixpanelUtil

Expand Down Expand Up @@ -47,11 +45,12 @@ class ByeBoo : Application() {

private fun initNotificationChannel() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channel = NotificationChannel(
ByebooNotificationHandler.CHANNEL_ID,
ByebooNotificationHandler.CHANNEL_NAME,
NotificationManager.IMPORTANCE_HIGH
)
val channel =
NotificationChannel(
ByebooNotificationHandler.CHANNEL_ID,
ByebooNotificationHandler.CHANNEL_NAME,
NotificationManager.IMPORTANCE_HIGH,
)
val notificationManager = getSystemService(NotificationManager::class.java)
notificationManager.createNotificationChannel(channel)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.byeboo.app.core.designsystem.component

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import com.byeboo.app.core.designsystem.ui.theme.ByeBooTheme

@Composable
fun LoadingScreen() {
Column(
modifier =
Modifier
.fillMaxSize()
.background(color = ByeBooTheme.colors.black),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center,
) {
CircularProgressIndicator()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fun ByeBooBackHandler(message: String = "뒤로가기를 한 번 더 누르면
exitDelayMillis = 3000L,
onShowSnackBar = {
Toast.makeText(context, message, Toast.LENGTH_SHORT).show()
}
},
)
}

Expand All @@ -30,7 +30,7 @@ fun CloseBackHandler(
context: Context,
enabled: Boolean = true,
exitDelayMillis: Long = 3000L,
onShowSnackBar: () -> Unit = {}
onShowSnackBar: () -> Unit = {},
) {
var backPressedTime by remember {
mutableLongStateOf(0L)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,26 @@ fun ByeBooActivationButton(
buttonDisableTextColor: Color,
onClick: () -> Unit,
modifier: Modifier = Modifier,
isEnabled: Boolean = false
isEnabled: Boolean = false,
) {
val buttonBackgroundColor = if (isEnabled) ByeBooTheme.colors.primary300 else buttonDisableColor
val buttonTextColor = if (isEnabled) ByeBooTheme.colors.white else buttonDisableTextColor

Row(
modifier = modifier
.fillMaxWidth()
.clip(RoundedCornerShape(12.dp))
.background(color = buttonBackgroundColor)
.noRippleClickable(onClick = { if (isEnabled) onClick() })
.padding(vertical = screenHeightDp(16.dp)),
modifier =
modifier
.fillMaxWidth()
.clip(RoundedCornerShape(12.dp))
.background(color = buttonBackgroundColor)
.noRippleClickable(onClick = { if (isEnabled) onClick() })
.padding(vertical = screenHeightDp(16.dp)),
horizontalArrangement = Arrangement.Center,
verticalAlignment = Alignment.CenterVertically
verticalAlignment = Alignment.CenterVertically,
) {
Text(
text = buttonText,
style = ByeBooTheme.typography.body3,
color = buttonTextColor
color = buttonTextColor,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,25 @@ fun ByeBooButton(
modifier: Modifier = Modifier,
buttonBackgroundColor: Color = Color.Unspecified,
buttonStrokeColor: Color = Color.Unspecified,
textAlign: TextAlign = TextAlign.Center
textAlign: TextAlign = TextAlign.Center,
) {
Row(
modifier = modifier
.fillMaxWidth()
.clip(RoundedCornerShape(12.dp))
.background(color = buttonBackgroundColor)
.border(width = 1.dp, color = buttonStrokeColor, shape = RoundedCornerShape(12.dp))
.noRippleClickable(onClick = onClick)
.padding(vertical = screenHeightDp(16.dp)),
modifier =
modifier
.fillMaxWidth()
.clip(RoundedCornerShape(12.dp))
.background(color = buttonBackgroundColor)
.border(width = 1.dp, color = buttonStrokeColor, shape = RoundedCornerShape(12.dp))
.noRippleClickable(onClick = onClick)
.padding(vertical = screenHeightDp(16.dp)),
horizontalArrangement = Arrangement.Center,
verticalAlignment = Alignment.CenterVertically
verticalAlignment = Alignment.CenterVertically,
) {
Text(
text = buttonText,
style = buttonStyle,
color = buttonTextColor,
textAlign = textAlign
textAlign = textAlign,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,30 @@ import com.byeboo.app.core.designsystem.ui.theme.ByeBooTheme
@Composable
fun CustomSnackBar(
message: String,
modifier: Modifier = Modifier
modifier: Modifier = Modifier,
) {
Row(
modifier = modifier
.fillMaxWidth()
.background(
color = ByeBooTheme.colors.blackAlpha80,
shape = RoundedCornerShape(12.dp)
)
.padding(horizontal = 16.dp, vertical = 12.dp),
verticalAlignment = Alignment.CenterVertically
modifier =
modifier
.fillMaxWidth()
.background(
color = ByeBooTheme.colors.blackAlpha80,
shape = RoundedCornerShape(12.dp),
).padding(horizontal = 16.dp, vertical = 12.dp),
verticalAlignment = Alignment.CenterVertically,
) {
Icon(
imageVector = ImageVector.vectorResource(id = R.drawable.ic_alert),
contentDescription = "알림",
tint = Color.Unspecified
tint = Color.Unspecified,
)

Spacer(modifier = Modifier.width(8.dp))

Text(
text = message,
style = ByeBooTheme.typography.body6,
color = ByeBooTheme.colors.gray50
color = ByeBooTheme.colors.gray50,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,22 @@ fun LargeTag(
backgroundColor: Color,
textColor: Color,
textStyle: TextStyle,
modifier: Modifier = Modifier
modifier: Modifier = Modifier,
) {
Box(
modifier = modifier
.width(screenWidthDp(85.dp))
.background(
color = backgroundColor,
shape = RoundedCornerShape(largeTagType.roundedCorner)
)
.padding(vertical = screenHeightDp(largeTagType.verticalPadding)),
contentAlignment = Alignment.Center

modifier =
modifier
.width(screenWidthDp(85.dp))
.background(
color = backgroundColor,
shape = RoundedCornerShape(largeTagType.roundedCorner),
).padding(vertical = screenHeightDp(largeTagType.verticalPadding)),
contentAlignment = Alignment.Center,
) {
Text(
text = stringResource(largeTagType.titleResId),
color = textColor,
style = textStyle
style = textStyle,
)
}
}
Loading