File tree Expand file tree Collapse file tree 11 files changed +141
-29
lines changed
build-logic/convention/src/main/kotlin/com/twix/convention Expand file tree Collapse file tree 11 files changed +141
-29
lines changed Original file line number Diff line number Diff line change 77 android : icon =" @mipmap/ic_launcher"
88 android : label =" @string/app_name"
99 android : roundIcon =" @mipmap/ic_launcher_round"
10- android : supportsRtl =" true" >
10+ android : supportsRtl =" true"
11+ android : theme =" @style/Theme.Twix" >
12+
13+ <activity
14+ android : name =" .main.MainActivity"
15+ android : exported =" true" >
16+
17+ <intent-filter >
18+ <action android : name =" android.intent.action.MAIN" />
19+ <category android : name =" android.intent.category.LAUNCHER" />
20+ </intent-filter >
21+ </activity >
1122 </application >
1223</manifest >
Original file line number Diff line number Diff line change 11package com.yapp.twix
22
33import android.app.Application
4- import org.koin.android.ext.koin.androidContext
5- import org.koin.core.context.startKoin
4+ import com.yapp.twix.di.initKoin
65
76class TwixApplication : Application () {
87 override fun onCreate () {
98 super .onCreate()
109
11- startKoin {
12- androidContext(this @TwixApplication)
13- modules()
14- }
10+ initKoin(
11+ context = this
12+ )
1513 }
1614}
Original file line number Diff line number Diff line change 1+ package com.yapp.twix.di
2+
3+ import com.twix.login.di.loginModule
4+ import org.koin.core.module.Module
5+
6+ val featureModules: List <Module > = listOf (
7+ loginModule
8+ )
Original file line number Diff line number Diff line change 1+ package com.yapp.twix.di
2+
3+ import android.content.Context
4+ import org.koin.android.ext.koin.androidContext
5+ import org.koin.core.context.startKoin
6+ import org.koin.core.module.Module
7+
8+ fun initKoin (
9+ context : Context ? = null,
10+ extraModules : List <Module > = emptyList()
11+ ) {
12+ startKoin {
13+ context?.let { androidContext(it) }
14+
15+ modules(
16+ buildList {
17+ addAll(extraModules)
18+ addAll(featureModules)
19+ }
20+ )
21+ }
22+ }
Original file line number Diff line number Diff line change 1+ package com.yapp.twix.main
2+
3+ import android.os.Bundle
4+ import androidx.activity.ComponentActivity
5+ import androidx.activity.compose.setContent
6+ import androidx.compose.foundation.layout.Box
7+ import androidx.compose.foundation.layout.fillMaxSize
8+ import androidx.compose.foundation.layout.safeContentPadding
9+ import androidx.compose.ui.Modifier
10+ import com.twix.navigation.AppNavHost
11+
12+ class MainActivity : ComponentActivity () {
13+ override fun onCreate (savedInstanceState : Bundle ? ) {
14+ super .onCreate(savedInstanceState)
15+
16+ setContent {
17+ // TODO: 디자인 시스템이 결정되면 테마 구현 및 적용
18+ Box (
19+ modifier = Modifier
20+ .safeContentPadding()
21+ .fillMaxSize()
22+ ) {
23+ AppNavHost ()
24+ }
25+ }
26+ }
27+ }
Original file line number Diff line number Diff line change @@ -6,14 +6,21 @@ import com.twix.convention.extension.configureAndroid
66import com.twix.convention.extension.implementation
77import com.twix.convention.extension.library
88import com.twix.convention.extension.libs
9+ import com.twix.convention.extension.version
10+ import org.gradle.kotlin.dsl.apply
911import org.gradle.kotlin.dsl.configure
1012import org.gradle.kotlin.dsl.dependencies
1113
1214class AndroidApplicationConventionPlugin : BuildLogicConventionPlugin ({
1315 applyPlugins("com.android.application", "org.jetbrains.kotlin.android")
16+ apply<AndroidComposeConventionPlugin >()
1417
1518 extensions.configure<ApplicationExtension > {
1619 configureAndroid(this)
20+
21+ defaultConfig {
22+ targetSdk = libs.version("targetSdk").requiredVersion.toInt()
23+ }
1724 }
1825
1926 dependencies {
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ package com.twix.login
2+
3+ import androidx.compose.foundation.layout.Box
4+ import androidx.compose.foundation.layout.fillMaxSize
5+ import androidx.compose.material3.Text
6+ import androidx.compose.runtime.Composable
7+ import androidx.compose.ui.Alignment
8+ import androidx.compose.ui.Modifier
9+
10+ @Composable
11+ fun LoginScreen () {
12+ LoginContent ()
13+ }
14+
15+ @Composable
16+ private fun LoginContent () {
17+ Box (
18+ modifier = Modifier .fillMaxSize(),
19+ contentAlignment = Alignment .Center
20+ ) {
21+ Text (" 임시 화면입니다." )
22+ }
23+ }
Original file line number Diff line number Diff line change 1+ package com.twix.login.di
2+
3+ import com.twix.login.navigation.LoginNavGraph
4+ import com.twix.navigation.NavRoutes
5+ import com.twix.navigation.base.NavGraphContributor
6+ import org.koin.core.qualifier.named
7+ import org.koin.dsl.module
8+
9+ val loginModule = module {
10+ single<NavGraphContributor >(named(NavRoutes .LoginGraph .route)) { LoginNavGraph }
11+ }
You can’t perform that action at this time.
0 commit comments