Skip to content
Merged
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
10 changes: 10 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ plugins {
android {
namespace = "com.giwon.aide"

buildFeatures {
buildConfig = true
}

buildTypes {
release {
optimization {
Expand All @@ -22,11 +26,17 @@ dependencies {
implementation(project(":feature:calendar"))
implementation(project(":feature:settings"))
implementation(project(":core:notification"))
implementation(project(":core:designsystem"))

implementation(libs.androidx.activity.compose)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.graphics)
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.navigation3.runtime)
implementation(libs.androidx.navigation3.ui)
implementation(libs.androidx.lifecycle.viewmodel.navigation3)
implementation(libs.timber)
debugImplementation(libs.leakcanary.android)
}
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:name=".AideApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
Expand All @@ -11,7 +12,7 @@
android:supportsRtl="true"
android:theme="@style/Theme.AideAndroid">
<activity
android:name=".MainActivity"
android:name=".ui.MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.AideAndroid"
Expand Down
17 changes: 17 additions & 0 deletions app/src/main/kotlin/com/giwon/aide/AideApplication.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.giwon.aide

import android.app.Application
import com.giwon.aide.BuildConfig.DEBUG
import dagger.hilt.android.HiltAndroidApp
import timber.log.Timber

@HiltAndroidApp
class AideApplication : Application() {

override fun onCreate() {
super.onCreate()
if (DEBUG) {
Timber.plant(Timber.DebugTree())
}
}
}
10 changes: 0 additions & 10 deletions app/src/main/kotlin/com/giwon/aide/HomeScreen.kt

This file was deleted.

47 changes: 0 additions & 47 deletions app/src/main/kotlin/com/giwon/aide/MainActivity.kt

This file was deleted.

67 changes: 67 additions & 0 deletions app/src/main/kotlin/com/giwon/aide/navigation/AideNavDisplay.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package com.giwon.aide.navigation

import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Icon
import androidx.compose.material3.NavigationBar
import androidx.compose.material3.NavigationBarItem
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.lifecycle.viewmodel.navigation3.rememberViewModelStoreNavEntryDecorator
import androidx.navigation3.runtime.entryProvider
import androidx.navigation3.runtime.rememberNavBackStack
import androidx.navigation3.runtime.rememberSaveableStateHolderNavEntryDecorator
import androidx.navigation3.ui.NavDisplay
import com.giwon.aide.feature.calendar.navigation.calendarEntry
import com.giwon.aide.feature.home.navigation.HomeKey
import com.giwon.aide.feature.home.navigation.homeEntry
import com.giwon.aide.feature.settings.navigation.settingsEntry
import kotlin.collections.listOf

@Composable
fun AideApp() {
val backStack = rememberNavBackStack(HomeKey)
val currentTab =
TopLevelDestination.entries.last { destination -> destination.key in backStack }

Scaffold(
bottomBar = {
NavigationBar {
TopLevelDestination.entries.forEach { destination ->
NavigationBarItem(
selected = destination == currentTab,
onClick = {
backStack.clear()
backStack.add(HomeKey)
if (destination.key != HomeKey) backStack.add(destination.key)
},
icon = {
Icon(
painterResource(destination.icon),
contentDescription = null
)
},
label = { Text(destination.label) },
)
}
}
}
) { innerPadding ->
NavDisplay(
backStack = backStack,
modifier = Modifier.padding(innerPadding),
onBack = { backStack.removeLastOrNull() },
entryDecorators = listOf(
rememberSaveableStateHolderNavEntryDecorator(),
rememberViewModelStoreNavEntryDecorator(),
),
entryProvider = entryProvider {
homeEntry()
calendarEntry()
settingsEntry()
}
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.giwon.aide.navigation

import androidx.annotation.DrawableRes
import androidx.navigation3.runtime.NavKey
import com.giwon.aide.core.designsystem.R.drawable
import com.giwon.aide.feature.calendar.navigation.CalendarKey
import com.giwon.aide.feature.home.navigation.HomeKey
import com.giwon.aide.feature.settings.navigation.SettingsKey

enum class TopLevelDestination(
val key: NavKey,
val label: String,
@DrawableRes val icon: Int,
) {
HOME(HomeKey, "홈", drawable.ic_home),
CALENDAR(CalendarKey, "캘린더", drawable.ic_calendar),
SETTINGS(SettingsKey, "설정", drawable.ic_settings)
}
32 changes: 32 additions & 0 deletions app/src/main/kotlin/com/giwon/aide/ui/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.giwon.aide.ui

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import com.giwon.aide.core.designsystem.theme.AideAndroidTheme
import com.giwon.aide.navigation.AideApp
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
AideAndroidTheme {
AideApp()
}
}
}
}

@Preview(showBackground = true)
@Composable
fun GreetingPreview() {
AideAndroidTheme {
AideApp()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ class AndroidFeatureConventionPlugin : Plugin<Project> {
pluginManager.apply("aide.android.compose")
pluginManager.apply("aide.android.hilt")
pluginManager.apply("aide.android.junit")
pluginManager.apply("org.jetbrains.kotlin.plugin.serialization")

dependencies {
add("implementation", project(":core:model"))
add("implementation", project(":core:data"))
add("implementation", project(":core:designsystem"))
add("implementation", libs.findLibrary("androidx-navigation3-runtime").get())
add("implementation", libs.findLibrary("kotlinx-serialization-core").get())
}
}
}
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ plugins {
alias(libs.plugins.hilt) apply false
alias(libs.plugins.room) apply false
alias(libs.plugins.android.junit5) apply false
alias(libs.plugins.kotlin.serialization) apply false
}
4 changes: 4 additions & 0 deletions core/designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ plugins {
alias(libs.plugins.aide.android.compose)
}

dependencies {
api(libs.androidx.compose.material3)
}

android {
namespace = "com.giwon.aide.core.designsystem"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.giwon.aide.ui.theme
package com.giwon.aide.core.designsystem.theme

import androidx.compose.ui.graphics.Color

Expand All @@ -8,4 +8,4 @@ val Pink80 = Color(0xFFEFB8C8)

val Purple40 = Color(0xFF6650a4)
val PurpleGrey40 = Color(0xFF625b71)
val Pink40 = Color(0xFF7D5260)
val Pink40 = Color(0xFF7D5260)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.giwon.aide.ui.theme
package com.giwon.aide.core.designsystem.theme

import android.os.Build
import androidx.compose.foundation.isSystemInDarkTheme
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.giwon.aide.ui.theme
package com.giwon.aide.core.designsystem.theme

import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle
Expand Down Expand Up @@ -31,4 +31,4 @@ val Typography = Typography(
letterSpacing = 0.5.sp
)
*/
)
)
20 changes: 20 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_calendar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!--
~ Copyright (C) 2026 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="960" android:viewportWidth="960" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M509,691Q480,662 480,620Q480,578 509,549Q538,520 580,520Q622,520 651,549Q680,578 680,620Q680,662 651,691Q622,720 580,720Q538,720 509,691ZM200,880Q167,880 143.5,856.5Q120,833 120,800L120,240Q120,207 143.5,183.5Q167,160 200,160L240,160L240,80L320,80L320,160L640,160L640,80L720,80L720,160L760,160Q793,160 816.5,183.5Q840,207 840,240L840,800Q840,833 816.5,856.5Q793,880 760,880L200,880ZM200,800L760,800Q760,800 760,800Q760,800 760,800L760,400L200,400L200,800Q200,800 200,800Q200,800 200,800ZM200,320L760,320L760,240Q760,240 760,240Q760,240 760,240L200,240Q200,240 200,240Q200,240 200,240L200,320ZM200,320L200,240Q200,240 200,240Q200,240 200,240L200,240Q200,240 200,240Q200,240 200,240L200,320Z"/>

</vector>
20 changes: 20 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_home.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!--
~ Copyright (C) 2026 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="960" android:viewportWidth="960" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M240,760L360,760L360,520L600,520L600,760L720,760L720,400L480,220L240,400L240,760ZM160,840L160,360L480,120L800,360L800,840L520,840L520,600L440,600L440,840L160,840ZM480,490L480,490L480,490L480,490L480,490L480,490L480,490L480,490L480,490Z"/>

</vector>
20 changes: 20 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!--
~ Copyright (C) 2026 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="960" android:viewportWidth="960" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M300,600L360,600L360,440L300,440L300,490L240,490L240,550L300,550L300,600ZM400,550L720,550L720,490L400,490L400,550ZM600,440L660,440L660,390L720,390L720,330L660,330L660,280L600,280L600,440ZM240,390L560,390L560,330L240,330L240,390ZM320,840L320,760L160,760Q127,760 103.5,736.5Q80,713 80,680L80,200Q80,167 103.5,143.5Q127,120 160,120L800,120Q833,120 856.5,143.5Q880,167 880,200L880,680Q880,713 856.5,736.5Q833,760 800,760L640,760L640,840L320,840ZM160,680L800,680Q800,680 800,680Q800,680 800,680L800,200Q800,200 800,200Q800,200 800,200L160,200Q160,200 160,200Q160,200 160,200L160,680Q160,680 160,680Q160,680 160,680ZM160,680Q160,680 160,680Q160,680 160,680L160,200Q160,200 160,200Q160,200 160,200L160,200Q160,200 160,200Q160,200 160,200L160,680Q160,680 160,680Q160,680 160,680Z"/>

</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.giwon.aide.feature.calendar

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier

@Composable
fun CalendarRoute() {
CalendarScreen()
}

@Composable
internal fun CalendarScreen(modifier: Modifier = Modifier) {
Box(modifier = modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
Text("캘린더")
}
}

Loading
Loading