Skip to content

Commit

Permalink
Merge pull request #72 from YAPP-Github/feature/issue-045-create-plan
Browse files Browse the repository at this point in the history
[ISSUE-45] 약속 잡기 STEP 1-2 구현
  • Loading branch information
jihee-dev authored Jul 1, 2022
2 parents 7615811 + 9a7231e commit 89d9481
Show file tree
Hide file tree
Showing 27 changed files with 814 additions and 80 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@ jobs:
- name: Generate Environment Variables File for Production
env:
BASE_URL: ${{ secrets.BASE_URL }}
KAKAO_O_AUTH: ${{ secrets.KAKAO_O_AUTH }}
kakao_o_auth_scheme: ${{ secrets.KAKAO_O_AUTH }}
KAKAO_APP_KEY: ${{ secrets.KAKAO_APP_KEY }}
run: |
echo BASE_URL=\"$BASE_URL\" >> ./local.properties
echo KAKAO_O_AUTH=\"$KAKAO_O_AUTH\" >> ./local.properties
echo KAKAO_APP_KEY=\"$KAKAO_APP_KEY\" >> ./local.properties
- name: Build with Gradle
run: ./gradlew build
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<uses-permission android:name="android.permission.INTERNET"/>

<application
android:name=".App"
android:name=".PlanzApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ import dagger.hilt.android.HiltAndroidApp
import timber.log.Timber

@HiltAndroidApp
class App : Application() {
class PlanzApplication : Application() {
override fun onCreate() {
super.onCreate()

Timber.plant(Timber.DebugTree())
Timber.plant(object : Timber.DebugTree() {
override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
super.log(priority, "Debug[$tag]", message, t)
}
})

KakaoSdk.init(
context = this,
appKey = BuildConfig.KAKAO_APP_KEY,
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ plugins {

repositories {
mavenCentral()
}
}
3 changes: 2 additions & 1 deletion buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ object Versions {
const val COIL = "1.4.0"
const val COMPOSE = "1.1.1"
const val COMPOSE_ACTIVITY = "1.4.0"
const val CONSTRAINT_LAYOUT = "2.1.3"
const val COMPOSE_CONSTRAINT_LAYOUT = "1.1.0-alpha02"
const val COMPOSE_NAVIGATION = "2.4.2"
const val CONSTRAINT_LAYOUT = "2.1.3"
const val FIREBASE_BOM = "29.1.0"
const val FIREBASE_CRASHLYTICS = "2.9.0"
const val GOOGLE_SERVICE = "4.3.10"
Expand Down
11 changes: 10 additions & 1 deletion buildSrc/src/main/java/app/ModuleDependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,16 @@ object ModuleDependencies {
Method.IMPLEMENTATION
),
DependencyInfo("io.coil-kt:coil-compose", Versions.COIL, Method.IMPLEMENTATION),
DependencyInfo("androidx.navigation:navigation-compose", Versions.COMPOSE_NAVIGATION, Method.IMPLEMENTATION)
DependencyInfo(
"androidx.navigation:navigation-compose",
Versions.COMPOSE_NAVIGATION,
Method.IMPLEMENTATION
),
DependencyInfo(
"androidx.constraintlayout:constraintlayout-compose",
Versions.COMPOSE_CONSTRAINT_LAYOUT,
Method.IMPLEMENTATION
)
)

val coroutines = arrayOf(
Expand Down
2 changes: 1 addition & 1 deletion domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ java {

dependencies {
app.ModuleDependencies.javaInject.implement(this)
}
}
2 changes: 1 addition & 1 deletion presentation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ dependencies {
implementation(platform(app.ModuleDependencies.FIREBASE_BOM))
implementation(app.ModuleDependencies.FIREBASE_ANALYTICS)
implementation(app.ModuleDependencies.FIREBASE_CRASHLYTICS)
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package com.yapp.growth.presentation.component

import androidx.annotation.DrawableRes
import androidx.compose.foundation.background
import androidx.annotation.StringRes
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Icon
import androidx.compose.material.Text
Expand All @@ -13,12 +16,14 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.yapp.growth.presentation.R
import com.yapp.growth.presentation.theme.Gray900
import com.yapp.growth.presentation.theme.PlanzTypography

Expand Down Expand Up @@ -78,7 +83,7 @@ private fun PlanzAppBar(
Icon(
imageVector = ImageVector.vectorResource(id = menu.icon),
tint = Color.Unspecified,
contentDescription = null,
contentDescription = stringResource(id = menu.contentDescription),
modifier = Modifier
.padding(end = menu.horizontalPadding)
.clip(RoundedCornerShape(30.dp))
Expand All @@ -91,14 +96,17 @@ private fun PlanzAppBar(
enum class PlanzAppBarMenu(
val horizontalPadding: Dp,
@DrawableRes val icon: Int,
@StringRes val contentDescription: Int,
) {
CREATE(
horizontalPadding = 16.dp,
icon = com.yapp.growth.presentation.R.drawable.ic_create
icon = R.drawable.ic_create,
contentDescription = R.string.icon_create_content_description
),
EXIT(
horizontalPadding = 20.dp,
icon = com.yapp.growth.presentation.R.drawable.ic_exit
icon = R.drawable.ic_exit,
contentDescription = R.string.icon_exit_content_description
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fun PlanzMainButton(
modifier: Modifier = Modifier,
onClick: () -> Unit,
) {
PlanzButton(
PlanzBasicButton(
text = text,
enabled = enabled,
modifier = modifier
Expand All @@ -38,7 +38,7 @@ fun PlanzSecondButton(
modifier: Modifier = Modifier,
onClick: () -> Unit,
) {
PlanzButton(
PlanzBasicButton(
text = text,
enabled = enabled,
modifier = modifier
Expand All @@ -58,24 +58,25 @@ fun PlanzButtonWithBack(
onClick: () -> Unit,
onBackClick: () -> Unit,
) {
Row(modifier = modifier.padding(horizontal = 16.dp)) {
PlanzBackButton(
modifier = modifier,
onBackClick = onBackClick
Row(
modifier = modifier.padding(horizontal = 16.dp),
horizontalArrangement = Arrangement.spacedBy(10.dp)
) {
BackButton(
onBackClick = onBackClick,
)
Spacer(modifier = Modifier.width(10.dp))
PlanzButton(

PlanzBasicButton(
text = text,
enabled = enabled,
modifier = modifier
.fillMaxWidth(),
modifier = Modifier.fillMaxWidth(),
onClick = onClick,
)
}
}

@Composable
private fun PlanzButton(
fun PlanzBasicButton(
text: String,
enabled: Boolean = true,
modifier: Modifier = Modifier,
Expand All @@ -102,12 +103,11 @@ private fun PlanzButton(
}

@Composable
private fun PlanzBackButton(
modifier: Modifier,
private fun BackButton(
onBackClick: () -> Unit,
) {
Button(
modifier = modifier
modifier = Modifier
.width(52.dp)
.height(52.dp),
shape = RoundedCornerShape(10.dp),
Expand Down Expand Up @@ -166,4 +166,4 @@ fun PlanzWithBackButtonPreview() {
onClick = {},
onBackClick = {}
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ fun PlanzCreateStepTitle(
.padding(horizontal = 20.dp)
) {
Column(
modifier = Modifier.align(Alignment.CenterStart)
modifier = Modifier.align(Alignment.CenterStart),
verticalArrangement = Arrangement.spacedBy(2.dp)
) {
Row(
modifier = Modifier.fillMaxWidth(),
Expand Down Expand Up @@ -65,7 +66,7 @@ fun PlanzCreateStepTitle(
.clickable { onExitClick() },
)
}
Spacer(modifier = Modifier.height(2.dp))

Text(
text = title,
style = PlanzTypography.h2,
Expand All @@ -85,4 +86,4 @@ fun PlanzCreateStepTitlePreview() {
title = "약속 테마를 골라주세요!",
onExitClick = { }
)
}
}
Loading

0 comments on commit 89d9481

Please sign in to comment.