Skip to content

Commit

Permalink
Merge pull request #213 from mash-up-kr/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahn-seokjoo authored Sep 7, 2024
2 parents 20c4f0d + 837724a commit 3137f4a
Show file tree
Hide file tree
Showing 85 changed files with 642 additions and 430 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-tagging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
auto-tagging:
if: github.event.pull_request.merged == true
if: github.event.pull_request.merged == true && (contains(github.event.pull_request.labels.*.name, 'major') || contains(github.event.pull_request.labels.*.name, 'minor') || contains(github.event.pull_request.labels.*.name, 'patch'))
runs-on: ubuntu-latest

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK 18
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '18'
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- name: Download common setup files
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: create artifact
name: create artifact and deployment
on:
workflow_dispatch:
pull_request:
branches:
- master
types:
- synchronize
- opened
- closed

jobs:
common_setup:
Expand All @@ -15,16 +14,17 @@ jobs:

upload_apk:
needs: common_setup
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: set up JDK 18
- name: set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '18'
java-version: '17'
cache: 'gradle'

- name: Download common setup files
Expand Down Expand Up @@ -59,16 +59,17 @@ jobs:

upload_aab:
needs: common_setup
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: set up JDK 18
- name: set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '18'
java-version: '17'
cache: 'gradle'
- name: Download common setup files
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -98,6 +99,14 @@ jobs:
retention-days: 7
overwrite: true

- name: play store auto deployment
uses: r0adkll/upload-google-play@v1
with:
packageName: com.mashup.dorabangs
releaseFiles: app/build/outputs/bundle/release/app-release.aab
track: production
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}

post_github:
needs: [ upload_apk, upload_aab ]
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: set up JDK 18
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '18'
java-version: '17'
distribution: 'temurin'
cache: 'gradle'

Expand Down
14 changes: 7 additions & 7 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
alias(libs.plugins.com.android.application)
alias(libs.plugins.org.jetbrains.kotlin.android)
alias(libs.plugins.hilt)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.ksp)
alias(libs.plugins.kotlinx.serialization)
alias(libs.plugins.google.gms.service)
}
Expand All @@ -17,7 +17,7 @@ android {
applicationId = "com.mashup.dorabangs"
minSdk = libs.versions.min.sdk.get().toInt()
targetSdk = libs.versions.target.sdk.get().toInt()
versionCode = GitUtil.getGitCommitCount(project)
versionCode = getGitCommitCount()
versionName = libs.versions.versionName.get()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -51,14 +51,14 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_18
targetCompatibility = JavaVersion.VERSION_18
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.4"
kotlinCompilerExtensionVersion = "1.5.2"
}
kotlinOptions {
jvmTarget = "18"
jvmTarget = "17"
}
packaging {
resources {
Expand Down Expand Up @@ -101,7 +101,7 @@ dependencies {

// Hilt
implementation(libs.hilt.android)
kapt(libs.hilt.compiler)
ksp(libs.hilt.compiler)

// Firebase
implementation(platform(libs.firebase.bom))
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ plugins {
alias(libs.plugins.org.jetbrains.kotlin.jvm) apply false
alias(libs.plugins.spotless) apply true
alias(libs.plugins.hilt) apply false
alias(libs.plugins.kotlin.kapt) apply false
alias(libs.plugins.google.gms.service) apply false
alias(libs.plugins.ksp) apply false
}

subprojects {
Expand Down
32 changes: 15 additions & 17 deletions buildSrc/src/main/kotlin/GitUtil.kt
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import java.io.ByteArrayOutputStream
import org.gradle.api.Project

object GitUtil {
/**
* 익셉션 나오면 1로 세팅돼서
* aab 업로드시에 버전이 겹치다고 나올 것임
* 그 때 default를 바꾸던,,익셉션 안나게 하던,,, 잘 해보도록 해~
*/
fun getGitCommitCount(project: Project): Int {
return runCatching {
val stdout = ByteArrayOutputStream()
project.exec {
commandLine = listOf("git", "rev-list", "--count", "HEAD")
standardOutput = stdout
}
stdout.toString().trim().toInt()
}.getOrDefault(1)
}
}
/**
* 익셉션 나오면 1로 세팅돼서
* aab 업로드시에 버전이 겹치다고 나올 것임
* 그 때 default를 바꾸던,,익셉션 안나게 하던,,, 잘 해보도록 해~
*/
fun Project.getGitCommitCount(): Int {
return runCatching {
val stdout = ByteArrayOutputStream()
project.exec {
commandLine = listOf("git", "rev-list", "--count", "HEAD")
standardOutput = stdout
}
stdout.toString().trim().toInt()
}.getOrDefault(1)
}
6 changes: 3 additions & 3 deletions core/coroutine/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_18
targetCompatibility = JavaVersion.VERSION_18
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "18"
jvmTarget = "17"
}
}

Expand Down
8 changes: 4 additions & 4 deletions core/designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ android {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.3"
kotlinCompilerExtensionVersion = "1.5.2"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_18
targetCompatibility = JavaVersion.VERSION_18
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "18"
jvmTarget = "17"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ object DoraBottomSheet : BottomSheetType {
icon = R.drawable.ic_add_folder_purple,
itemName = stringResource(id = R.string.moving_folder_dialog_add_folder),
isSelected = false,
color = DoraColorTokens.Primary,
color = DoraColorTokens.Primary500,
),
onClickItem = onClickCreateFolder,
isLastItem = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.unit.dp
import com.mashup.dorabangs.core.designsystem.theme.DoraColorTokens

@Composable
fun GradientButton(
fun BannerButton(
onClick: () -> Unit,
modifier: Modifier = Modifier,
gradientModifier: Modifier = Modifier,
enabled: Boolean = true,
shape: Shape = ButtonDefaults.shape,
colors: ButtonColors = ButtonDefaults.buttonColors(),
containerColor: Brush = Brush.verticalGradient(listOf(colors.containerColor, colors.containerColor)),
containerColor: Color = DoraColorTokens.G7,
elevation: ButtonElevation? = ButtonDefaults.buttonElevation(),
border: BorderStroke? = null,
contentPadding: PaddingValues = ButtonDefaults.ContentPadding,
Expand All @@ -49,11 +49,11 @@ fun GradientButton(
) {
Box(
modifier = gradientModifier
.background(brush = containerColor, shape = shape)
.background(color = containerColor, shape = shape)
.padding(contentPadding),
contentAlignment = Alignment.Center,
) {
Row {
Row(verticalAlignment = Alignment.CenterVertically) {
content()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package com.mashup.dorabangs.core.designsystem.component.buttons

import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import com.mashup.dorabangs.core.designsystem.theme.BtnMaxColorTokens
import com.mashup.dorabangs.core.designsystem.theme.BtnMaxRoundTokens
import com.mashup.dorabangs.core.designsystem.theme.DoraTypoTokens
Expand All @@ -27,6 +29,27 @@ object DoraButtons : ButtonType {
onClickButton = onClickButton,
)

@Composable
override fun DoraBtnMaxFullWithTextStyle(
modifier: Modifier,
containerColor: Color,
buttonText: String,
enabled: Boolean,
textStyle: TextStyle,
onClickButton: () -> Unit,
) = DoraButton(
modifier = modifier,
buttonText = buttonText,
textStyle = textStyle,
enabled = enabled,
radius = BtnMaxRoundTokens.FullButtonWidthRadius,
containerColor = containerColor,
contentColor = BtnMaxColorTokens.ContentColor1,
disabledContainerColor = BtnMaxColorTokens.ContainerColor1_Off,
disabledContentColor = BtnMaxColorTokens.ContentColor_1Off,
onClickButton = onClickButton,
)

@Composable
override fun DoraMediumConfirmBtn(
modifier: Modifier,
Expand All @@ -37,7 +60,7 @@ object DoraButtons : ButtonType {
buttonText = buttonText,
textStyle = DoraTypoTokens.caption3Medium,
enabled = true,
radius = BtnMaxRoundTokens.MediumButtonWidthRadius,
radius = BtnMaxRoundTokens.SmallButtonWidthRadius,
containerColor = BtnMaxColorTokens.ContainerColor1,
contentColor = BtnMaxColorTokens.ContentColor1,
disabledContainerColor = BtnMaxColorTokens.ContainerColor1_Off,
Expand All @@ -55,8 +78,8 @@ object DoraButtons : ButtonType {
buttonText = buttonText,
textStyle = DoraTypoTokens.caption3Medium,
enabled = true,
radius = BtnMaxRoundTokens.MediumButtonWidthRadius,
containerColor = BtnMaxColorTokens.ContainerColor2,
radius = BtnMaxRoundTokens.SmallButtonWidthRadius,
containerColor = BtnMaxColorTokens.ContainerColor1_Off,
contentColor = BtnMaxColorTokens.ContentColor2,
disabledContainerColor = BtnMaxColorTokens.ContainerColor1_Off,
disabledContentColor = BtnMaxColorTokens.ContentColor_1Off,
Expand All @@ -71,10 +94,10 @@ object DoraButtons : ButtonType {
) = DoraButton(
modifier = modifier,
buttonText = buttonText,
textStyle = DoraTypoTokens.caption3Medium,
textStyle = DoraTypoTokens.caption2Medium,
enabled = true,
radius = BtnMaxRoundTokens.FullButtonWidthRadius,
containerColor = BtnMaxColorTokens.ContainerColor1,
containerColor = BtnMaxColorTokens.ContainerColor3,
contentColor = BtnMaxColorTokens.ContentColor1,
disabledContainerColor = BtnMaxColorTokens.ContainerColor1_Off,
disabledContentColor = BtnMaxColorTokens.ContentColor_1Off,
Expand Down Expand Up @@ -111,6 +134,16 @@ sealed interface ButtonType {
onClickButton: () -> Unit,
)

@Composable
fun DoraBtnMaxFullWithTextStyle(
modifier: Modifier,
containerColor: Color,
buttonText: String,
enabled: Boolean,
textStyle: TextStyle,
onClickButton: () -> Unit,
)

@Composable
fun DoraMediumConfirmBtn(
modifier: Modifier,
Expand Down
Loading

0 comments on commit 3137f4a

Please sign in to comment.