diff --git a/app/build.gradle.kts b/app/build.gradle.kts index af81f1e..4da14fb 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,8 +1,10 @@ plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) - alias(libs.plugins.kotlin.compose) alias(libs.plugins.kotlin.serialization) + alias(libs.plugins.kotlin.compose) + alias(libs.plugins.ksp) + alias(libs.plugins.hilt) } android { @@ -41,25 +43,24 @@ android { } dependencies { + implementation(project(":data")) + implementation(project(":domain")) + implementation(project(":presentation")) - implementation(libs.androidx.core.ktx) - implementation(libs.androidx.lifecycle.runtime.ktx) implementation(libs.androidx.activity.compose) implementation(platform(libs.androidx.compose.bom)) - implementation(libs.androidx.ui) - implementation(libs.androidx.ui.graphics) - implementation(libs.androidx.ui.tooling.preview) - implementation(libs.androidx.material3) - implementation(libs.androidx.compose.navigation) + + implementation(libs.hilt) + ksp(libs.hilt.compiler) implementation(libs.kotlinx.serialization.json) - implementation (libs.androidx.lifecycle.viewmodel.compose) - implementation(libs.androidx.lifecycle.runtime.compose.android) + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.material) testImplementation(libs.junit) + androidTestImplementation(platform(libs.androidx.compose.bom)) androidTestImplementation(libs.androidx.junit) androidTestImplementation(libs.androidx.espresso.core) - androidTestImplementation(platform(libs.androidx.compose.bom)) - androidTestImplementation(libs.androidx.ui.test.junit4) debugImplementation(libs.androidx.ui.tooling) debugImplementation(libs.androidx.ui.test.manifest) } \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f46c106..a26048a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -14,7 +14,7 @@ android:theme="@style/Theme.ANDANDROID" tools:targetApi="31"> diff --git a/app/src/main/java/org/sopt/and/WavveApplication.kt b/app/src/main/java/org/sopt/and/WavveApplication.kt index cdd7ad1..9447c9b 100644 --- a/app/src/main/java/org/sopt/and/WavveApplication.kt +++ b/app/src/main/java/org/sopt/and/WavveApplication.kt @@ -1,8 +1,10 @@ package org.sopt.and import android.app.Application -import org.sopt.and.util.PreferenceUtil +import dagger.hilt.android.HiltAndroidApp +import org.sopt.and.presentation.util.PreferenceUtil +@HiltAndroidApp class WavveApplication: Application() { override fun onCreate() { diff --git a/app/src/main/java/org/sopt/and/my/model/MyState.kt b/app/src/main/java/org/sopt/and/my/model/MyState.kt deleted file mode 100644 index 5e17af5..0000000 --- a/app/src/main/java/org/sopt/and/my/model/MyState.kt +++ /dev/null @@ -1,7 +0,0 @@ -package org.sopt.and.my.model - -import org.sopt.and.util.KeyUtil.DEFAULT_STRING - -data class MyState( - val id: String = DEFAULT_STRING -) \ No newline at end of file diff --git a/app/src/main/java/org/sopt/and/sign/signin/model/SignInState.kt b/app/src/main/java/org/sopt/and/sign/signin/model/SignInState.kt deleted file mode 100644 index 63afed3..0000000 --- a/app/src/main/java/org/sopt/and/sign/signin/model/SignInState.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.sopt.and.sign.signin.model - -import org.sopt.and.util.KeyUtil.DEFAULT_STRING - -data class SignInState( - val id: String = DEFAULT_STRING, - val password: String = DEFAULT_STRING, -) diff --git a/app/src/main/java/org/sopt/and/sign/signup/model/SignUpState.kt b/app/src/main/java/org/sopt/and/sign/signup/model/SignUpState.kt deleted file mode 100644 index 6e6a3a7..0000000 --- a/app/src/main/java/org/sopt/and/sign/signup/model/SignUpState.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.sopt.and.sign.signup.model - -import org.sopt.and.util.KeyUtil.DEFAULT_STRING - -data class SignUpState( - val id: String = DEFAULT_STRING, - val password: String = DEFAULT_STRING -) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2f55412..9f59c14 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,75 +1,3 @@ AND-ANDROID - - hide - show - 닫기 - 정보 - 이동 - 알림 - 설정 - 로고 이미지 - 네이버 - 카카오 - 티월드 - 페이스북 - 애플 - 캐스트 - 라이브 - - - 검색 - MY - - 뉴클래식 - 드라마 - 예능 - 영화 - 애니메이션 - 해외시리즈 - 시사교양 - 키즈 - 홈배너 이미지 - %s | %s - - 회원가입 - 이메일과 비밀번호만으로\nWavve를 즐길 수 있어요! - wavve@example.com - 로그인, 비밀번호 찾기, 알림에 사용되니 정확한 이메일을 입력해주세요. - Wavve 비밀번호 설정 - 비밀번호는 8~20자 이내로 영문 대소문자, 숫자, 특수문자 중 3가지 이상 혼용하여 입력해 주세요. - 또는 다른 서비스 계정으로 가입 - "SNS계정을 간편하게 가입하여 서비스를 이용하실 수 있습니다. 기\n존 POOQ 계정 또는 Wavve 계정과는 연동되지 않으니 이용에 참고\n하세요." - wavve 회원가입 - 회원가입을 완료했습니다. - 이메일 형식이 올바르지 않습니다. - 비밀번호 형식이 올바르지 않습니다. - 회원가입이 실패했습니다. - - 이메일 주소 또는 아이디 - 비밀번호 - 로그인 - 아이디 찾기 - 비밀번호 재설정 - 회원가입 - | - 또는 다른 서비스 계정으로 가입 - "SNS계정을 간편하게 가입하여 서비스를 이용하실 수 있습니다. 기\n존 POOQ 계정 또는 Wavve 계정과는 연동되지 않으니 이용에 참고하세요." - 로그인에 성공했습니다. - 아이디 또는 비밀번호가 일치하지 않습니다. - "SNS계정을 간편하게 가입하여 서비스를 이용하실 수 있습니다.\n\t기존 POOQ 계정 또는 Wavve 계정과는 연동되지 않으니 이용에 참고하세요." - - 내 프로필 이미지 - 구매하기 - 첫 결제 시 첫 달 100원! - 현재 보유하신 이용권이 없습니다. - 전체 시청 내역 - 시청 내역이 없어요. - 관심 프로그램 - 관심 프로그램이 없어요. - 이메일을 불러올 수 없습니다. - 오류로 인해 데이터를 불러올 수 없습니다. - 로그아웃 - 로그아웃을 성공했습니다 - \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 5ba8ae0..aabec43 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,4 +4,9 @@ plugins { alias(libs.plugins.kotlin.android) apply false alias(libs.plugins.kotlin.compose) apply false alias(libs.plugins.kotlin.serialization) apply false + alias(libs.plugins.jetbrains.kotlin.jvm) apply false + alias(libs.plugins.android.library) apply false + alias(libs.plugins.hilt) apply false + alias(libs.plugins.ksp) apply false + } \ No newline at end of file diff --git a/data/.gitignore b/data/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/data/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/data/build.gradle.kts b/data/build.gradle.kts new file mode 100644 index 0000000..b458b79 --- /dev/null +++ b/data/build.gradle.kts @@ -0,0 +1,51 @@ +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.serialization) + alias(libs.plugins.ksp) + alias(libs.plugins.hilt) +} + +android { + namespace = "org.sopt.and.data" + compileSdk = 34 + + defaultConfig { + minSdk = 24 + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.material) + + implementation(libs.hilt) + ksp(libs.hilt.compiler) + implementation(libs.kotlinx.serialization.json) + + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) +} \ No newline at end of file diff --git a/data/consumer-rules.pro b/data/consumer-rules.pro new file mode 100644 index 0000000..e69de29 diff --git a/data/proguard-rules.pro b/data/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/data/proguard-rules.pro @@ -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 \ No newline at end of file diff --git a/data/src/androidTest/java/org/sopt/and/data/ExampleInstrumentedTest.kt b/data/src/androidTest/java/org/sopt/and/data/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..245e714 --- /dev/null +++ b/data/src/androidTest/java/org/sopt/and/data/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package org.sopt.and.data + +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("org.sopt.and.data.test", appContext.packageName) + } +} \ No newline at end of file diff --git a/data/src/main/AndroidManifest.xml b/data/src/main/AndroidManifest.xml new file mode 100644 index 0000000..a5918e6 --- /dev/null +++ b/data/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/data/src/test/java/org/sopt/and/data/ExampleUnitTest.kt b/data/src/test/java/org/sopt/and/data/ExampleUnitTest.kt new file mode 100644 index 0000000..dd54880 --- /dev/null +++ b/data/src/test/java/org/sopt/and/data/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package org.sopt.and.data + +import org.junit.Test + +import org.junit.Assert.* + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} \ No newline at end of file diff --git a/domain/.gitignore b/domain/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/domain/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/domain/build.gradle.kts b/domain/build.gradle.kts new file mode 100644 index 0000000..a8c8c10 --- /dev/null +++ b/domain/build.gradle.kts @@ -0,0 +1,9 @@ +plugins { + id("java-library") + alias(libs.plugins.jetbrains.kotlin.jvm) +} + +java { + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 +} \ No newline at end of file diff --git a/domain/src/main/java/org/sopt/and/domain/MyClass.kt b/domain/src/main/java/org/sopt/and/domain/MyClass.kt new file mode 100644 index 0000000..e546607 --- /dev/null +++ b/domain/src/main/java/org/sopt/and/domain/MyClass.kt @@ -0,0 +1,4 @@ +package org.sopt.and.domain + +class MyClass { +} \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d31e3da..174977c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,6 +11,13 @@ composeBom = "2024.04.01" androidxComposeNavigation = "2.8.2" kotlinxSerializationJson = "1.7.3" lifecycleRuntimeComposeAndroid = "2.8.2" +hilt = "2.52" +hiltCompose = "1.2.0" +hiltNavigationCompose = "1.2.0" +jetbrainsKotlinJvm = "2.0.0" +appcompat = "1.7.0" +material = "1.12.0" +ksp = "2.0.0-1.0.21" [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } @@ -31,9 +38,19 @@ androidx-compose-navigation = { group = "androidx.navigation", name = "navigatio kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" } androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "lifecycleRuntimeKtx" } androidx-lifecycle-runtime-compose-android = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose-android", version.ref = "lifecycleRuntimeComposeAndroid" } +hilt = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" } +hilt-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", version.ref = "hilt" } +hilt-compose = { group = "androidx.hilt", name = "hilt-navigation-compose", version.ref = "hiltCompose" } +hilt-navigation-compose = { group = "androidx.hilt", name = "hilt-navigation-compose", version.ref = "hiltNavigationCompose" } +androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } +material = { group = "com.google.android.material", name = "material", version.ref = "material" } [plugins] android-application = { id = "com.android.application", version.ref = "agp" } kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } -kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } \ No newline at end of file +kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } +ksp = {id = "com.google.devtools.ksp", version.ref = "ksp"} +jetbrains-kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "jetbrainsKotlinJvm" } +android-library = { id = "com.android.library", version.ref = "agp" } diff --git a/presentation/.gitignore b/presentation/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/presentation/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/presentation/build.gradle.kts b/presentation/build.gradle.kts new file mode 100644 index 0000000..02afee9 --- /dev/null +++ b/presentation/build.gradle.kts @@ -0,0 +1,69 @@ +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.compose) + alias(libs.plugins.kotlin.serialization) + alias(libs.plugins.ksp) + alias(libs.plugins.hilt) +} + +android { + namespace = "org.sopt.and.presentation" + compileSdk = 34 + + defaultConfig { + minSdk = 24 + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + + implementation(project(":domain")) + + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.material) + implementation(libs.androidx.lifecycle.runtime.ktx) + implementation(libs.androidx.activity.compose) + implementation(platform(libs.androidx.compose.bom)) + implementation(libs.androidx.ui) + implementation(libs.androidx.ui.graphics) + implementation(libs.androidx.ui.tooling.preview) + implementation(libs.androidx.material3) + implementation(libs.androidx.compose.navigation) + implementation(libs.kotlinx.serialization.json) + implementation (libs.androidx.lifecycle.viewmodel.compose) + implementation(libs.androidx.lifecycle.runtime.compose.android) + + implementation(libs.hilt) + ksp(libs.hilt.compiler) + implementation(libs.hilt.navigation.compose) + + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) + androidTestImplementation(platform(libs.androidx.compose.bom)) + androidTestImplementation(libs.androidx.ui.test.junit4) + debugImplementation(libs.androidx.ui.tooling) + debugImplementation(libs.androidx.ui.test.manifest) +} \ No newline at end of file diff --git a/presentation/consumer-rules.pro b/presentation/consumer-rules.pro new file mode 100644 index 0000000..e69de29 diff --git a/presentation/proguard-rules.pro b/presentation/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/presentation/proguard-rules.pro @@ -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 \ No newline at end of file diff --git a/presentation/src/androidTest/java/org/sopt/and/presentation/ExampleInstrumentedTest.kt b/presentation/src/androidTest/java/org/sopt/and/presentation/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..5c62b65 --- /dev/null +++ b/presentation/src/androidTest/java/org/sopt/and/presentation/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package org.sopt.and.presentation + +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("org.sopt.and.presentation.test", appContext.packageName) + } +} \ No newline at end of file diff --git a/presentation/src/main/AndroidManifest.xml b/presentation/src/main/AndroidManifest.xml new file mode 100644 index 0000000..a5918e6 --- /dev/null +++ b/presentation/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/src/main/java/org/sopt/and/component/BackTopBar.kt b/presentation/src/main/java/org/sopt/and/presentation/component/BackTopBar.kt similarity index 92% rename from app/src/main/java/org/sopt/and/component/BackTopBar.kt rename to presentation/src/main/java/org/sopt/and/presentation/component/BackTopBar.kt index 4e7fad5..03413a8 100644 --- a/app/src/main/java/org/sopt/and/component/BackTopBar.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/component/BackTopBar.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.presentation.component import androidx.annotation.DrawableRes import androidx.compose.foundation.Image @@ -20,9 +20,9 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import org.sopt.and.R -import org.sopt.and.extension.noRippleClickable -import org.sopt.and.ui.theme.FirstGrey +import org.sopt.and.presentation.R +import org.sopt.and.presentation.extension.noRippleClickable +import org.sopt.and.presentation.ui.theme.FirstGrey @OptIn(ExperimentalMaterial3Api::class) @Composable diff --git a/app/src/main/java/org/sopt/and/component/CloseTopBar.kt b/presentation/src/main/java/org/sopt/and/presentation/component/CloseTopBar.kt similarity index 89% rename from app/src/main/java/org/sopt/and/component/CloseTopBar.kt rename to presentation/src/main/java/org/sopt/and/presentation/component/CloseTopBar.kt index 2e6b0a3..823aa46 100644 --- a/app/src/main/java/org/sopt/and/component/CloseTopBar.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/component/CloseTopBar.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.presentation.component import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding @@ -17,10 +17,10 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import org.sopt.and.R -import org.sopt.and.extension.noRippleClickable -import org.sopt.and.ui.theme.FirstGrey -import org.sopt.and.ui.theme.White +import org.sopt.and.presentation.R +import org.sopt.and.presentation.extension.noRippleClickable +import org.sopt.and.presentation.ui.theme.FirstGrey +import org.sopt.and.presentation.ui.theme.White @OptIn(ExperimentalMaterial3Api::class) @Composable diff --git a/app/src/main/java/org/sopt/and/component/ContentRow.kt b/presentation/src/main/java/org/sopt/and/presentation/component/ContentRow.kt similarity index 95% rename from app/src/main/java/org/sopt/and/component/ContentRow.kt rename to presentation/src/main/java/org/sopt/and/presentation/component/ContentRow.kt index 3ac2fc5..062740c 100644 --- a/app/src/main/java/org/sopt/and/component/ContentRow.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/component/ContentRow.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.presentation.component import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Arrangement @@ -27,9 +27,9 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import org.sopt.and.R -import org.sopt.and.extension.noRippleClickable -import org.sopt.and.ui.theme.White +import org.sopt.and.presentation.R +import org.sopt.and.presentation.extension.noRippleClickable +import org.sopt.and.presentation.ui.theme.White @Composable fun ContentRow( diff --git a/app/src/main/java/org/sopt/and/component/ContentsView.kt b/presentation/src/main/java/org/sopt/and/presentation/component/ContentsView.kt similarity index 91% rename from app/src/main/java/org/sopt/and/component/ContentsView.kt rename to presentation/src/main/java/org/sopt/and/presentation/component/ContentsView.kt index 3c4dc73..b1eeb67 100644 --- a/app/src/main/java/org/sopt/and/component/ContentsView.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/component/ContentsView.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.presentation.component import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer @@ -18,9 +18,9 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import org.sopt.and.R -import org.sopt.and.ui.theme.ThirdGrey -import org.sopt.and.ui.theme.White +import org.sopt.and.presentation.R +import org.sopt.and.presentation.ui.theme.ThirdGrey +import org.sopt.and.presentation.ui.theme.White @Composable fun ContentsView( diff --git a/app/src/main/java/org/sopt/and/component/DividerWithText.kt b/presentation/src/main/java/org/sopt/and/presentation/component/DividerWithText.kt similarity index 90% rename from app/src/main/java/org/sopt/and/component/DividerWithText.kt rename to presentation/src/main/java/org/sopt/and/presentation/component/DividerWithText.kt index 6821d42..2a72875 100644 --- a/app/src/main/java/org/sopt/and/component/DividerWithText.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/component/DividerWithText.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.presentation.component import androidx.compose.foundation.background import androidx.compose.foundation.layout.Row @@ -13,8 +13,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import org.sopt.and.ui.theme.SecondGrey -import org.sopt.and.ui.theme.ThirdGrey +import org.sopt.and.presentation.ui.theme.SecondGrey +import org.sopt.and.presentation.ui.theme.ThirdGrey @Composable fun DividerWithText( diff --git a/app/src/main/java/org/sopt/and/component/HorizontalBannerPager.kt b/presentation/src/main/java/org/sopt/and/presentation/component/HorizontalBannerPager.kt similarity index 96% rename from app/src/main/java/org/sopt/and/component/HorizontalBannerPager.kt rename to presentation/src/main/java/org/sopt/and/presentation/component/HorizontalBannerPager.kt index b398f21..1f6febd 100644 --- a/app/src/main/java/org/sopt/and/component/HorizontalBannerPager.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/component/HorizontalBannerPager.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.presentation.component import androidx.annotation.DrawableRes import androidx.compose.foundation.Image @@ -27,8 +27,8 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import kotlinx.coroutines.delay import kotlinx.coroutines.launch -import org.sopt.and.R -import org.sopt.and.ui.theme.FirstGrey +import org.sopt.and.presentation.R +import org.sopt.and.presentation.ui.theme.FirstGrey @Composable fun HorizontalBannerPager( diff --git a/app/src/main/java/org/sopt/and/component/InfoWithText.kt b/presentation/src/main/java/org/sopt/and/presentation/component/InfoWithText.kt similarity index 92% rename from app/src/main/java/org/sopt/and/component/InfoWithText.kt rename to presentation/src/main/java/org/sopt/and/presentation/component/InfoWithText.kt index 39ff622..d087da1 100644 --- a/app/src/main/java/org/sopt/and/component/InfoWithText.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/component/InfoWithText.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.presentation.component import androidx.annotation.StringRes import androidx.compose.foundation.layout.Row @@ -18,8 +18,8 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import org.sopt.and.R -import org.sopt.and.ui.theme.ThirdGrey +import org.sopt.and.presentation.R +import org.sopt.and.presentation.ui.theme.ThirdGrey @Composable fun InfoWithText( diff --git a/app/src/main/java/org/sopt/and/component/LogoTopBar.kt b/presentation/src/main/java/org/sopt/and/presentation/component/LogoTopBar.kt similarity index 89% rename from app/src/main/java/org/sopt/and/component/LogoTopBar.kt rename to presentation/src/main/java/org/sopt/and/presentation/component/LogoTopBar.kt index 5d374c0..a098fe6 100644 --- a/app/src/main/java/org/sopt/and/component/LogoTopBar.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/component/LogoTopBar.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.presentation.component import androidx.compose.foundation.Image import androidx.compose.foundation.layout.fillMaxWidth @@ -8,15 +8,14 @@ import androidx.compose.material3.TopAppBar import androidx.compose.material3.TopAppBarDefaults import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import org.sopt.and.R -import org.sopt.and.ui.theme.FirstGrey -import org.sopt.and.ui.theme.White +import org.sopt.and.presentation.R +import org.sopt.and.presentation.ui.theme.FirstGrey +import org.sopt.and.presentation.ui.theme.White @OptIn(ExperimentalMaterial3Api::class) @Composable diff --git a/app/src/main/java/org/sopt/and/component/OtherServiceIconRow.kt b/presentation/src/main/java/org/sopt/and/presentation/component/OtherServiceIconRow.kt similarity index 91% rename from app/src/main/java/org/sopt/and/component/OtherServiceIconRow.kt rename to presentation/src/main/java/org/sopt/and/presentation/component/OtherServiceIconRow.kt index ea96bfa..4bfb9c3 100644 --- a/app/src/main/java/org/sopt/and/component/OtherServiceIconRow.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/component/OtherServiceIconRow.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.presentation.component import androidx.compose.foundation.Image import androidx.compose.foundation.background @@ -16,12 +16,13 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import org.sopt.and.R -import org.sopt.and.ui.theme.FacebookColor -import org.sopt.and.ui.theme.KakaoColor -import org.sopt.and.ui.theme.NaverColor -import org.sopt.and.ui.theme.TworldColor -import org.sopt.and.ui.theme.White +import org.sopt.and.presentation.R +import org.sopt.and.presentation.ui.theme.FacebookColor +import org.sopt.and.presentation.ui.theme.KakaoColor +import org.sopt.and.presentation.ui.theme.NaverColor +import org.sopt.and.presentation.ui.theme.TworldColor +import org.sopt.and.presentation.ui.theme.White + @Composable fun OtherServiceIconRow( diff --git a/app/src/main/java/org/sopt/and/component/PairTextView.kt b/presentation/src/main/java/org/sopt/and/presentation/component/PairTextView.kt similarity index 91% rename from app/src/main/java/org/sopt/and/component/PairTextView.kt rename to presentation/src/main/java/org/sopt/and/presentation/component/PairTextView.kt index 749b940..8a5a2ad 100644 --- a/app/src/main/java/org/sopt/and/component/PairTextView.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/component/PairTextView.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.presentation.component import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -13,8 +13,8 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import org.sopt.and.R -import org.sopt.and.ui.theme.ThirdGrey +import org.sopt.and.presentation.R +import org.sopt.and.presentation.ui.theme.ThirdGrey @Composable fun PairTextView( diff --git a/app/src/main/java/org/sopt/and/component/RankContentRow.kt b/presentation/src/main/java/org/sopt/and/presentation/component/RankContentRow.kt similarity index 95% rename from app/src/main/java/org/sopt/and/component/RankContentRow.kt rename to presentation/src/main/java/org/sopt/and/presentation/component/RankContentRow.kt index f205862..05ee1e3 100644 --- a/app/src/main/java/org/sopt/and/component/RankContentRow.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/component/RankContentRow.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.presentation.component import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Arrangement @@ -28,9 +28,9 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import org.sopt.and.R -import org.sopt.and.extension.noRippleClickable -import org.sopt.and.ui.theme.White +import org.sopt.and.presentation.R +import org.sopt.and.presentation.extension.noRippleClickable +import org.sopt.and.presentation.ui.theme.White @Composable fun RankContentRow( diff --git a/app/src/main/java/org/sopt/and/component/TypeTabRow.kt b/presentation/src/main/java/org/sopt/and/presentation/component/TypeTabRow.kt similarity index 87% rename from app/src/main/java/org/sopt/and/component/TypeTabRow.kt rename to presentation/src/main/java/org/sopt/and/presentation/component/TypeTabRow.kt index 3864bcd..0a717f1 100644 --- a/app/src/main/java/org/sopt/and/component/TypeTabRow.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/component/TypeTabRow.kt @@ -1,8 +1,7 @@ -package org.sopt.and.component +package org.sopt.and.presentation.component import androidx.compose.foundation.horizontalScroll import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.RowScope import androidx.compose.foundation.layout.padding @@ -17,11 +16,11 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import org.sopt.and.extension.noRippleClickable -import org.sopt.and.home.HomeTabType -import org.sopt.and.ui.theme.FirstGrey -import org.sopt.and.ui.theme.ThirdGrey -import org.sopt.and.ui.theme.White +import org.sopt.and.presentation.extension.noRippleClickable +import org.sopt.and.presentation.home.HomeTabType +import org.sopt.and.presentation.ui.theme.FirstGrey +import org.sopt.and.presentation.ui.theme.ThirdGrey +import org.sopt.and.presentation.ui.theme.White @Composable fun TypeTabRow( diff --git a/app/src/main/java/org/sopt/and/component/WavveActionTextField.kt b/presentation/src/main/java/org/sopt/and/presentation/component/WavveActionTextField.kt similarity index 90% rename from app/src/main/java/org/sopt/and/component/WavveActionTextField.kt rename to presentation/src/main/java/org/sopt/and/presentation/component/WavveActionTextField.kt index dd48d62..23c889a 100644 --- a/app/src/main/java/org/sopt/and/component/WavveActionTextField.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/component/WavveActionTextField.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.presentation.component import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material3.Text @@ -13,9 +13,9 @@ import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.text.input.PasswordVisualTransformation import androidx.compose.ui.text.input.VisualTransformation import androidx.compose.ui.tooling.preview.Preview -import org.sopt.and.R -import org.sopt.and.extension.noRippleClickable -import org.sopt.and.ui.theme.White +import org.sopt.and.presentation.R +import org.sopt.and.presentation.extension.noRippleClickable +import org.sopt.and.presentation.ui.theme.White @Composable fun WavveActionTextField( diff --git a/app/src/main/java/org/sopt/and/component/WavveTextField.kt b/presentation/src/main/java/org/sopt/and/presentation/component/WavveTextField.kt similarity index 93% rename from app/src/main/java/org/sopt/and/component/WavveTextField.kt rename to presentation/src/main/java/org/sopt/and/presentation/component/WavveTextField.kt index e497d8b..04af48a 100644 --- a/app/src/main/java/org/sopt/and/component/WavveTextField.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/component/WavveTextField.kt @@ -1,4 +1,4 @@ -package org.sopt.and.component +package org.sopt.and.presentation.component import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -21,9 +21,9 @@ import androidx.compose.ui.text.input.VisualTransformation import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import org.sopt.and.ui.theme.SecondGrey -import org.sopt.and.ui.theme.ThirdGrey -import org.sopt.and.ui.theme.White +import org.sopt.and.presentation.ui.theme.SecondGrey +import org.sopt.and.presentation.ui.theme.ThirdGrey +import org.sopt.and.presentation.ui.theme.White @Composable fun WavveTextField( diff --git a/app/src/main/java/org/sopt/and/extension/NavHostControllerExt.kt b/presentation/src/main/java/org/sopt/and/presentation/extension/NavHostControllerExt.kt similarity index 70% rename from app/src/main/java/org/sopt/and/extension/NavHostControllerExt.kt rename to presentation/src/main/java/org/sopt/and/presentation/extension/NavHostControllerExt.kt index 50ac195..c84a6c8 100644 --- a/app/src/main/java/org/sopt/and/extension/NavHostControllerExt.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/extension/NavHostControllerExt.kt @@ -1,9 +1,9 @@ -package org.sopt.and.extension +package org.sopt.and.presentation.extension import androidx.navigation.NavHostController -import org.sopt.and.util.KeyUtil.DEFAULT_STRING -import org.sopt.and.util.KeyUtil.ID -import org.sopt.and.util.KeyUtil.PASSWORD +import org.sopt.and.presentation.util.KeyUtil.DEFAULT_STRING +import org.sopt.and.presentation.util.KeyUtil.ID +import org.sopt.and.presentation.util.KeyUtil.PASSWORD fun NavHostController.getId(): String = this.currentBackStackEntry?.savedStateHandle?.get(ID) ?: DEFAULT_STRING diff --git a/app/src/main/java/org/sopt/and/extension/noRippleClickableExt.kt b/presentation/src/main/java/org/sopt/and/presentation/extension/noRippleClickableExt.kt similarity index 93% rename from app/src/main/java/org/sopt/and/extension/noRippleClickableExt.kt rename to presentation/src/main/java/org/sopt/and/presentation/extension/noRippleClickableExt.kt index fafa981..45c9c33 100644 --- a/app/src/main/java/org/sopt/and/extension/noRippleClickableExt.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/extension/noRippleClickableExt.kt @@ -1,4 +1,4 @@ -package org.sopt.and.extension +package org.sopt.and.presentation.extension import android.annotation.SuppressLint import androidx.compose.foundation.clickable diff --git a/app/src/main/java/org/sopt/and/home/HomeScreen.kt b/presentation/src/main/java/org/sopt/and/presentation/home/HomeScreen.kt similarity index 83% rename from app/src/main/java/org/sopt/and/home/HomeScreen.kt rename to presentation/src/main/java/org/sopt/and/presentation/home/HomeScreen.kt index 118e24e..eca15d4 100644 --- a/app/src/main/java/org/sopt/and/home/HomeScreen.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/home/HomeScreen.kt @@ -1,4 +1,4 @@ -package org.sopt.and.home +package org.sopt.and.presentation.home import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.background @@ -17,23 +17,23 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle -import androidx.lifecycle.viewmodel.compose.viewModel -import org.sopt.and.R -import org.sopt.and.component.ContentRow -import org.sopt.and.component.HorizontalBannerPager -import org.sopt.and.component.LogoTopBar -import org.sopt.and.component.RankContentRow -import org.sopt.and.extension.noRippleClickable -import org.sopt.and.home.component.HomeTabRow -import org.sopt.and.home.viewmodel.HomeViewModel -import org.sopt.and.ui.theme.FirstGrey +import org.sopt.and.presentation.R +import org.sopt.and.presentation.component.ContentRow +import org.sopt.and.presentation.component.HorizontalBannerPager +import org.sopt.and.presentation.component.LogoTopBar +import org.sopt.and.presentation.component.RankContentRow +import org.sopt.and.presentation.extension.noRippleClickable +import org.sopt.and.presentation.home.component.HomeTabRow +import org.sopt.and.presentation.home.viewmodel.HomeViewModel +import org.sopt.and.presentation.ui.theme.FirstGrey @OptIn(ExperimentalFoundationApi::class) @Composable fun HomeScreen( modifier: Modifier = Modifier, - viewModel: HomeViewModel = viewModel() + viewModel: HomeViewModel = hiltViewModel() ){ val state by viewModel.state.collectAsStateWithLifecycle() diff --git a/app/src/main/java/org/sopt/and/home/HomeTabType.kt b/presentation/src/main/java/org/sopt/and/presentation/home/HomeTabType.kt similarity index 85% rename from app/src/main/java/org/sopt/and/home/HomeTabType.kt rename to presentation/src/main/java/org/sopt/and/presentation/home/HomeTabType.kt index 01734dd..8a45b25 100644 --- a/app/src/main/java/org/sopt/and/home/HomeTabType.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/home/HomeTabType.kt @@ -1,7 +1,7 @@ -package org.sopt.and.home +package org.sopt.and.presentation.home import androidx.annotation.StringRes -import org.sopt.and.R +import org.sopt.and.presentation.R enum class HomeTabType( @StringRes val titleRes: Int diff --git a/app/src/main/java/org/sopt/and/home/component/HomeTabRow.kt b/presentation/src/main/java/org/sopt/and/presentation/home/component/HomeTabRow.kt similarity index 80% rename from app/src/main/java/org/sopt/and/home/component/HomeTabRow.kt rename to presentation/src/main/java/org/sopt/and/presentation/home/component/HomeTabRow.kt index 26cefe2..9821331 100644 --- a/app/src/main/java/org/sopt/and/home/component/HomeTabRow.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/home/component/HomeTabRow.kt @@ -1,4 +1,4 @@ -package org.sopt.and.home.component +package org.sopt.and.presentation.home.component import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.wrapContentSize @@ -9,11 +9,11 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import org.sopt.and.component.TypeTabRow -import org.sopt.and.extension.noRippleClickable -import org.sopt.and.home.HomeTabType -import org.sopt.and.ui.theme.ThirdGrey -import org.sopt.and.ui.theme.White +import org.sopt.and.presentation.component.TypeTabRow +import org.sopt.and.presentation.extension.noRippleClickable +import org.sopt.and.presentation.home.HomeTabType +import org.sopt.and.presentation.ui.theme.ThirdGrey +import org.sopt.and.presentation.ui.theme.White @Composable fun HomeTabRow( diff --git a/app/src/main/java/org/sopt/and/home/model/HomeContent.kt b/presentation/src/main/java/org/sopt/and/presentation/home/model/HomeContent.kt similarity index 51% rename from app/src/main/java/org/sopt/and/home/model/HomeContent.kt rename to presentation/src/main/java/org/sopt/and/presentation/home/model/HomeContent.kt index 359ff80..2bc3d8e 100644 --- a/app/src/main/java/org/sopt/and/home/model/HomeContent.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/home/model/HomeContent.kt @@ -1,6 +1,6 @@ -package org.sopt.and.home.model +package org.sopt.and.presentation.home.model -import org.sopt.and.util.KeyUtil.DEFAULT_STRING +import org.sopt.and.presentation.util.KeyUtil.DEFAULT_STRING data class HomeContent( val title: String = DEFAULT_STRING, diff --git a/app/src/main/java/org/sopt/and/home/model/HomeState.kt b/presentation/src/main/java/org/sopt/and/presentation/home/model/HomeState.kt similarity index 83% rename from app/src/main/java/org/sopt/and/home/model/HomeState.kt rename to presentation/src/main/java/org/sopt/and/presentation/home/model/HomeState.kt index d63825c..2e439fa 100644 --- a/app/src/main/java/org/sopt/and/home/model/HomeState.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/home/model/HomeState.kt @@ -1,4 +1,4 @@ -package org.sopt.and.home.model +package org.sopt.and.presentation.home.model data class HomeState( val selectedTabIndex: Int = 0, diff --git a/app/src/main/java/org/sopt/and/home/viewmodel/HomeViewModel.kt b/presentation/src/main/java/org/sopt/and/presentation/home/viewmodel/HomeViewModel.kt similarity index 88% rename from app/src/main/java/org/sopt/and/home/viewmodel/HomeViewModel.kt rename to presentation/src/main/java/org/sopt/and/presentation/home/viewmodel/HomeViewModel.kt index 8cea071..fd7a9a5 100644 --- a/app/src/main/java/org/sopt/and/home/viewmodel/HomeViewModel.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/home/viewmodel/HomeViewModel.kt @@ -1,14 +1,19 @@ -package org.sopt.and.home.viewmodel +package org.sopt.and.presentation.home.viewmodel import androidx.lifecycle.ViewModel +import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.update -import org.sopt.and.R -import org.sopt.and.home.model.HomeContent -import org.sopt.and.home.model.HomeState +import org.sopt.and.presentation.R +import org.sopt.and.presentation.home.model.HomeContent +import org.sopt.and.presentation.home.model.HomeState +import javax.inject.Inject -class HomeViewModel: ViewModel() { +@HiltViewModel +class HomeViewModel @Inject constructor( + +): ViewModel() { private var _state = MutableStateFlow(HomeState()) val state = _state.asStateFlow() diff --git a/app/src/main/java/org/sopt/and/main/MainActivity.kt b/presentation/src/main/java/org/sopt/and/presentation/main/MainActivity.kt similarity index 73% rename from app/src/main/java/org/sopt/and/main/MainActivity.kt rename to presentation/src/main/java/org/sopt/and/presentation/main/MainActivity.kt index bb1f0d6..3fea50a 100644 --- a/app/src/main/java/org/sopt/and/main/MainActivity.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/main/MainActivity.kt @@ -1,11 +1,13 @@ -package org.sopt.and.main +package org.sopt.and.presentation.main import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.activity.enableEdgeToEdge -import org.sopt.and.ui.theme.ANDANDROIDTheme +import dagger.hilt.android.AndroidEntryPoint +import org.sopt.and.presentation.ui.theme.ANDANDROIDTheme +@AndroidEntryPoint class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/app/src/main/java/org/sopt/and/main/MainNavigator.kt b/presentation/src/main/java/org/sopt/and/presentation/main/MainNavigator.kt similarity index 93% rename from app/src/main/java/org/sopt/and/main/MainNavigator.kt rename to presentation/src/main/java/org/sopt/and/presentation/main/MainNavigator.kt index 5798d36..690fad6 100644 --- a/app/src/main/java/org/sopt/and/main/MainNavigator.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/main/MainNavigator.kt @@ -1,11 +1,11 @@ -package org.sopt.and.main +package org.sopt.and.presentation.main import androidx.compose.runtime.Composable import androidx.navigation.NavDestination import androidx.navigation.NavHostController import androidx.navigation.compose.currentBackStackEntryAsState import androidx.navigation.navOptions -import org.sopt.and.navigation.Route +import org.sopt.and.presentation.navigation.Route class MainNavigator( private val navController: NavHostController diff --git a/app/src/main/java/org/sopt/and/main/MainScreen.kt b/presentation/src/main/java/org/sopt/and/presentation/main/MainScreen.kt similarity index 87% rename from app/src/main/java/org/sopt/and/main/MainScreen.kt rename to presentation/src/main/java/org/sopt/and/presentation/main/MainScreen.kt index c94fca1..f9315f0 100644 --- a/app/src/main/java/org/sopt/and/main/MainScreen.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/main/MainScreen.kt @@ -1,4 +1,4 @@ -package org.sopt.and.main +package org.sopt.and.presentation.main import androidx.compose.animation.EnterTransition import androidx.compose.animation.ExitTransition @@ -17,18 +17,18 @@ import androidx.navigation.compose.NavHost import androidx.navigation.compose.composable import androidx.navigation.compose.rememberNavController import androidx.navigation.navOptions -import org.sopt.and.extension.getId -import org.sopt.and.extension.getPassword -import org.sopt.and.extension.setIdPassword -import org.sopt.and.home.HomeScreen -import org.sopt.and.main.component.MainBottomBar -import org.sopt.and.my.MyScreen -import org.sopt.and.navigation.Route -import org.sopt.and.search.SearchScreen -import org.sopt.and.sign.signin.SignInScreen -import org.sopt.and.sign.signup.SignUpScreen -import org.sopt.and.ui.theme.FirstGrey -import org.sopt.and.util.PreferenceUtil +import org.sopt.and.presentation.extension.getId +import org.sopt.and.presentation.extension.getPassword +import org.sopt.and.presentation.extension.setIdPassword +import org.sopt.and.presentation.home.HomeScreen +import org.sopt.and.presentation.main.component.MainBottomBar +import org.sopt.and.presentation.my.MyScreen +import org.sopt.and.presentation.navigation.Route +import org.sopt.and.presentation.search.SearchScreen +import org.sopt.and.presentation.sign.signin.SignInScreen +import org.sopt.and.presentation.sign.signup.SignUpScreen +import org.sopt.and.presentation.ui.theme.FirstGrey +import org.sopt.and.presentation.util.PreferenceUtil @Composable fun MainScreen() { diff --git a/app/src/main/java/org/sopt/and/main/MainTabItems.kt b/presentation/src/main/java/org/sopt/and/presentation/main/MainTabItems.kt similarity index 86% rename from app/src/main/java/org/sopt/and/main/MainTabItems.kt rename to presentation/src/main/java/org/sopt/and/presentation/main/MainTabItems.kt index 6e98df6..1c9f37d 100644 --- a/app/src/main/java/org/sopt/and/main/MainTabItems.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/main/MainTabItems.kt @@ -1,4 +1,4 @@ -package org.sopt.and.main +package org.sopt.and.presentation.main import androidx.annotation.StringRes import androidx.compose.material.icons.Icons @@ -6,8 +6,8 @@ import androidx.compose.material.icons.outlined.Home import androidx.compose.material.icons.outlined.Person import androidx.compose.material.icons.outlined.Search import androidx.compose.ui.graphics.vector.ImageVector -import org.sopt.and.R -import org.sopt.and.navigation.Route +import org.sopt.and.presentation.R +import org.sopt.and.presentation.navigation.Route enum class MainTabItems( @StringRes val titleRes: Int, diff --git a/app/src/main/java/org/sopt/and/main/component/MainBottomBar.kt b/presentation/src/main/java/org/sopt/and/presentation/main/component/MainBottomBar.kt similarity index 91% rename from app/src/main/java/org/sopt/and/main/component/MainBottomBar.kt rename to presentation/src/main/java/org/sopt/and/presentation/main/component/MainBottomBar.kt index b497095..920339b 100644 --- a/app/src/main/java/org/sopt/and/main/component/MainBottomBar.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/main/component/MainBottomBar.kt @@ -1,4 +1,4 @@ -package org.sopt.and.main.component +package org.sopt.and.presentation.main.component import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.size @@ -14,9 +14,9 @@ import androidx.compose.ui.graphics.Color.Companion.White import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import org.sopt.and.main.MainTabItems -import org.sopt.and.ui.theme.FirstGrey -import org.sopt.and.ui.theme.ThirdGrey +import org.sopt.and.presentation.main.MainTabItems +import org.sopt.and.presentation.ui.theme.FirstGrey +import org.sopt.and.presentation.ui.theme.ThirdGrey @Composable fun MainBottomBar( diff --git a/app/src/main/java/org/sopt/and/my/MyScreen.kt b/presentation/src/main/java/org/sopt/and/presentation/my/MyScreen.kt similarity index 89% rename from app/src/main/java/org/sopt/and/my/MyScreen.kt rename to presentation/src/main/java/org/sopt/and/presentation/my/MyScreen.kt index 066a156..bd775f5 100644 --- a/app/src/main/java/org/sopt/and/my/MyScreen.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/my/MyScreen.kt @@ -1,4 +1,4 @@ -package org.sopt.and.my +package org.sopt.and.presentation.my import androidx.compose.foundation.Image import androidx.compose.foundation.background @@ -33,27 +33,27 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.LocalLifecycleOwner import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.flowWithLifecycle -import androidx.lifecycle.viewmodel.compose.viewModel -import org.sopt.and.R -import org.sopt.and.component.ContentsView -import org.sopt.and.component.PairTextView -import org.sopt.and.extension.noRippleClickable -import org.sopt.and.my.sideeffect.MySideEffect -import org.sopt.and.my.viewmodel.MyViewModel -import org.sopt.and.ui.theme.FirstGrey -import org.sopt.and.ui.theme.SecondGrey -import org.sopt.and.ui.theme.ThirdGrey -import org.sopt.and.ui.theme.White -import org.sopt.and.util.PreferenceUtil +import org.sopt.and.presentation.R +import org.sopt.and.presentation.component.ContentsView +import org.sopt.and.presentation.component.PairTextView +import org.sopt.and.presentation.extension.noRippleClickable +import org.sopt.and.presentation.my.sideeffect.MySideEffect +import org.sopt.and.presentation.my.viewmodel.MyViewModel +import org.sopt.and.presentation.ui.theme.FirstGrey +import org.sopt.and.presentation.ui.theme.SecondGrey +import org.sopt.and.presentation.ui.theme.ThirdGrey +import org.sopt.and.presentation.ui.theme.White +import org.sopt.and.presentation.util.PreferenceUtil @Composable fun MyScreen( onLogOut: () -> Unit = {}, modifier: Modifier = Modifier, - viewModel: MyViewModel = viewModel() + viewModel: MyViewModel = hiltViewModel() ) { Column( modifier = modifier.fillMaxSize() diff --git a/presentation/src/main/java/org/sopt/and/presentation/my/model/MyState.kt b/presentation/src/main/java/org/sopt/and/presentation/my/model/MyState.kt new file mode 100644 index 0000000..7c888ad --- /dev/null +++ b/presentation/src/main/java/org/sopt/and/presentation/my/model/MyState.kt @@ -0,0 +1,7 @@ +package org.sopt.and.presentation.my.model + +import org.sopt.and.presentation.util.KeyUtil.DEFAULT_STRING + +data class MyState( + val id: String = DEFAULT_STRING +) \ No newline at end of file diff --git a/app/src/main/java/org/sopt/and/my/sideeffect/MySideEffect.kt b/presentation/src/main/java/org/sopt/and/presentation/my/sideeffect/MySideEffect.kt similarity index 78% rename from app/src/main/java/org/sopt/and/my/sideeffect/MySideEffect.kt rename to presentation/src/main/java/org/sopt/and/presentation/my/sideeffect/MySideEffect.kt index 972ddc6..447e61b 100644 --- a/app/src/main/java/org/sopt/and/my/sideeffect/MySideEffect.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/my/sideeffect/MySideEffect.kt @@ -1,4 +1,4 @@ -package org.sopt.and.my.sideeffect +package org.sopt.and.presentation.my.sideeffect import androidx.annotation.StringRes diff --git a/app/src/main/java/org/sopt/and/my/viewmodel/MyViewModel.kt b/presentation/src/main/java/org/sopt/and/presentation/my/viewmodel/MyViewModel.kt similarity index 69% rename from app/src/main/java/org/sopt/and/my/viewmodel/MyViewModel.kt rename to presentation/src/main/java/org/sopt/and/presentation/my/viewmodel/MyViewModel.kt index 918a1cc..7ae858a 100644 --- a/app/src/main/java/org/sopt/and/my/viewmodel/MyViewModel.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/my/viewmodel/MyViewModel.kt @@ -1,17 +1,22 @@ -package org.sopt.and.my.viewmodel +package org.sopt.and.presentation.my.viewmodel import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope +import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asSharedFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch -import org.sopt.and.my.sideeffect.MySideEffect -import org.sopt.and.my.model.MyState +import org.sopt.and.presentation.my.model.MyState +import org.sopt.and.presentation.my.sideeffect.MySideEffect +import javax.inject.Inject -class MyViewModel: ViewModel() { +@HiltViewModel +class MyViewModel @Inject constructor( + +): ViewModel() { private val _state = MutableStateFlow(MyState()) val state = _state.asStateFlow() diff --git a/app/src/main/java/org/sopt/and/navigation/Route.kt b/presentation/src/main/java/org/sopt/and/presentation/navigation/Route.kt similarity index 88% rename from app/src/main/java/org/sopt/and/navigation/Route.kt rename to presentation/src/main/java/org/sopt/and/presentation/navigation/Route.kt index 0b5d1b4..c8f7ade 100644 --- a/app/src/main/java/org/sopt/and/navigation/Route.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/navigation/Route.kt @@ -1,4 +1,4 @@ -package org.sopt.and.navigation +package org.sopt.and.presentation.navigation import kotlinx.serialization.Serializable diff --git a/app/src/main/java/org/sopt/and/search/SearchScreen.kt b/presentation/src/main/java/org/sopt/and/presentation/search/SearchScreen.kt similarity index 80% rename from app/src/main/java/org/sopt/and/search/SearchScreen.kt rename to presentation/src/main/java/org/sopt/and/presentation/search/SearchScreen.kt index 623f2eb..fc43fa5 100644 --- a/app/src/main/java/org/sopt/and/search/SearchScreen.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/search/SearchScreen.kt @@ -1,10 +1,10 @@ -package org.sopt.and.search +package org.sopt.and.presentation.search import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource -import org.sopt.and.R +import org.sopt.and.presentation.R @Composable fun SearchScreen( diff --git a/app/src/main/java/org/sopt/and/sign/signin/SignInScreen.kt b/presentation/src/main/java/org/sopt/and/presentation/sign/signin/SignInScreen.kt similarity index 87% rename from app/src/main/java/org/sopt/and/sign/signin/SignInScreen.kt rename to presentation/src/main/java/org/sopt/and/presentation/sign/signin/SignInScreen.kt index 74a49e0..bf9d771 100644 --- a/app/src/main/java/org/sopt/and/sign/signin/SignInScreen.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/sign/signin/SignInScreen.kt @@ -1,4 +1,4 @@ -package org.sopt.and.sign.signin +package org.sopt.and.presentation.sign.signin import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -27,23 +27,23 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp +import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle -import androidx.lifecycle.viewmodel.compose.viewModel -import org.sopt.and.R -import org.sopt.and.component.BackTopBar -import org.sopt.and.component.DividerWithText -import org.sopt.and.component.OtherServiceIconRow -import org.sopt.and.component.WavveActionTextField -import org.sopt.and.component.WavveTextField -import org.sopt.and.extension.noRippleClickable -import org.sopt.and.sign.signin.sideeffect.SignInSideEffect -import org.sopt.and.sign.signin.viewmodel.SignInViewModel -import org.sopt.and.ui.theme.FirstGrey -import org.sopt.and.ui.theme.SecondGrey -import org.sopt.and.ui.theme.ThirdGrey -import org.sopt.and.ui.theme.WavveColor -import org.sopt.and.ui.theme.White -import org.sopt.and.util.PreferenceUtil +import org.sopt.and.presentation.R +import org.sopt.and.presentation.component.BackTopBar +import org.sopt.and.presentation.component.DividerWithText +import org.sopt.and.presentation.component.OtherServiceIconRow +import org.sopt.and.presentation.component.WavveActionTextField +import org.sopt.and.presentation.component.WavveTextField +import org.sopt.and.presentation.extension.noRippleClickable +import org.sopt.and.presentation.sign.signin.sideeffect.SignInSideEffect +import org.sopt.and.presentation.sign.signin.viewmodel.SignInViewModel +import org.sopt.and.presentation.ui.theme.FirstGrey +import org.sopt.and.presentation.ui.theme.SecondGrey +import org.sopt.and.presentation.ui.theme.ThirdGrey +import org.sopt.and.presentation.ui.theme.WavveColor +import org.sopt.and.presentation.ui.theme.White +import org.sopt.and.presentation.util.PreferenceUtil @Composable fun SignInScreen( @@ -55,7 +55,7 @@ fun SignInScreen( onFindInButtonClick: () -> Unit, onPasswordResetButtonClick: () -> Unit, modifier: Modifier = Modifier, - viewModel: SignInViewModel = viewModel() + viewModel: SignInViewModel = hiltViewModel() ){ val state by viewModel.state.collectAsStateWithLifecycle() diff --git a/presentation/src/main/java/org/sopt/and/presentation/sign/signin/model/SignInState.kt b/presentation/src/main/java/org/sopt/and/presentation/sign/signin/model/SignInState.kt new file mode 100644 index 0000000..762ff2b --- /dev/null +++ b/presentation/src/main/java/org/sopt/and/presentation/sign/signin/model/SignInState.kt @@ -0,0 +1,8 @@ +package org.sopt.and.presentation.sign.signin.model + +import org.sopt.and.presentation.util.KeyUtil.DEFAULT_STRING + +data class SignInState( + val id: String = DEFAULT_STRING, + val password: String = DEFAULT_STRING, +) diff --git a/app/src/main/java/org/sopt/and/sign/signin/sideeffect/SignInSideEffect.kt b/presentation/src/main/java/org/sopt/and/presentation/sign/signin/sideeffect/SignInSideEffect.kt similarity index 80% rename from app/src/main/java/org/sopt/and/sign/signin/sideeffect/SignInSideEffect.kt rename to presentation/src/main/java/org/sopt/and/presentation/sign/signin/sideeffect/SignInSideEffect.kt index 39ffc39..d782d8a 100644 --- a/app/src/main/java/org/sopt/and/sign/signin/sideeffect/SignInSideEffect.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/sign/signin/sideeffect/SignInSideEffect.kt @@ -1,4 +1,4 @@ -package org.sopt.and.sign.signin.sideeffect +package org.sopt.and.presentation.sign.signin.sideeffect import androidx.annotation.StringRes diff --git a/app/src/main/java/org/sopt/and/sign/signin/viewmodel/SignInViewModel.kt b/presentation/src/main/java/org/sopt/and/presentation/sign/signin/viewmodel/SignInViewModel.kt similarity index 78% rename from app/src/main/java/org/sopt/and/sign/signin/viewmodel/SignInViewModel.kt rename to presentation/src/main/java/org/sopt/and/presentation/sign/signin/viewmodel/SignInViewModel.kt index d86cc05..27ed5af 100644 --- a/app/src/main/java/org/sopt/and/sign/signin/viewmodel/SignInViewModel.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/sign/signin/viewmodel/SignInViewModel.kt @@ -1,18 +1,23 @@ -package org.sopt.and.sign.signin.viewmodel +package org.sopt.and.presentation.sign.signin.viewmodel import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope +import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asSharedFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch -import org.sopt.and.R -import org.sopt.and.sign.signin.sideeffect.SignInSideEffect -import org.sopt.and.sign.signin.model.SignInState +import org.sopt.and.presentation.R +import org.sopt.and.presentation.sign.signin.model.SignInState +import org.sopt.and.presentation.sign.signin.sideeffect.SignInSideEffect +import javax.inject.Inject -class SignInViewModel: ViewModel() { +@HiltViewModel +class SignInViewModel @Inject constructor( + +): ViewModel() { private var _state = MutableStateFlow(SignInState()) val state = _state.asStateFlow() diff --git a/app/src/main/java/org/sopt/and/sign/signup/SignUpScreen.kt b/presentation/src/main/java/org/sopt/and/presentation/sign/signup/SignUpScreen.kt similarity index 86% rename from app/src/main/java/org/sopt/and/sign/signup/SignUpScreen.kt rename to presentation/src/main/java/org/sopt/and/presentation/sign/signup/SignUpScreen.kt index fb773b5..be0273d 100644 --- a/app/src/main/java/org/sopt/and/sign/signup/SignUpScreen.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/sign/signup/SignUpScreen.kt @@ -1,4 +1,4 @@ -package org.sopt.and.sign.signup +package org.sopt.and.presentation.sign.signup import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box @@ -25,20 +25,20 @@ import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp +import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle -import androidx.lifecycle.viewmodel.compose.viewModel -import org.sopt.and.R -import org.sopt.and.component.CloseTopBar -import org.sopt.and.component.DividerWithText -import org.sopt.and.component.InfoWithText -import org.sopt.and.component.OtherServiceIconRow -import org.sopt.and.component.WavveActionTextField -import org.sopt.and.component.WavveTextField -import org.sopt.and.extension.noRippleClickable -import org.sopt.and.sign.signup.intent.SignUpSideEffect -import org.sopt.and.sign.signup.viewmodel.SignUpViewModel -import org.sopt.and.ui.theme.ThirdGrey -import org.sopt.and.ui.theme.White +import org.sopt.and.presentation.R +import org.sopt.and.presentation.component.CloseTopBar +import org.sopt.and.presentation.component.DividerWithText +import org.sopt.and.presentation.component.InfoWithText +import org.sopt.and.presentation.component.OtherServiceIconRow +import org.sopt.and.presentation.component.WavveActionTextField +import org.sopt.and.presentation.component.WavveTextField +import org.sopt.and.presentation.extension.noRippleClickable +import org.sopt.and.presentation.sign.signup.intent.SignUpSideEffect +import org.sopt.and.presentation.sign.signup.viewmodel.SignUpViewModel +import org.sopt.and.presentation.ui.theme.ThirdGrey +import org.sopt.and.presentation.ui.theme.White @Composable @@ -46,7 +46,7 @@ fun SignUpScreen( navigationToSignIn: (String, String) -> Unit, onCloseButtonClick: () -> Unit, modifier: Modifier = Modifier, - viewModel: SignUpViewModel = viewModel() + viewModel: SignUpViewModel = hiltViewModel() ) { val state by viewModel.state.collectAsStateWithLifecycle() diff --git a/app/src/main/java/org/sopt/and/sign/signup/intent/SignUpSideEffect.kt b/presentation/src/main/java/org/sopt/and/presentation/sign/signup/intent/SignUpSideEffect.kt similarity index 78% rename from app/src/main/java/org/sopt/and/sign/signup/intent/SignUpSideEffect.kt rename to presentation/src/main/java/org/sopt/and/presentation/sign/signup/intent/SignUpSideEffect.kt index ccb1273..7850e3e 100644 --- a/app/src/main/java/org/sopt/and/sign/signup/intent/SignUpSideEffect.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/sign/signup/intent/SignUpSideEffect.kt @@ -1,4 +1,4 @@ -package org.sopt.and.sign.signup.intent +package org.sopt.and.presentation.sign.signup.intent import androidx.annotation.StringRes diff --git a/presentation/src/main/java/org/sopt/and/presentation/sign/signup/model/SignUpState.kt b/presentation/src/main/java/org/sopt/and/presentation/sign/signup/model/SignUpState.kt new file mode 100644 index 0000000..2319f12 --- /dev/null +++ b/presentation/src/main/java/org/sopt/and/presentation/sign/signup/model/SignUpState.kt @@ -0,0 +1,8 @@ +package org.sopt.and.presentation.sign.signup.model + +import org.sopt.and.presentation.util.KeyUtil.DEFAULT_STRING + +data class SignUpState( + val id: String = DEFAULT_STRING, + val password: String = DEFAULT_STRING +) diff --git a/app/src/main/java/org/sopt/and/sign/signup/viewmodel/SignUpViewModel.kt b/presentation/src/main/java/org/sopt/and/presentation/sign/signup/viewmodel/SignUpViewModel.kt similarity index 82% rename from app/src/main/java/org/sopt/and/sign/signup/viewmodel/SignUpViewModel.kt rename to presentation/src/main/java/org/sopt/and/presentation/sign/signup/viewmodel/SignUpViewModel.kt index c64e46b..2e89268 100644 --- a/app/src/main/java/org/sopt/and/sign/signup/viewmodel/SignUpViewModel.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/sign/signup/viewmodel/SignUpViewModel.kt @@ -1,18 +1,23 @@ -package org.sopt.and.sign.signup.viewmodel +package org.sopt.and.presentation.sign.signup.viewmodel import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope +import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asSharedFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch -import org.sopt.and.R -import org.sopt.and.sign.signup.intent.SignUpSideEffect -import org.sopt.and.sign.signup.model.SignUpState +import org.sopt.and.presentation.R +import org.sopt.and.presentation.sign.signup.intent.SignUpSideEffect +import org.sopt.and.presentation.sign.signup.model.SignUpState +import javax.inject.Inject -class SignUpViewModel: ViewModel() { +@HiltViewModel +class SignUpViewModel @Inject constructor( + +): ViewModel() { private var _state = MutableStateFlow(SignUpState()) val state = _state.asStateFlow() diff --git a/app/src/main/java/org/sopt/and/ui/theme/Color.kt b/presentation/src/main/java/org/sopt/and/presentation/ui/theme/Color.kt similarity index 92% rename from app/src/main/java/org/sopt/and/ui/theme/Color.kt rename to presentation/src/main/java/org/sopt/and/presentation/ui/theme/Color.kt index 0b01d5c..d6cf375 100644 --- a/app/src/main/java/org/sopt/and/ui/theme/Color.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/ui/theme/Color.kt @@ -1,4 +1,4 @@ -package org.sopt.and.ui.theme +package org.sopt.and.presentation.ui.theme import androidx.compose.ui.graphics.Color diff --git a/app/src/main/java/org/sopt/and/ui/theme/Theme.kt b/presentation/src/main/java/org/sopt/and/presentation/ui/theme/Theme.kt similarity index 96% rename from app/src/main/java/org/sopt/and/ui/theme/Theme.kt rename to presentation/src/main/java/org/sopt/and/presentation/ui/theme/Theme.kt index 4871c5c..af485ba 100644 --- a/app/src/main/java/org/sopt/and/ui/theme/Theme.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/ui/theme/Theme.kt @@ -1,6 +1,5 @@ -package org.sopt.and.ui.theme +package org.sopt.and.presentation.ui.theme -import android.app.Activity import android.os.Build import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material3.MaterialTheme diff --git a/app/src/main/java/org/sopt/and/ui/theme/Type.kt b/presentation/src/main/java/org/sopt/and/presentation/ui/theme/Type.kt similarity index 95% rename from app/src/main/java/org/sopt/and/ui/theme/Type.kt rename to presentation/src/main/java/org/sopt/and/presentation/ui/theme/Type.kt index 07b7990..8d6dc52 100644 --- a/app/src/main/java/org/sopt/and/ui/theme/Type.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/ui/theme/Type.kt @@ -1,4 +1,4 @@ -package org.sopt.and.ui.theme +package org.sopt.and.presentation.ui.theme import androidx.compose.material3.Typography import androidx.compose.ui.text.TextStyle diff --git a/app/src/main/java/org/sopt/and/util/KeyUtil.kt b/presentation/src/main/java/org/sopt/and/presentation/util/KeyUtil.kt similarity index 79% rename from app/src/main/java/org/sopt/and/util/KeyUtil.kt rename to presentation/src/main/java/org/sopt/and/presentation/util/KeyUtil.kt index b64a50f..ab885ea 100644 --- a/app/src/main/java/org/sopt/and/util/KeyUtil.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/util/KeyUtil.kt @@ -1,4 +1,4 @@ -package org.sopt.and.util +package org.sopt.and.presentation.util object KeyUtil { const val ID = "id" diff --git a/app/src/main/java/org/sopt/and/util/PreferenceUtil.kt b/presentation/src/main/java/org/sopt/and/presentation/util/PreferenceUtil.kt similarity index 79% rename from app/src/main/java/org/sopt/and/util/PreferenceUtil.kt rename to presentation/src/main/java/org/sopt/and/presentation/util/PreferenceUtil.kt index c30aec4..1f56d90 100644 --- a/app/src/main/java/org/sopt/and/util/PreferenceUtil.kt +++ b/presentation/src/main/java/org/sopt/and/presentation/util/PreferenceUtil.kt @@ -1,10 +1,10 @@ -package org.sopt.and.util +package org.sopt.and.presentation.util import android.content.Context import android.content.SharedPreferences -import org.sopt.and.util.KeyUtil.ID -import org.sopt.and.util.KeyUtil.PASSWORD -import org.sopt.and.util.KeyUtil.PREF_NAME +import org.sopt.and.presentation.util.KeyUtil.ID +import org.sopt.and.presentation.util.KeyUtil.PASSWORD +import org.sopt.and.presentation.util.KeyUtil.PREF_NAME object PreferenceUtil { private lateinit var preference: SharedPreferences diff --git a/app/src/main/res/drawable/apple_icon.png b/presentation/src/main/res/drawable/apple_icon.png similarity index 100% rename from app/src/main/res/drawable/apple_icon.png rename to presentation/src/main/res/drawable/apple_icon.png diff --git a/app/src/main/res/drawable/cast_icon.xml b/presentation/src/main/res/drawable/cast_icon.xml similarity index 100% rename from app/src/main/res/drawable/cast_icon.xml rename to presentation/src/main/res/drawable/cast_icon.xml diff --git a/app/src/main/res/drawable/facebook_icon.png b/presentation/src/main/res/drawable/facebook_icon.png similarity index 100% rename from app/src/main/res/drawable/facebook_icon.png rename to presentation/src/main/res/drawable/facebook_icon.png diff --git a/app/src/main/res/drawable/home_banner_img1.webp b/presentation/src/main/res/drawable/home_banner_img1.webp similarity index 100% rename from app/src/main/res/drawable/home_banner_img1.webp rename to presentation/src/main/res/drawable/home_banner_img1.webp diff --git a/app/src/main/res/drawable/home_banner_img2.webp b/presentation/src/main/res/drawable/home_banner_img2.webp similarity index 100% rename from app/src/main/res/drawable/home_banner_img2.webp rename to presentation/src/main/res/drawable/home_banner_img2.webp diff --git a/app/src/main/res/drawable/home_banner_img3.webp b/presentation/src/main/res/drawable/home_banner_img3.webp similarity index 100% rename from app/src/main/res/drawable/home_banner_img3.webp rename to presentation/src/main/res/drawable/home_banner_img3.webp diff --git a/app/src/main/res/drawable/home_banner_img4.webp b/presentation/src/main/res/drawable/home_banner_img4.webp similarity index 100% rename from app/src/main/res/drawable/home_banner_img4.webp rename to presentation/src/main/res/drawable/home_banner_img4.webp diff --git a/app/src/main/res/drawable/home_banner_img5.webp b/presentation/src/main/res/drawable/home_banner_img5.webp similarity index 100% rename from app/src/main/res/drawable/home_banner_img5.webp rename to presentation/src/main/res/drawable/home_banner_img5.webp diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/presentation/src/main/res/drawable/ic_launcher_background.xml similarity index 100% rename from app/src/main/res/drawable/ic_launcher_background.xml rename to presentation/src/main/res/drawable/ic_launcher_background.xml diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/presentation/src/main/res/drawable/ic_launcher_foreground.xml similarity index 100% rename from app/src/main/res/drawable/ic_launcher_foreground.xml rename to presentation/src/main/res/drawable/ic_launcher_foreground.xml diff --git a/app/src/main/res/drawable/kakao_icon.png b/presentation/src/main/res/drawable/kakao_icon.png similarity index 100% rename from app/src/main/res/drawable/kakao_icon.png rename to presentation/src/main/res/drawable/kakao_icon.png diff --git a/app/src/main/res/drawable/live_icon.xml b/presentation/src/main/res/drawable/live_icon.xml similarity index 100% rename from app/src/main/res/drawable/live_icon.xml rename to presentation/src/main/res/drawable/live_icon.xml diff --git a/app/src/main/res/drawable/naver_icon.png b/presentation/src/main/res/drawable/naver_icon.png similarity index 100% rename from app/src/main/res/drawable/naver_icon.png rename to presentation/src/main/res/drawable/naver_icon.png diff --git a/app/src/main/res/drawable/tworld_icon.png b/presentation/src/main/res/drawable/tworld_icon.png similarity index 100% rename from app/src/main/res/drawable/tworld_icon.png rename to presentation/src/main/res/drawable/tworld_icon.png diff --git a/app/src/main/res/drawable/wavve_icon.xml b/presentation/src/main/res/drawable/wavve_icon.xml similarity index 100% rename from app/src/main/res/drawable/wavve_icon.xml rename to presentation/src/main/res/drawable/wavve_icon.xml diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml new file mode 100644 index 0000000..2f55412 --- /dev/null +++ b/presentation/src/main/res/values/strings.xml @@ -0,0 +1,75 @@ + + AND-ANDROID + + hide + show + 닫기 + 정보 + 이동 + 알림 + 설정 + 로고 이미지 + 네이버 + 카카오 + 티월드 + 페이스북 + 애플 + 캐스트 + 라이브 + + + 검색 + MY + + 뉴클래식 + 드라마 + 예능 + 영화 + 애니메이션 + 해외시리즈 + 시사교양 + 키즈 + 홈배너 이미지 + %s | %s + + 회원가입 + 이메일과 비밀번호만으로\nWavve를 즐길 수 있어요! + wavve@example.com + 로그인, 비밀번호 찾기, 알림에 사용되니 정확한 이메일을 입력해주세요. + Wavve 비밀번호 설정 + 비밀번호는 8~20자 이내로 영문 대소문자, 숫자, 특수문자 중 3가지 이상 혼용하여 입력해 주세요. + 또는 다른 서비스 계정으로 가입 + "SNS계정을 간편하게 가입하여 서비스를 이용하실 수 있습니다. 기\n존 POOQ 계정 또는 Wavve 계정과는 연동되지 않으니 이용에 참고\n하세요." + wavve 회원가입 + 회원가입을 완료했습니다. + 이메일 형식이 올바르지 않습니다. + 비밀번호 형식이 올바르지 않습니다. + 회원가입이 실패했습니다. + + 이메일 주소 또는 아이디 + 비밀번호 + 로그인 + 아이디 찾기 + 비밀번호 재설정 + 회원가입 + | + 또는 다른 서비스 계정으로 가입 + "SNS계정을 간편하게 가입하여 서비스를 이용하실 수 있습니다. 기\n존 POOQ 계정 또는 Wavve 계정과는 연동되지 않으니 이용에 참고하세요." + 로그인에 성공했습니다. + 아이디 또는 비밀번호가 일치하지 않습니다. + "SNS계정을 간편하게 가입하여 서비스를 이용하실 수 있습니다.\n\t기존 POOQ 계정 또는 Wavve 계정과는 연동되지 않으니 이용에 참고하세요." + + 내 프로필 이미지 + 구매하기 + 첫 결제 시 첫 달 100원! + 현재 보유하신 이용권이 없습니다. + 전체 시청 내역 + 시청 내역이 없어요. + 관심 프로그램 + 관심 프로그램이 없어요. + 이메일을 불러올 수 없습니다. + 오류로 인해 데이터를 불러올 수 없습니다. + 로그아웃 + 로그아웃을 성공했습니다 + + \ No newline at end of file diff --git a/presentation/src/test/java/org/sopt/and/presentation/ExampleUnitTest.kt b/presentation/src/test/java/org/sopt/and/presentation/ExampleUnitTest.kt new file mode 100644 index 0000000..044f919 --- /dev/null +++ b/presentation/src/test/java/org/sopt/and/presentation/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package org.sopt.and.presentation + +import org.junit.Test + +import org.junit.Assert.* + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 3b17dc1..de489d6 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -21,4 +21,6 @@ dependencyResolutionManagement { rootProject.name = "AND-ANDROID" include(":app") - \ No newline at end of file +include(":data") +include(":domain") +include(":presentation")