diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 313b2e38..8f3d5316 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -10,7 +10,7 @@
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
- android:theme="@style/Bookkeeping">
+ android:theme="@style/Theme.Bookkeeping">
diff --git a/build.gradle.kts b/build.gradle.kts
index 51080d1b..6d04ed0c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -7,10 +7,5 @@ plugins {
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.hilt) apply false
- alias(libs.plugins.androidx.navigation.safeargs) apply false
alias(libs.plugins.sentry) apply false
}
-
-task("clean", Delete::class) {
- delete = setOf(rootProject.buildDir)
-}
diff --git a/common/build.gradle.kts b/common/build.gradle.kts
index 8eea0490..0322e94a 100644
--- a/common/build.gradle.kts
+++ b/common/build.gradle.kts
@@ -23,8 +23,6 @@ android {
dependencies {
implementation(libs.bundles.kotlin)
- implementation(libs.google.material)
- implementation(libs.glide)
implementation(libs.bundles.logging)
}
diff --git a/common/src/main/kotlin/ac/dnd/bookkeeping/android/common/BundleUtil.kt b/common/src/main/kotlin/ac/dnd/bookkeeping/android/common/BundleUtil.kt
deleted file mode 100644
index d4458653..00000000
--- a/common/src/main/kotlin/ac/dnd/bookkeeping/android/common/BundleUtil.kt
+++ /dev/null
@@ -1,73 +0,0 @@
-package ac.dnd.bookkeeping.android.common
-
-import android.os.Bundle
-import androidx.lifecycle.SavedStateHandle
-
-fun SavedStateHandle.getBundle(
- key: String
-): Bundle? {
- return get(key)
-}
-
-fun Bundle?.getBooleanOrDefault(
- key: String,
- defaultValue: Boolean? = null
-): Boolean {
- return (this?.getBoolean(key) ?: defaultValue).orFalse()
-}
-
-fun Bundle?.getByteOrDefault(
- key: String,
- defaultValue: Byte? = null
-): Byte {
- return (this?.getByte(key) ?: defaultValue).orZero()
-}
-
-fun Bundle?.getCharOrDefault(
- key: String,
- defaultValue: Char? = null
-): Char {
- return (this?.getChar(key) ?: defaultValue).orEmpty()
-}
-
-fun Bundle?.getDoubleOrDefault(
- key: String,
- defaultValue: Double? = null
-): Double {
- return (this?.getDouble(key) ?: defaultValue).orZero()
-}
-
-fun Bundle?.getFloatOrDefault(
- key: String,
- defaultValue: Float? = null
-): Float {
- return (this?.getFloat(key) ?: defaultValue).orZero()
-}
-
-fun Bundle?.getIntOrDefault(
- key: String,
- defaultValue: Int? = null
-): Int {
- return (this?.getInt(key) ?: defaultValue).orZero()
-}
-
-fun Bundle?.getLongOrDefault(
- key: String,
- defaultValue: Long? = null
-): Long {
- return (this?.getLong(key) ?: defaultValue).orZero()
-}
-
-fun Bundle?.getShortOrDefault(
- key: String,
- defaultValue: Short? = null
-): Short {
- return (this?.getShort(key) ?: defaultValue).orZero()
-}
-
-fun Bundle?.getStringOrDefault(
- key: String,
- defaultValue: String? = null
-): String {
- return (this?.getString(key) ?: defaultValue).orEmpty()
-}
diff --git a/data/src/main/res/values/theme.xml b/data/src/main/res/values/theme.xml
new file mode 100644
index 00000000..94a20b7a
--- /dev/null
+++ b/data/src/main/res/values/theme.xml
@@ -0,0 +1,8 @@
+
+
+
+
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 4df8cec0..635c57b6 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -17,26 +17,25 @@ coroutines = "1.7.3"
kotlinx-datetime = "0.5.0"
# Hilt
hilt = "2.47"
+hilt-compose = "1.1.0"
# AndroidX
androidx-core = "1.12.0"
-androidx-navigation = "2.7.6"
androidx-appcompat = "1.6.1"
-androidx-constraintlayout = "2.1.4"
-androidx-fragment = "1.6.2"
-androidx-lifecycle = "2.6.2"
androidx-room = "2.6.1"
androidx-paging = "3.1.1"
+androidx-compose = "1.5.4"
+androidx-compose-navigation = "2.7.0"
+androidx-compose-lifecycle = "2.7.0"
+androidx-compose-compiler = "1.5.7"
# Google
-google-material = "1.11.0"
-system-contoller = "0.20.1"
+google-system-contoller = "0.20.1"
# Network
ktor = "2.3.7"
kotlinx-serialization = "1.6.1"
# UI
-glide = "4.14.2"
+coil-compose = "1.3.2"
lottie = "5.2.0"
-shimmer = "0.5.0"
-rds = "0.3.0"
+holix-bottomsheet-compose = "1.3.1"
# Logging
timber = "5.0.1"
sentry = "7.1.0"
@@ -45,15 +44,6 @@ leakcanary = "2.12"
okhttp3-logging-interceptor = "4.9.1"
# Common
ted-permission = "3.3.0"
-# Compose
-androidx-compose = "1.4.3"
-compose-viewmodel = "2.7.0"
-compose-coil = "1.3.2"
-compose-livedata = "1.5.4"
-compose-navi = "2.7.0"
-compose-hiltnavi = "1.1.0"
-compose-bottomsheet = "1.3.1"
-compose-lifecycle = "2.7.0"
[libraries]
# Kotlin
@@ -64,15 +54,15 @@ kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.
# Hilt
hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" }
hilt-android-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hilt" }
+hilt-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "hilt-compose" }
# AndroidX Presentation
androidx-core = { module = "androidx.core:core-ktx", version.ref = "androidx-core" }
-androidx-navigation-fragment = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "androidx-navigation" }
-androidx-navigation-ui = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "androidx-navigation" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
-androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidx-constraintlayout" }
-androidx-fragment = { module = "androidx.fragment:fragment-ktx", version.ref = "androidx-fragment" }
-androidx-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle" }
-androidx-livedata = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "androidx-lifecycle" }
+androidx-compose-material = { module = "androidx.compose.material:material", version.ref = "androidx-compose" }
+androidx-compose-ui = { module = "androidx.compose.ui:ui", version.ref = "androidx-compose" }
+androidx-compose-ui-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "androidx-compose" }
+androidx-compose-navigation = { module = "androidx.navigation:navigation-compose", version.ref = "androidx-compose-navigation" }
+androidx-compose-lifecycle = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidx-compose-lifecycle" }
# AndroidX Data
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "androidx-room" }
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "androidx-room" }
@@ -80,8 +70,7 @@ androidx-room-coroutine = { module = "androidx.room:room-ktx", version.ref = "an
androidx-paging-runtime = { module = "androidx.paging:paging-runtime-ktx", version.ref = "androidx-paging" }
androidx-paging-common = { module = "androidx.paging:paging-common-ktx", version.ref = "androidx-paging" }
# Google
-google-material = { module = "com.google.android.material:material", version.ref = "google-material" }
-google-system-contoller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "system-contoller" }
+google-system-contoller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "google-system-contoller" }
# Network
ktor-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktor-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" }
@@ -91,32 +80,19 @@ ktor-kotlinx-serialization = { module = "io.ktor:ktor-serialization-kotlinx-json
ktor-auth = { module = "io.ktor:ktor-client-auth", version.ref = "ktor" }
kotlinx-serialization = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" }
# UI
-glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" }
-glide-ksp = { module = "com.github.bumptech.glide:ksp", version.ref = "glide" }
+coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil-compose" }
ted-permission = { module = "io.github.ParkSangGwon:tedpermission-coroutine", version.ref = "ted-permission" }
lottie = { module = "com.airbnb.android:lottie", version.ref = "lottie" }
-shimmer = { module = "com.facebook.shimmer:shimmer", version.ref = "shimmer" }
-rds = { module = "com.github.ajou4095:Ray-Design-System", version.ref = "rds" }
+holix-bottomsheet-compose = { module = "com.holix.android:bottomsheetdialog-compose", version.ref = "holix-bottomsheet-compose" }
# Logging
timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" }
sentry = { module = "io.sentry:sentry-android", version.ref = "sentry" }
# Debug
leakcanary = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakcanary" }
okhttp3-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp3-logging-interceptor" }
-# Compose
-compose-material = { module = "androidx.compose.material:material", version.ref = "androidx-compose" }
-compose-ui-ui = { module = "androidx.compose.ui:ui", version.ref = "androidx-compose" }
-compose-ui-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "androidx-compose" }
-compose-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "compose-viewmodel" }
-compose-navi = { module = "androidx.navigation:navigation-compose", version.ref = "compose-navi" }
-compose-hiltnavi = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "compose-hiltnavi" }
-compose-lifecycle = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "compose-lifecycle" }
-
-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "androidx-compose" }
-compose-ui-test = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "androidx-compose" }
-compose-bottomsheet = { module = "com.holix.android:bottomsheetdialog-compose", version.ref = "compose-bottomsheet" }
-compose-coil = { module = "io.coil-kt:coil-compose", version.ref = "compose-coil" }
-compose-livedata = { module = "androidx.compose.runtime:runtime-livedata", version.ref = "compose-livedata" }
+# Test
+androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "androidx-compose" }
+androidx-compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "androidx-compose" }
[plugins]
android-application = { id = "com.android.application", version.ref = "plugin-gradle" }
@@ -126,16 +102,13 @@ kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
-androidx-navigation-safeargs = { id = "androidx.navigation.safeargs", version.ref = "androidx-navigation" }
sentry = { id = "io.sentry.android.gradle", version.ref = "plugin-sentry" }
[bundles]
kotlin = ["kotlin", "kotlinx-coroutines-android", "kotlinx-coroutines-core", "kotlinx-datetime"]
androidx-data = ["androidx-room-runtime", "androidx-room-coroutine", "androidx-paging-runtime"]
-androidx-presentation = ["androidx-core", "androidx-appcompat", "androidx-constraintlayout", "androidx-fragment",
- "androidx-viewmodel", "androidx-livedata", "androidx-navigation-fragment", "androidx-navigation-ui",
- "compose-ui-ui", "compose-ui-preview", "compose-material", "compose-viewmodel",
- "compose-hiltnavi", "compose-navi", "compose-lifecycle"]
+androidx-presentation = ["androidx-core", "androidx-appcompat", "androidx-compose-material", "androidx-compose-ui",
+ "androidx-compose-ui-preview", "androidx-compose-navigation", "androidx-compose-lifecycle"]
network = ["ktor-core", "ktor-okhttp", "ktor-resources", "ktor-content-negotiation", "ktor-kotlinx-serialization",
"ktor-auth", "kotlinx-serialization"]
logging = ["timber", "sentry"]
diff --git a/presentation/build.gradle.kts b/presentation/build.gradle.kts
index d0e34044..22e77997 100644
--- a/presentation/build.gradle.kts
+++ b/presentation/build.gradle.kts
@@ -7,7 +7,6 @@ plugins {
kotlin("plugin.parcelize")
kotlin("android")
kotlin("kapt")
- id("androidx.navigation.safeargs.kotlin")
}
android {
@@ -46,7 +45,7 @@ android {
compose = true
}
composeOptions {
- kotlinCompilerExtensionVersion = "1.5.6"
+ kotlinCompilerExtensionVersion = libs.versions.androidx.compose.compiler.get()
}
}
@@ -57,28 +56,19 @@ dependencies {
implementation(libs.bundles.kotlin)
implementation(libs.hilt.android)
ksp(libs.hilt.android.compiler)
+ implementation(libs.hilt.compose)
implementation(libs.bundles.androidx.presentation)
- implementation(libs.google.material)
- implementation(libs.glide)
- ksp(libs.glide.ksp)
implementation(libs.lottie)
- implementation(libs.shimmer)
- implementation(libs.rds)
-
+ implementation(libs.coil.compose)
+ implementation(libs.holix.bottomsheet.compose)
+ implementation(libs.google.system.contoller)
implementation(libs.ted.permission)
implementation(libs.bundles.logging)
- debugImplementation(libs.compose.ui.tooling)
- debugImplementation(libs.compose.ui.test)
-
- implementation(libs.compose.bottomsheet)
- implementation(libs.compose.coil)
- implementation(libs.compose.livedata)
-
- implementation(libs.google.system.contoller)
-
+ debugImplementation(libs.androidx.compose.ui.tooling)
+ debugImplementation(libs.androidx.compose.ui.test.manifest)
}
fun getLocalProperty(propertyKey: String): String {
diff --git a/presentation/src/main/AndroidManifest.xml b/presentation/src/main/AndroidManifest.xml
index 6f2d9fea..589f0303 100644
--- a/presentation/src/main/AndroidManifest.xml
+++ b/presentation/src/main/AndroidManifest.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/presentation/src/main/kotlin/ac/dnd/bookkeeping/android/presentation/common/util/RecyclerViewUtil.kt b/presentation/src/main/kotlin/ac/dnd/bookkeeping/android/presentation/common/util/RecyclerViewUtil.kt
deleted file mode 100644
index c9fee9b6..00000000
--- a/presentation/src/main/kotlin/ac/dnd/bookkeeping/android/presentation/common/util/RecyclerViewUtil.kt
+++ /dev/null
@@ -1,10 +0,0 @@
-package ac.dnd.bookkeeping.android.presentation.common.util
-
-import androidx.databinding.BindingAdapter
-import androidx.recyclerview.widget.ListAdapter
-import androidx.recyclerview.widget.RecyclerView
-
-@BindingAdapter("listAdapter_item")
-fun RecyclerView.setListAdapterItem(items: List?) {
- (adapter as? ListAdapter)?.submitList(items)
-}
diff --git a/presentation/src/main/kotlin/ac/dnd/bookkeeping/android/presentation/common/util/TextViewUtil.kt b/presentation/src/main/kotlin/ac/dnd/bookkeeping/android/presentation/common/util/TextViewUtil.kt
deleted file mode 100644
index d2d8db51..00000000
--- a/presentation/src/main/kotlin/ac/dnd/bookkeeping/android/presentation/common/util/TextViewUtil.kt
+++ /dev/null
@@ -1,30 +0,0 @@
-package ac.dnd.bookkeeping.android.presentation.common.util
-
-import android.graphics.Paint
-import android.view.inputmethod.InputMethodManager
-import androidx.appcompat.widget.AppCompatEditText
-import androidx.appcompat.widget.AppCompatTextView
-import androidx.databinding.BindingAdapter
-
-
-@BindingAdapter("underline")
-fun AppCompatTextView.setUnderline(
- isUnderline: Boolean
-) {
- paintFlags = if (isUnderline) {
- paintFlags or Paint.UNDERLINE_TEXT_FLAG
- } else {
- paintFlags and Paint.UNDERLINE_TEXT_FLAG.inv()
- }
-}
-
-fun AppCompatEditText.showKeyboard() {
- requestFocus()
- context.getSystemService(InputMethodManager::class.java)
- ?.showSoftInput(this, InputMethodManager.SHOW_IMPLICIT)
-}
-
-fun AppCompatEditText.hideKeyboard() {
- context.getSystemService(InputMethodManager::class.java)
- ?.hideSoftInputFromWindow(windowToken, 0)
-}
diff --git a/presentation/src/main/kotlin/ac/dnd/bookkeeping/android/presentation/common/util/ViewUtil.kt b/presentation/src/main/kotlin/ac/dnd/bookkeeping/android/presentation/common/util/ViewUtil.kt
deleted file mode 100644
index f4f8482f..00000000
--- a/presentation/src/main/kotlin/ac/dnd/bookkeeping/android/presentation/common/util/ViewUtil.kt
+++ /dev/null
@@ -1,47 +0,0 @@
-package ac.dnd.bookkeeping.android.presentation.common.util
-
-import android.content.res.ColorStateList
-import android.content.res.TypedArray
-import android.graphics.drawable.Drawable
-import android.view.View
-import androidx.annotation.StyleableRes
-import androidx.core.content.res.getColorOrThrow
-import androidx.core.content.res.getColorStateListOrThrow
-import androidx.core.content.res.getDrawableOrThrow
-import androidx.core.view.isInvisible
-import androidx.databinding.BindingAdapter
-
-inline fun TypedArray.getColor(
- @StyleableRes index: Int,
- onSuccess: (Int) -> Unit
-) {
- if (hasValue(index)) {
- val value = getColorOrThrow(index)
- onSuccess(value)
- }
-}
-
-inline fun TypedArray.getColorStateList(
- @StyleableRes index: Int,
- onSuccess: (ColorStateList) -> Unit
-) {
- if (hasValue(index)) {
- val value = getColorStateListOrThrow(index)
- onSuccess(value)
- }
-}
-
-inline fun TypedArray.getDrawable(
- @StyleableRes index: Int,
- onSuccess: (Drawable) -> Unit
-) {
- if (hasValue(index)) {
- val value = getDrawableOrThrow(index)
- onSuccess(value)
- }
-}
-
-@BindingAdapter("visibleOrInvisible")
-fun View.setVisibleOrInvisible(isVisible: Boolean?) {
- this.isInvisible = (isVisible == false)
-}
diff --git a/presentation/src/main/res/drawable/ic_launcher.xml b/presentation/src/main/res/drawable/ic_launcher.xml
index 4e3b0d81..8147bf38 100644
--- a/presentation/src/main/res/drawable/ic_launcher.xml
+++ b/presentation/src/main/res/drawable/ic_launcher.xml
@@ -4,6 +4,6 @@
android:viewportWidth="20"
android:viewportHeight="20">
diff --git a/presentation/src/main/res/values/attrs.xml b/presentation/src/main/res/values/attrs.xml
deleted file mode 100644
index 545704f2..00000000
--- a/presentation/src/main/res/values/attrs.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/presentation/src/main/res/values/styles.xml b/presentation/src/main/res/values/styles.xml
deleted file mode 100644
index 3a090684..00000000
--- a/presentation/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/presentation/src/main/res/values/theme.xml b/presentation/src/main/res/values/theme.xml
deleted file mode 100644
index 7e890d18..00000000
--- a/presentation/src/main/res/values/theme.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-