Skip to content

Commit 7e2913c

Browse files
authored
Merge pull request #29 from 33-Auto/dev
Main 코드 업데이트
2 parents b115b1e + b8d9911 commit 7e2913c

262 files changed

Lines changed: 11262 additions & 361 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# 각 레포지토리의 .github/workflows/assign-issue-creator.yml
2+
3+
name: Assign issue creator
4+
5+
on:
6+
issues:
7+
types: [opened]
8+
9+
jobs:
10+
call-reusable-workflow:
11+
# @main 은 .github 레포지토리의 main 브랜치를 사용한다는 의미입니다. 버전을 위해 @v1과 같이 태그를 사용하는 것을 권장합니다.
12+
uses: 33-Auto/.github/.github/workflows/reusable-assign-issue-creator.yml@main
13+
# 이 워크플로우는 secrets를 전달할 필요가 없지만, 필요 시 아래와 같이 전달합니다.
14+
# secrets: inherit
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 각 레포지토리의 .github/workflows/close-issues-on-dev-merge.yml
2+
3+
name: Auto Close Issues on dev merge
4+
5+
on:
6+
pull_request:
7+
types: [closed]
8+
9+
jobs:
10+
call-reusable-workflow:
11+
if: >
12+
github.event.pull_request.merged == true &&
13+
github.event.pull_request.base.ref == 'dev'
14+
uses: 33-Auto/.github/.github/workflows/reusable-close-linked-issues.yml@main
15+
# with를 통해 재사용 워크플로우의 inputs에 값을 전달합니다.
16+
with:
17+
pr-body: ${{ github.event.pull_request.body }}
18+
issue-number: ${{ github.event.pull_request.number }}
19+
secrets: inherit # 재사용 워크플로우가 GITHUB_TOKEN을 사용할 수 있도록 전달

.github/workflows/pr-reminder.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
name: PR Reminder
1+
name: PR Reminder
22

3-
on:
4-
schedule:
5-
- cron: "0 0,5,8 * * *" # 아침 9시, 오후 2시, 오후 5시에 실행 (UTC 기준으로 설정해서 한국 시간에 맞춤)
6-
workflow_dispatch:
3+
on:
4+
schedule:
5+
- cron: "47 23,4,7,8,10 * * *" # 아침 8시 47분, 오후 2시 47분, 오후 4시 47분, 오후 5시 47분, 오후 7시 47분 에 실행 (UTC 기준으로 설정해서 한국 시간에 맞춤)
6+
workflow_dispatch:
77

8-
jobs:
9-
call-reusable-reminder:
10-
uses: 33-Auto/.github/.github/workflows/reusable-pr-reminder.yml@main
11-
secrets:
12-
# 해당 시크릿은 조직의 시크릿에 저장되어 있음
13-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
8+
jobs:
9+
call-reusable-reminder:
10+
uses: 33-Auto/.github/.github/workflows/reusable-pr-reminder.yml@main
11+
secrets:
12+
# 해당 시크릿은 조직의 시크릿에 저장되어 있음
13+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
14+
with:
15+
SLACK_USER_MAP: ${{ vars.SLACK_USER_MAP }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# 각 레포지토리의 .github/workflows/request-pr-review.yml
2+
3+
name: PR Assignee & Team Review Request
4+
5+
on:
6+
pull_request:
7+
types: [opened, reopened, ready_for_review]
8+
9+
jobs:
10+
call-reusable-workflow:
11+
uses: 33-Auto/.github/.github/workflows/reusable-pr-assign-and-review.yml@main
12+
with:
13+
team-slug-for-review: "review_avengers" # 여기에 리뷰를 요청할 팀의 slug를 입력합니다.
14+
pr-author: ${{ github.event.pull_request.user.login }}
15+
pr-number: ${{ github.event.pull_request.number }}
16+
secrets:
17+
ORGANIZATION_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }} # 재사용 워크플로우가 ORGANIZATION_TOKEN을 사용할 수 있도록 전달

app/build.gradle.kts

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import java.io.FileInputStream
22
import java.util.Properties
3+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
34

45
plugins {
56
alias(libs.plugins.android.application)
67
alias(libs.plugins.kotlin.android)
78
alias(libs.plugins.kotlin.compose)
9+
id("com.google.devtools.ksp")
10+
id("com.google.dagger.hilt.android")
811
}
912

1013
// Keystore.properties
@@ -27,10 +30,10 @@ android {
2730

2831
defaultConfig {
2932
applicationId = "com.sampoom.android"
30-
minSdk = 24
33+
minSdk = 26
3134
targetSdk = 36
32-
versionCode = 1
33-
versionName = "1.0"
35+
versionCode = 2
36+
versionName = "1.0.1"
3437

3538
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
3639
}
@@ -48,17 +51,51 @@ android {
4851
compileOptions {
4952
sourceCompatibility = JavaVersion.VERSION_11
5053
targetCompatibility = JavaVersion.VERSION_11
51-
}
52-
kotlinOptions {
53-
jvmTarget = "11"
54+
isCoreLibraryDesugaringEnabled = true
5455
}
5556
buildFeatures {
5657
compose = true
58+
buildConfig = true
59+
}
60+
}
61+
62+
// Kotlin compiler options migrated to Compiler Options DSL
63+
kotlin {
64+
compilerOptions {
65+
jvmTarget.set(JvmTarget.JVM_11)
5766
}
5867
}
5968

6069
dependencies {
70+
// hilt
71+
implementation(libs.hilt.android)
72+
ksp(libs.hilt.android.compiler)
73+
implementation(libs.androidx.hilt.lifecycle.viewmodel.compose)
74+
implementation(libs.androidx.hilt.navigation.compose)
75+
76+
// Navigation
77+
implementation(libs.androidx.navigation.compose)
78+
79+
// Retrofit
80+
implementation(libs.retrofit)
81+
implementation(libs.converter.gson)
82+
83+
// OKHttp
84+
implementation(libs.logging.interceptor)
85+
86+
// DataStore
87+
implementation(libs.androidx.datastore.preferences)
88+
89+
// Paging
90+
implementation(libs.androidx.paging.runtime)
91+
implementation(libs.androidx.paging.compose)
92+
93+
coreLibraryDesugaring(libs.desugar.jdk.libs)
6194

95+
implementation(libs.androidx.core.splashscreen)
96+
implementation(libs.androidx.material)
97+
implementation(libs.androidx.material.icons.core)
98+
implementation(libs.androidx.material.icons.extended)
6299
implementation(libs.androidx.core.ktx)
63100
implementation(libs.androidx.lifecycle.runtime.ktx)
64101
implementation(libs.androidx.activity.compose)

app/src/main/AndroidManifest.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,27 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools">
44

5+
<uses-permission android:name="android.permission.INTERNET"/>
6+
57
<application
8+
android:name=".app.Application"
69
android:allowBackup="true"
710
android:dataExtractionRules="@xml/data_extraction_rules"
811
android:fullBackupContent="@xml/backup_rules"
912
android:icon="@mipmap/ic_launcher"
1013
android:label="@string/app_name"
1114
android:roundIcon="@mipmap/ic_launcher_round"
1215
android:supportsRtl="true"
16+
android:usesCleartextTraffic="true"
1317
android:theme="@style/Theme.SampoomManagement">
18+
19+
<meta-data
20+
android:name="com.android.application.theme_icon"
21+
android:value="true" />
22+
1423
<activity
1524
android:name=".MainActivity"
1625
android:exported="true"
17-
android:label="@string/app_name"
1826
android:theme="@style/Theme.SampoomManagement">
1927
<intent-filter>
2028
<action android:name="android.intent.action.MAIN" />
7.57 KB
Loading
Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,38 @@
11
package com.sampoom.android
22

3+
import android.os.Build
34
import android.os.Bundle
45
import androidx.activity.ComponentActivity
6+
import androidx.activity.SystemBarStyle
57
import androidx.activity.compose.setContent
68
import androidx.activity.enableEdgeToEdge
7-
import androidx.compose.foundation.layout.fillMaxSize
8-
import androidx.compose.foundation.layout.padding
9-
import androidx.compose.material3.Scaffold
10-
import androidx.compose.material3.Text
11-
import androidx.compose.runtime.Composable
12-
import androidx.compose.ui.Modifier
13-
import androidx.compose.ui.tooling.preview.Preview
14-
import com.sampoom.android.ui.theme.SampoomManagementTheme
9+
import androidx.compose.ui.graphics.Color
10+
import androidx.compose.ui.graphics.toArgb
11+
import com.sampoom.android.app.navigation.AppNavHost
12+
import com.sampoom.android.core.ui.theme.SampoomManagementTheme
13+
import dagger.hilt.android.AndroidEntryPoint
1514

15+
@AndroidEntryPoint
1616
class MainActivity : ComponentActivity() {
1717
override fun onCreate(savedInstanceState: Bundle?) {
1818
super.onCreate(savedInstanceState)
19-
enableEdgeToEdge()
19+
enableEdgeToEdge(
20+
statusBarStyle = SystemBarStyle.auto(
21+
lightScrim = Color.Transparent.toArgb(),
22+
darkScrim = Color.Transparent.toArgb()
23+
),
24+
navigationBarStyle = SystemBarStyle.auto(
25+
lightScrim = Color.Transparent.toArgb(),
26+
darkScrim = Color.Transparent.toArgb()
27+
)
28+
)
29+
if (Build.VERSION.SDK_INT >= 29) {
30+
window.isNavigationBarContrastEnforced = false
31+
}
2032
setContent {
2133
SampoomManagementTheme {
22-
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
23-
Greeting(
24-
name = "Android",
25-
modifier = Modifier.padding(innerPadding)
26-
)
27-
}
34+
AppNavHost()
2835
}
2936
}
3037
}
31-
}
32-
33-
@Composable
34-
fun Greeting(name: String, modifier: Modifier = Modifier) {
35-
Text(
36-
text = "Hello $name!",
37-
modifier = modifier
38-
)
39-
}
40-
41-
@Preview(showBackground = true)
42-
@Composable
43-
fun GreetingPreview() {
44-
SampoomManagementTheme {
45-
Greeting("Android")
46-
}
4738
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.sampoom.android
2+
3+
import androidx.lifecycle.ViewModel
4+
import androidx.lifecycle.viewModelScope
5+
import com.sampoom.android.core.util.GlobalMessageHandler
6+
import com.sampoom.android.feature.auth.domain.model.User
7+
import com.sampoom.android.feature.auth.domain.usecase.GetStoredUserUseCase
8+
import dagger.hilt.android.lifecycle.HiltViewModel
9+
import kotlinx.coroutines.flow.MutableStateFlow
10+
import kotlinx.coroutines.flow.StateFlow
11+
import kotlinx.coroutines.launch
12+
import javax.inject.Inject
13+
14+
@HiltViewModel
15+
class MainActivityViewModel @Inject constructor(
16+
val messageHandler: GlobalMessageHandler,
17+
private val getStoredUserUseCase: GetStoredUserUseCase
18+
) : ViewModel() {
19+
private val _user = MutableStateFlow<User?>(null)
20+
val user: StateFlow<User?> = _user
21+
22+
init {
23+
viewModelScope.launch {
24+
_user.value = getStoredUserUseCase()
25+
}
26+
}
27+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.sampoom.android.app
2+
3+
import android.app.Application
4+
import dagger.hilt.android.HiltAndroidApp
5+
6+
@HiltAndroidApp
7+
class Application : Application()

0 commit comments

Comments
 (0)