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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
.externalNativeBuild
.cxx
local.properties
keystore.properties
*.jks
*.keystore
**/signing/

# Android ํ•˜์œ„ ๋ชจ๋“ˆ ๋นŒ๋“œ ์‚ฐ์ถœ๋ฌผ
**/app/build/
Expand Down
19 changes: 19 additions & 0 deletions Week10/LinLin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
keystore.properties
*.jks
*.keystore
signing/
58 changes: 58 additions & 0 deletions Week10/LinLin/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# ํ”„๋กœ์ ํŠธ ๊ฐœ์š”

UMC 10์ฃผ์ฐจ Nike ์Šคํƒ€์ผ **๋งˆ์ดํŽ˜์ด์ง€** Android ์•ฑ์ž…๋‹ˆ๋‹ค.
9์ฃผ์ฐจ์—์„œ ๊ตฌํ˜„ํ•œ Jetpack Compose UI(ํ”„๋กœํ•„, ํŒ”๋กœ์ž‰ HorizontalPager, ModalBottomSheet)๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ, 10์ฃผ์ฐจ์—์„œ๋Š” **Play Store ๋ฐฐํฌ์šฉ AAB ๋นŒ๋“œ**์™€ **AI ๊ฐœ๋ฐœ ์›Œํฌํ”Œ๋กœ์šฐ**๋ฅผ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.

# ์•„ํ‚คํ…์ฒ˜

์‹ค๋ฌดํ˜• Clean Architecture์˜ ์ถ•์†Œ ๋ฒ„์ „์„ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค.

- **data**: `NetworkClient`, Retrofit `ReqResService`, `UserRepository`, DTO(`UserData`)
- **ui/mypage**: `MyPageViewModel`, `MyPageScreen` ๋ฐ ํ•˜์œ„ Composable
- **ui/theme**: Material3 ํ…Œ๋งˆ

์˜์กด์„ฑ ๋ฐฉํ–ฅ: `ui` โ†’ `data` (domain ๋ ˆ์ด์–ด๋Š” ๋ฏธ์…˜ ๋ฒ”์œ„์—์„œ ์ƒ๋žต)

# ๊ธฐ์ˆ  ์Šคํƒ

- UI: Jetpack Compose (Material3), HorizontalPager, ModalBottomSheet
- ์ƒํƒœ ๊ด€๋ฆฌ: ViewModel + `StateFlow` + `collectAsStateWithLifecycle`
- ๋„คํŠธ์›Œํฌ: Retrofit2 + OkHttp3 + Gson (ReqRes API)
- ์ด๋ฏธ์ง€: Coil Compose
- ๋น„๋™๊ธฐ: Kotlin Coroutines (`async` ๋ณ‘๋ ฌ ํ˜ธ์ถœ)
- ๋นŒ๋“œ: AGP 9.x, release AAB ์„œ๋ช… (`keystore.properties`)

# ์ฝ”๋“œ ์ปจ๋ฒค์…˜

- ViewModel UI ์ƒํƒœ๋Š” **sealed interface**๋กœ ๊ด€๋ฆฌ (`Loading` / `Success` / `Error`)
- Composable ํ•จ์ˆ˜๋ช…์€ PascalCase, ํŒŒ์ผ๋ช…๊ณผ ์ผ์น˜
- Repository๋Š” `suspend` + `Result<T>` (`runCatching`) ํŒจํ„ด
- API ํ‚คยทKeystore ์ •๋ณด๋Š” `local.properties` / `keystore.properties`์—๋งŒ ๋‘๊ณ  Git์— ์˜ฌ๋ฆฌ์ง€ ์•Š์Œ
- ๋ฆด๋ฆฌ์ฆˆ ๋นŒ๋“œ์—์„œ๋Š” OkHttp ๋กœ๊น… ๋น„ํ™œ์„ฑํ™” (`BuildConfig.DEBUG` ๊ธฐ์ค€)

# ๋นŒ๋“œ & ๋ฐฐํฌ

```bash
# Windows (ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ Week10)
.\gradlew.bat bundleRelease
```

AAB ์ถœ๋ ฅ ๊ฒฝ๋กœ:

```
app/build/outputs/bundle/release/app-release.aab
```

# ์ฃผ์˜์‚ฌํ•ญ

- `*.jks`, `keystore.properties`, `local.properties`, `signing/` ๋””๋ ‰ํ„ฐ๋ฆฌ๋Š” **์ ˆ๋Œ€ ์ปค๋ฐ‹ํ•˜์ง€ ๋ง ๊ฒƒ**
- Keystore ๋ถ„์‹ค ์‹œ ๋™์ผ ์•ฑ ์—…๋ฐ์ดํŠธ ๋ถˆ๊ฐ€ โ€” ์•ˆ์ „ํ•œ ๋กœ์ปฌ/ํด๋ผ์šฐ๋“œ ๋ฐฑ์—… ํ•„์ˆ˜
- ๋ฏธ์…˜ ๋ธŒ๋žœ์น˜: `feature/week10-{๊ธฐ๋Šฅ๋ช…}` ๊ถŒ์žฅ
- Play Store ์—…๋กœ๋“œ๋Š” **AAB**๋งŒ ์‚ฌ์šฉ (APK๋Š” ์‚ฌ์ด๋“œ๋กœ๋”ฉยทํ…Œ์ŠคํŠธ์šฉ)

# AI ํ˜‘์—… ์›์น™ (Harness Engineering)

- ๋ถˆํ™•์‹คํ•˜๋ฉด ์ถ”์ธกํ•˜์ง€ ๋ง๊ณ  ํ™•์ธํ•  ๊ฒƒ
- ์š”์ฒญ ๋ฒ”์œ„๋งŒ ์ตœ์†Œ ๋ณ€๊ฒฝ์œผ๋กœ ๊ตฌํ˜„ํ•  ๊ฒƒ
- ๊ด€๋ จ ์—†๋Š” ํŒŒ์ผ์€ ์ˆ˜์ •ํ•˜์ง€ ๋ง ๊ฒƒ
- ์ƒˆ ํ™”๋ฉด ์ถ”๊ฐ€ ์‹œ Manifestยท๋„ค๋น„๊ฒŒ์ด์…˜ยทViewModel ์ƒํƒœ ํŒจํ„ด์„ ํ•จ๊ป˜ ์ ๊ฒ€ํ•  ๊ฒƒ
29 changes: 29 additions & 0 deletions Week10/LinLin/RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 10์ฃผ์ฐจ ๋ฆด๋ฆฌ์ฆˆ AAB

## ๋นŒ๋“œ ๋ช…๋ น

```bash
.\gradlew.bat bundleRelease
```

## AAB ํŒŒ์ผ ๊ฒฝ๋กœ (PR์— ๊ธฐ์žฌ)

```
app/build/outputs/bundle/release/app-release.aab
```

## ์„œ๋ช… ์„ค์ •

1. `keystore.properties.example` โ†’ `keystore.properties` ๋ณต์‚ฌ ํ›„ ๊ฐ’ ์ž…๋ ฅ
2. Android Studio: **Build โ†’ Generate Signed App Bundle / APK** ๋กœ Keystore ์ƒ์„ฑ ๊ฐ€๋Šฅ
3. `local.properties`์— `REQRES_API_KEY` ์„ค์ •

## ์ฝ”๋“œ ๋ฆฌ๋ทฐ ๋ฐ˜์˜ ์‚ฌํ•ญ (Week10)

| ํ•ญ๋ชฉ | ๊ฐœ์„  ๋‚ด์šฉ |
| --- | --- |
| UiState | `data class` โ†’ `sealed interface` (Loading/Success/Error) |
| ์ƒ๋ช…์ฃผ๊ธฐ | `collectAsState` โ†’ `collectAsStateWithLifecycle` |
| ๋„คํŠธ์›Œํฌ | ํ”„๋กœํ•„ยทํŒ”๋กœ์ž‰ `async` ๋ณ‘๋ ฌ ๋กœ๋”ฉ |
| ๋ณด์•ˆ | API ํ‚ค๋ฅผ `BuildConfig` + `local.properties`๋กœ ๋ถ„๋ฆฌ |
| UX | ์—๋Ÿฌ ํ™”๋ฉด์— **๋‹ค์‹œ ์‹œ๋„** ๋ฒ„ํŠผ ์ถ”๊ฐ€ |
1 change: 1 addition & 0 deletions Week10/LinLin/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
102 changes: 102 additions & 0 deletions Week10/LinLin/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
๏ปฟimport java.util.Properties

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.compose)
}

val localProperties = Properties().apply {
val file = rootProject.file("local.properties")
if (file.exists()) {
load(file.inputStream())
}
}

val keystoreProperties = Properties().apply {
val file = rootProject.file("keystore.properties")
if (file.exists()) {
load(file.inputStream())
}
}

android {
namespace = "com.example.week10"
compileSdk {
version = release(36) {
minorApiLevel = 1
}
}

defaultConfig {
applicationId = "com.example.week10"
minSdk = 24
targetSdk = 36
versionCode = 1
versionName = "1.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

buildConfigField(
"String",
"REQRES_API_KEY",
"\"${localProperties.getProperty("REQRES_API_KEY", "")}\"",
)
}

signingConfigs {
create("release") {
val storeFilePath = keystoreProperties.getProperty("storeFile") ?: return@create
storeFile = rootProject.file(storeFilePath)
storePassword = keystoreProperties.getProperty("storePassword")
keyAlias = keystoreProperties.getProperty("keyAlias")
keyPassword = keystoreProperties.getProperty("keyPassword")
}
}

buildTypes {
release {
isMinifyEnabled = false
signingConfig = signingConfigs.getByName("release")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
buildFeatures {
compose = true
buildConfig = true
}
}

dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.lifecycle.viewmodel.ktx)
implementation(libs.androidx.lifecycle.viewmodel.compose)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.androidx.activity.compose)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.graphics)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.foundation)
implementation(libs.coil.compose)
implementation(libs.retrofit)
implementation(libs.retrofit.converter.gson)
implementation(libs.okhttp.logging)
implementation(libs.gson)
implementation(libs.kotlinx.coroutines.android)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
debugImplementation(libs.androidx.compose.ui.tooling)
debugImplementation(libs.androidx.compose.ui.test.manifest)
}
21 changes: 21 additions & 0 deletions Week10/LinLin/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
๏ปฟpackage com.example.week10

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.example.week10", appContext.packageName)
}
}
29 changes: 29 additions & 0 deletions Week10/LinLin/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
๏ปฟ<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Week10">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.Week10">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
28 changes: 28 additions & 0 deletions Week10/LinLin/app/src/main/java/com/example/week10/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
๏ปฟpackage com.example.week10

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Scaffold
import androidx.compose.ui.Modifier
import com.example.week10.ui.mypage.MyPageScreen
import com.example.week10.ui.theme.Week10Theme

class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
Week10Theme {
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
MyPageScreen(
modifier = Modifier.padding(innerPadding),
)
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
๏ปฟpackage com.example.week10.data

import com.example.week10.BuildConfig
import com.example.week10.data.remote.ReqResService
import okhttp3.Interceptor
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import java.util.concurrent.TimeUnit

object NetworkClient {

private const val BASE_URL = "https://reqres.in/"

val reqResService: ReqResService by lazy {
val logging = HttpLoggingInterceptor().apply {
level = if (BuildConfig.DEBUG) {
HttpLoggingInterceptor.Level.BODY
} else {
HttpLoggingInterceptor.Level.NONE
}
}

val authInterceptor = Interceptor { chain ->
val request = chain.request().newBuilder()
.addHeader("x-api-key", BuildConfig.REQRES_API_KEY)
.build()
chain.proceed(request)
}

val client = OkHttpClient.Builder()
.addInterceptor(logging)
.addInterceptor(authInterceptor)
.connectTimeout(30, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS)
.writeTimeout(30, TimeUnit.SECONDS)
.build()

Retrofit.Builder()
.baseUrl(BASE_URL)
.client(client)
.addConverterFactory(GsonConverterFactory.create())
.build()
.create(ReqResService::class.java)
}
}
Loading