diff --git a/.github/ISSUE_TEMPLATE/team6-issue-template.md b/.github/ISSUE_TEMPLATE/team6-issue-template.md index 071d16e..78149f7 100644 --- a/.github/ISSUE_TEMPLATE/team6-issue-template.md +++ b/.github/ISSUE_TEMPLATE/team6-issue-template.md @@ -1,10 +1,13 @@ --- name: Team6 Issue Template -about: Describe this issue template's purpose here. +about: "디프만 16기 6팀 안드로이드 이슈 템플릿 \U0001F680" title: '' labels: '' assignees: '' --- +## What is this issue? 🛠 +## Progress 🏃‍♀️ +- [ ] diff --git a/.github/team6-pull-request-template.md b/.github/team6-pull-request-template.md new file mode 100644 index 0000000..8a0c26b --- /dev/null +++ b/.github/team6-pull-request-template.md @@ -0,0 +1,13 @@ +## Related issue 🛠 +- closed #이슈넘버 + +## Work Description ✏️ +- 작업 내용 + +## Screenshot 📸 + + +## Uncompleted Tasks 😅 +- [ ] Task1 + +## To Reviewers 📢 \ No newline at end of file diff --git a/.github/workflows/android_ci.yml b/.github/workflows/android_ci.yml new file mode 100644 index 0000000..bde8a6e --- /dev/null +++ b/.github/workflows/android_ci.yml @@ -0,0 +1,79 @@ +name: Team6 CI +on: + pull_request: + branches: [ develop, main ] + +defaults: + run: + shell: bash + working-directory: . + +jobs: + build: + name: CI + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Gradle cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: 'temurin' + + - name: Change gradlew permissions + run: chmod +x ./gradlew + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Touch local properties + run: touch local.properties + + - name: Decode google-services.json + env: + FIREBASE_SECRET: ${{ secrets.FIREBASE_SECRET }} + run: echo $FIREBASE_SECRET > app/google-services.json + + - name: Access local properties + env: + HFM_BASE_URL: ${{ secrets.BASE_URL }} + run: | + echo "dev.base.url=\"$BASE_URL\"" >> local.properties + + - name: Lint Check + run: ./gradlew ktlintCheck -PcompileSdkVersion=34 + + - name: Build with Gradle + run: ./gradlew build -PcompileSdkVersion=34 + + - name: Slack Notify - Success + if: ${{ success() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_COLOR: '#B7FF1D' + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_TITLE: '✅ PR Success ✅' + SLACK_USERNAME: DEPORMEET-TEAM6 🍗 + SLACK_MESSAGE: 'PR이 완료되었습니다! 😆‍' + + - name: Slack Notify - Failure + if: ${{ failure() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_COLOR: '#FF9254' + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_TITLE: '❌ PR Failed ❌' + SLACK_USERNAME: DEPORMEET-TEAM6 🍗 + SLACK_MESSAGE: '에러를 확인해 주세요 🫨' diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 68c0d7c..6d86f47 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -2,11 +2,12 @@ plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) alias(libs.plugins.kotlin.compose) + alias(libs.plugins.ktlint) } android { namespace = "com.depromeet.team6" - compileSdk = 34 + compileSdk = 35 defaultConfig { applicationId = "com.depromeet.team6" @@ -56,4 +57,4 @@ dependencies { androidTestImplementation(libs.androidx.ui.test.junit4) debugImplementation(libs.androidx.ui.tooling) debugImplementation(libs.androidx.ui.test.manifest) -} \ No newline at end of file +} diff --git a/app/src/androidTest/java/com/depromeet/team6/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/depromeet/team6/ExampleInstrumentedTest.kt index 8b594bb..5f96d32 100644 --- a/app/src/androidTest/java/com/depromeet/team6/ExampleInstrumentedTest.kt +++ b/app/src/androidTest/java/com/depromeet/team6/ExampleInstrumentedTest.kt @@ -1,13 +1,11 @@ package com.depromeet.team6 -import androidx.test.platform.app.InstrumentationRegistry import androidx.test.ext.junit.runners.AndroidJUnit4 - +import androidx.test.platform.app.InstrumentationRegistry +import org.junit.Assert.assertEquals import org.junit.Test import org.junit.runner.RunWith -import org.junit.Assert.* - /** * Instrumented test, which will execute on an Android device. * @@ -21,4 +19,4 @@ class ExampleInstrumentedTest { val appContext = InstrumentationRegistry.getInstrumentation().targetContext assertEquals("com.depromeet.team6", appContext.packageName) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/depromeet/team6/MainActivity.kt b/app/src/main/java/com/depromeet/team6/MainActivity.kt index 57f34e2..74d9135 100644 --- a/app/src/main/java/com/depromeet/team6/MainActivity.kt +++ b/app/src/main/java/com/depromeet/team6/MainActivity.kt @@ -33,7 +33,7 @@ class MainActivity : ComponentActivity() { @Composable fun Greeting(name: String, modifier: Modifier = Modifier) { Text( - text = "Hello $name!", + text = "슬랙 알림 진짜 안가용가리?! ㅠㅠ", modifier = modifier ) } @@ -44,4 +44,4 @@ fun GreetingPreview() { Team6Theme { Greeting("Android") } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/depromeet/team6/ui/theme/Color.kt b/app/src/main/java/com/depromeet/team6/ui/theme/Color.kt index e63fe1c..03a7f98 100644 --- a/app/src/main/java/com/depromeet/team6/ui/theme/Color.kt +++ b/app/src/main/java/com/depromeet/team6/ui/theme/Color.kt @@ -8,4 +8,4 @@ val Pink80 = Color(0xFFEFB8C8) val Purple40 = Color(0xFF6650a4) val PurpleGrey40 = Color(0xFF625b71) -val Pink40 = Color(0xFF7D5260) \ No newline at end of file +val Pink40 = Color(0xFF7D5260) diff --git a/app/src/main/java/com/depromeet/team6/ui/theme/Theme.kt b/app/src/main/java/com/depromeet/team6/ui/theme/Theme.kt index 0cdbc7f..c2ffe65 100644 --- a/app/src/main/java/com/depromeet/team6/ui/theme/Theme.kt +++ b/app/src/main/java/com/depromeet/team6/ui/theme/Theme.kt @@ -1,6 +1,5 @@ package com.depromeet.team6.ui.theme -import android.app.Activity import android.os.Build import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material3.MaterialTheme @@ -55,4 +54,4 @@ fun Team6Theme( typography = Typography, content = content ) -} \ No newline at end of file +} diff --git a/app/src/main/java/com/depromeet/team6/ui/theme/Type.kt b/app/src/main/java/com/depromeet/team6/ui/theme/Type.kt index 603e88f..656399e 100644 --- a/app/src/main/java/com/depromeet/team6/ui/theme/Type.kt +++ b/app/src/main/java/com/depromeet/team6/ui/theme/Type.kt @@ -31,4 +31,4 @@ val Typography = Typography( letterSpacing = 0.5.sp ) */ -) \ No newline at end of file +) diff --git a/app/src/test/java/com/depromeet/team6/ExampleUnitTest.kt b/app/src/test/java/com/depromeet/team6/ExampleUnitTest.kt index f2ed2e1..d9f2017 100644 --- a/app/src/test/java/com/depromeet/team6/ExampleUnitTest.kt +++ b/app/src/test/java/com/depromeet/team6/ExampleUnitTest.kt @@ -1,9 +1,8 @@ package com.depromeet.team6 +import org.junit.Assert.assertEquals import org.junit.Test -import org.junit.Assert.* - /** * Example local unit test, which will execute on the development machine (host). * @@ -14,4 +13,4 @@ class ExampleUnitTest { fun addition_isCorrect() { assertEquals(4, 2 + 2) } -} \ No newline at end of file +} diff --git a/build.gradle.kts b/build.gradle.kts index 952b930..cd2d9ba 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,4 +3,5 @@ plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.kotlin.android) apply false alias(libs.plugins.kotlin.compose) apply false -} \ No newline at end of file + alias(libs.plugins.ktlint) apply false +} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e6e2317..7856d08 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -29,4 +29,5 @@ androidx-material3 = { group = "androidx.compose.material3", name = "material3" android-application = { id = "com.android.application", version.ref = "agp" } kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } +ktlint = "org.jlleitschuh.gradle.ktlint:11.5.1"