diff --git a/.github/workflows/dokka.yml b/.github/workflows/dokka.yml index 044844837..c4df66bf1 100644 --- a/.github/workflows/dokka.yml +++ b/.github/workflows/dokka.yml @@ -55,4 +55,4 @@ jobs: uses: JamesIves/github-pages-deploy-action@v4.4.3 with: BRANCH: gh-pages - FOLDER: core/build/dokka/html \ No newline at end of file + FOLDER: core/designsystem/build/dokka/html \ No newline at end of file diff --git a/README.md b/README.md index 78d48c139..ec1fe63db 100644 --- a/README.md +++ b/README.md @@ -33,60 +33,73 @@
## DEPENDENCY GRAPH - - + ## MODULE & PACKAGE CONVENTION ``` 🗃️app - ┗ 📂di + +🗃️build-logic + ┣ 📂️convention + ┗ 📂extension 🗃️core - ┣ 📂analytics - ┣ 📂designsystem + ┣ 🗃️analytics + ┣ 🗃️designsystem ┃ ┣ 📂component + ┃ ┣ 📂extension + ┃ ┣ 📂state ┃ ┣ 📂theme - ┣ 📂extension - ┣ 📂navigation - ┣ 📂state - ┣ 📂type - ┗ 📂util + ┃ ┣ 📂type + ┃ ┣ 📂util + ┣ 🗃️local + ┣ 🗃️navigation + ┗ 🗃️network 🗃️data - ┣ 📂datasource - ┣ 📂datasourceImpl - ┣ 📂dto - ┃ ┣ 📂response - ┃ ┣ 📂request - ┣ 📂local - ┣ 📂mapper - ┣ 📂repositoryImpl - ┗ 📂service + ┣ 🗃️auth + ┣ 🗃️calendar + ┣ 🗃️filtering + ┣ 🗃️home + ┣ 🗃️intern + ┣ 🗃️mypage + ┣ 🗃️scrap + ┣ 🗃️search + ┣ 🗃️token + ┗ 🗃️tokenreissue 🗃️domain - ┣ 📂entity - ┗ 📂repository + ┣ 🗃️auth + ┣ 🗃️calendar + ┣ 🗃️filtering + ┣ 🗃️home + ┣ 🗃️intern + ┣ 🗃️mypage + ┣ 🗃️scrap + ┣ 🗃️search + ┣ 🗃️token + ┗ 🗃️tokenreissue 🗃️feature - ┗ 📂기능 별 패키징 + ┗ 🗃️기능 별 모듈화 ```
## TECH STACK -| Title | Content | -| ------------ | -------------------------- | +| Title | Content | +| ------------ |---------------------------------------| | Architecture | Clean Architecture, MVI, Multi-Module | -| UI Framework | Jetpack Compose | -| Build Tools | Gradle Version Catalog | -| Dependency Injection | Hilt | -| Network | Retrofit2, OkHttp | -| Asynchronous Processing | Coroutine, Flow | -| Third Party Library | Coil, Timber, Kakao SDK, Lottie | -| Other Tools | Discode, Notion, Figma |\ +| UI Framework | Jetpack Compose | +| Build Tools | Custom Build Logic, Gradle Version Catalog | +| Dependency Injection | Hilt | +| Network | Retrofit2, OkHttp | +| Asynchronous Processing | Coroutine, Flow | +| Third Party Library | Coil, Timber, Kakao SDK, Lottie | +| Other Tools | Discode, Notion, Figma |\
## SCREENSHOTS diff --git a/app/build.gradle.kts b/app/build.gradle.kts index dc7d7cc4f..2c47923bb 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,11 +1,8 @@ import java.util.Properties +import com.terning.build_logic.extension.setNamespace plugins { - alias(libs.plugins.android.application) - alias(libs.plugins.kotlin.android) - alias(libs.plugins.hilt) - alias(libs.plugins.kotlin.parcelize) - alias(libs.plugins.ksp) + alias(libs.plugins.terning.application) } val properties = Properties().apply { @@ -22,7 +19,7 @@ android { } } - namespace = "com.terning.point" + setNamespace("point") compileSdk = libs.versions.compileSdk.get().toInt() defaultConfig { @@ -47,19 +44,7 @@ android { } buildTypes { - debug { - buildConfigField( - "String", - "BASE_URL", - properties.getProperty("test.base.url") - ) - } release { - buildConfigField( - "String", - "BASE_URL", - properties.getProperty("base.url") - ) isMinifyEnabled = false proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), @@ -68,71 +53,33 @@ android { signingConfig = signingConfigs.getByName("release") } } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } kotlinOptions { jvmTarget = libs.versions.jvmTarget.get() } buildFeatures { - compose = true buildConfig = true } composeOptions { kotlinCompilerExtensionVersion = libs.versions.kotlinCompilerExtensionVersion.get() } - packaging { - resources { - excludes += "/META-INF/{AL2.0,LGPL2.1}" - excludes += "/META-INF/gradle/incremental.annotation.processors" - } - } } dependencies { - implementation(project(":core")) - implementation(project(":data")) - implementation(project(":domain")) - implementation(project(":feature")) - - // KotlinDependencies - implementation(libs.kotlinx.serialization.json) - implementation(libs.coroutines.android) - implementation(libs.kotlin) - - // AndroidXDependencies - implementation(libs.androidx.core.ktx) - implementation(libs.androidx.appcompat) - implementation(libs.hilt.android) - ksp(libs.hilt.android.compiler) - ksp(libs.hilt.manager) - implementation(libs.androidx.workManager) - implementation(libs.androidx.hiltWorkManager) - implementation(libs.hilt.compiler) - implementation(libs.androidx.hiltWorkManagerCompiler) + // feature + implementation(project(":feature:main")) - // TestDependencies - testImplementation(libs.junit) - androidTestImplementation(libs.androidx.junit) - androidTestImplementation(libs.androidx.espresso.core) - androidTestImplementation(platform(libs.androidx.compose.bom)) - androidTestImplementation(libs.androidx.ui.test.junit4) + // data + implementation(project(":data:auth")) + implementation(project(":data:calendar")) + implementation(project(":data:filtering")) + implementation(project(":data:home")) + implementation(project(":data:intern")) + implementation(project(":data:mypage")) + implementation(project(":data:scrap")) + implementation(project(":data:token")) + implementation(project(":data:tokenreissue")) + implementation(project(":data:search")) - // ThirdPartyDependencies - implementation(platform(libs.okhttp.bom)) - implementation(libs.okhttp) - implementation(libs.okhttp.logging) - implementation(libs.retrofit.core) - implementation(libs.retrofit.kotlin.serialization) - implementation(libs.retrofit2.kotlinx.serialization.converter) implementation(libs.timber) - implementation(libs.ossLicense) - implementation(libs.process.phoenix) - - // Compose Preview - implementation(libs.compose.ui.tooling) - - // KakaoDependencies implementation(libs.kakao.user) } diff --git a/app/src/main/java/com/terning/point/di/DataSourceModule.kt b/app/src/main/java/com/terning/point/di/DataSourceModule.kt deleted file mode 100644 index 040aae73a..000000000 --- a/app/src/main/java/com/terning/point/di/DataSourceModule.kt +++ /dev/null @@ -1,68 +0,0 @@ -package com.terning.point.di - -import com.terning.data.datasource.AuthDataSource -import com.terning.data.datasource.CalendarDataSource -import com.terning.data.datasource.FilteringDataSource -import com.terning.data.datasource.InternDataSource -import com.terning.data.datasource.HomeDataSource -import com.terning.data.datasource.MyPageDataSource -import com.terning.data.datasource.ScrapDataSource -import com.terning.data.datasource.SearchDataSource -import com.terning.data.datasource.TokenReissueDataSource -import com.terning.data.datasourceimpl.AuthDataSourceImpl -import com.terning.data.datasourceimpl.CalendarDataSourceImpl -import com.terning.data.datasourceimpl.FilteringDataSourceImpl -import com.terning.data.datasourceimpl.InternDataSourceImpl -import com.terning.data.datasourceimpl.HomeDataSourceImpl -import com.terning.data.datasourceimpl.MyPageDataSourceImpl -import com.terning.data.datasourceimpl.ScrapDataSourceImpl -import com.terning.data.datasourceimpl.SearchDataSourceImpl -import com.terning.data.datasourceimpl.TokenReissueDataSourceImpl -import dagger.Binds -import dagger.Module -import dagger.hilt.InstallIn -import dagger.hilt.components.SingletonComponent -import javax.inject.Singleton - -@Module -@InstallIn(SingletonComponent::class) -abstract class DataSourceModule { - - @Binds - @Singleton - abstract fun bindCalendarDataSource(calendarDataSourceImpl: CalendarDataSourceImpl): CalendarDataSource - - @Binds - @Singleton - abstract fun bindAuthDataSource(authDataSourceImpl: AuthDataSourceImpl): AuthDataSource - - @Binds - @Singleton - abstract fun bindSearchDataSource(searchDataSourceImpl: SearchDataSourceImpl): - SearchDataSource - - @Binds - @Singleton - abstract fun bindInternInfoSource(internalInfoDataSourceImpl: InternDataSourceImpl): - InternDataSource - - @Binds - @Singleton - abstract fun bindTokenReissueDataSource(tokenReissueDataSourceImpl: TokenReissueDataSourceImpl): TokenReissueDataSource - - @Binds - @Singleton - abstract fun bindFilteringDataSource(filteringDataSourceImpl: FilteringDataSourceImpl): FilteringDataSource - - @Binds - @Singleton - abstract fun bindHomeDataSource(homeDataSourceImpl: HomeDataSourceImpl): HomeDataSource - - @Binds - @Singleton - abstract fun bindScrapDataSource(scrapDataSourceImpl: ScrapDataSourceImpl): ScrapDataSource - - @Binds - @Singleton - abstract fun bindMyPageDataSource(myPageDataSourceImpl: MyPageDataSourceImpl): MyPageDataSource -} \ No newline at end of file diff --git a/app/src/main/java/com/terning/point/di/RepositoryModule.kt b/app/src/main/java/com/terning/point/di/RepositoryModule.kt deleted file mode 100644 index 7c464b39b..000000000 --- a/app/src/main/java/com/terning/point/di/RepositoryModule.kt +++ /dev/null @@ -1,72 +0,0 @@ -package com.terning.point.di - -import com.terning.data.repositoryimpl.AuthRepositoryImpl -import com.terning.data.repositoryimpl.CalendarRepositoryImpl -import com.terning.data.repositoryimpl.FilteringRepositoryImpl -import com.terning.data.repositoryimpl.InternRepositoryImpl -import com.terning.data.repositoryimpl.HomeRepositoryImpl -import com.terning.data.repositoryimpl.MyPageRepositoryImpl -import com.terning.data.repositoryimpl.ScrapRepositoryImpl -import com.terning.data.repositoryimpl.SearchRepositoryImpl -import com.terning.data.repositoryimpl.TokenReissueRepositoryImpl -import com.terning.data.repositoryimpl.TokenRepositoryImpl -import com.terning.domain.repository.AuthRepository -import com.terning.domain.repository.CalendarRepository -import com.terning.domain.repository.FilteringRepository -import com.terning.domain.repository.InternRepository -import com.terning.domain.repository.HomeRepository -import com.terning.domain.repository.MyPageRepository -import com.terning.domain.repository.ScrapRepository -import com.terning.domain.repository.SearchRepository -import com.terning.domain.repository.TokenReissueRepository -import com.terning.domain.repository.TokenRepository -import dagger.Binds -import dagger.Module -import dagger.hilt.InstallIn -import dagger.hilt.components.SingletonComponent -import javax.inject.Singleton - -@Module -@InstallIn(SingletonComponent::class) -abstract class RepositoryModule { - - @Binds - @Singleton - abstract fun calendarRepository(calendarRepositoryImpl: CalendarRepositoryImpl): CalendarRepository - - @Binds - @Singleton - abstract fun bindAuthRepository(authRepositoryImpl: AuthRepositoryImpl): AuthRepository - - @Binds - @Singleton - abstract fun bindTokenRepository(tokenRepositoryImpl: TokenRepositoryImpl): TokenRepository - - @Binds - @Singleton - abstract fun bindSearchRepository(searchRepositoryImpl: SearchRepositoryImpl): SearchRepository - - @Binds - @Singleton - abstract fun bindInternRepository(internRepositoryImpl: InternRepositoryImpl): InternRepository - - @Binds - @Singleton - abstract fun bindTokenReissueRepository(tokenReissueRepositoryImpl: TokenReissueRepositoryImpl): TokenReissueRepository - - @Binds - @Singleton - abstract fun bindFilteringRepository(filteringRepositoryImpl: FilteringRepositoryImpl): FilteringRepository - - @Binds - @Singleton - abstract fun bindHomeRepository(homeRepositoryImpl: HomeRepositoryImpl): HomeRepository - - @Binds - @Singleton - abstract fun bindScrapRepository(scrapRepositoryImpl: ScrapRepositoryImpl): ScrapRepository - - @Binds - @Singleton - abstract fun bindMyPageRepository(myPageRepositoryImpl: MyPageRepositoryImpl): MyPageRepository -} \ No newline at end of file diff --git a/app/src/main/java/com/terning/point/di/ServiceModule.kt b/app/src/main/java/com/terning/point/di/ServiceModule.kt deleted file mode 100644 index aec78f3b2..000000000 --- a/app/src/main/java/com/terning/point/di/ServiceModule.kt +++ /dev/null @@ -1,70 +0,0 @@ -package com.terning.point.di - -import com.terning.data.service.AuthService -import com.terning.data.service.CalendarService -import com.terning.data.service.InternService -import com.terning.data.service.FilteringService -import com.terning.data.service.HomeService -import com.terning.data.service.MyPageService -import com.terning.data.service.ScrapService -import com.terning.data.service.SearchService -import com.terning.data.service.TokenReissueService -import com.terning.point.di.qualifier.JWT -import com.terning.point.di.qualifier.REISSUE -import dagger.Module -import dagger.Provides -import dagger.hilt.InstallIn -import dagger.hilt.components.SingletonComponent -import retrofit2.Retrofit -import javax.inject.Singleton - -@Module -@InstallIn(SingletonComponent::class) -object ServiceModule { - - @Provides - @Singleton - fun provideAuthService(@JWT retrofit: Retrofit): AuthService = - retrofit.create(AuthService::class.java) - - @Provides - @Singleton - fun provideSearchService(@JWT retrofit: Retrofit): SearchService = - retrofit.create(SearchService::class.java) - - @Provides - @Singleton - fun providerInternService(@JWT retrofit: Retrofit): InternService = - retrofit.create(InternService::class.java) - - @Provides - @Singleton - fun provideCalendarService(@JWT retrofit: Retrofit): CalendarService = - retrofit.create(CalendarService::class.java) - - - @Provides - @Singleton - fun provideTokenReissueService(@REISSUE retrofit: Retrofit): TokenReissueService = - retrofit.create(TokenReissueService::class.java) - - @Provides - @Singleton - fun provideFilteringService(@JWT retrofit: Retrofit): FilteringService = - retrofit.create(FilteringService::class.java) - - @Provides - @Singleton - fun provideHomeService(@JWT retrofit: Retrofit): HomeService = - retrofit.create(HomeService::class.java) - - @Provides - @Singleton - fun provideMyPageService(@JWT retrofit: Retrofit): MyPageService = - retrofit.create(MyPageService::class.java) - - @Provides - @Singleton - fun provideScrapService(@JWT retrofit: Retrofit): ScrapService = - retrofit.create(ScrapService::class.java) -} \ No newline at end of file diff --git a/app/src/test/java/com/terning/point/ExampleUnitTest.kt b/app/src/test/java/com/terning/point/ExampleUnitTest.kt deleted file mode 100644 index 35d5aa8a7..000000000 --- a/app/src/test/java/com/terning/point/ExampleUnitTest.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.terning.point - -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/build-logic/.gitignore b/build-logic/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/build-logic/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts new file mode 100644 index 000000000..37c0c62bd --- /dev/null +++ b/build-logic/build.gradle.kts @@ -0,0 +1,22 @@ +plugins { + `kotlin-dsl` + `kotlin-dsl-precompiled-script-plugins` +} + +dependencies { + implementation(libs.android.gradlePlugin) + implementation(libs.kotlin.gradlePlugin) + compileOnly(libs.compose.compiler.gradle.plugin) +} + +tasks.named("compileTestKotlin") { + dependsOn("clean") +} + +tasks.named("processTestResources") { + dependsOn("compileTestKotlin") +} + +tasks.named("testClasses") { + dependsOn("processTestResources") +} \ No newline at end of file diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts new file mode 100644 index 000000000..1c8e42f8d --- /dev/null +++ b/build-logic/settings.gradle.kts @@ -0,0 +1,13 @@ +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") +@Suppress("UnstableApiUsage") +dependencyResolutionManagement { + repositories { + google() + mavenCentral() + } + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} \ No newline at end of file diff --git a/build-logic/src/main/java/com/terning/build_logic/convention/ComposeAndroid.kt b/build-logic/src/main/java/com/terning/build_logic/convention/ComposeAndroid.kt new file mode 100644 index 000000000..29e93c13d --- /dev/null +++ b/build-logic/src/main/java/com/terning/build_logic/convention/ComposeAndroid.kt @@ -0,0 +1,35 @@ +package com.terning.build_logic.convention + +import com.android.build.gradle.BaseExtension +import com.terning.build_logic.extension.libs +import org.gradle.api.Project +import org.gradle.kotlin.dsl.dependencies +import org.gradle.kotlin.dsl.getByType + +internal fun Project.configureComposeAndroid() { + + val libs = extensions.libs + + extensions.getByType().apply { + composeOptions { + kotlinCompilerExtensionVersion = + libs.findVersion("kotlinCompilerExtensionVersion").get().requiredVersion + } + } + + extensions.getByType().apply { + buildFeatures.compose = true + } + + dependencies { + add("implementation", libs.findLibrary("androidx.compose.material3").get()) + add("implementation", libs.findLibrary("androidx.compose.ui").get()) + add("implementation", libs.findLibrary("compose.ui.tooling").get()) + add("implementation", libs.findLibrary("hilt.navigation.compose").get()) + add("implementation", libs.findLibrary("androidx.navigation.compose").get()) + add("implementation", libs.findLibrary("androidx.lifecycle.runtime.compose.android").get()) + add("implementation", libs.findLibrary("androidx.compose.saveable").get()) + add("implementation", libs.findLibrary("androidx.lifecycle.runtimeCompose").get()) + add("implementation", libs.findLibrary("androidx.lifecycle.viewModelCompose").get()) + } +} diff --git a/build-logic/src/main/java/com/terning/build_logic/convention/CoroutineAndroid.kt b/build-logic/src/main/java/com/terning/build_logic/convention/CoroutineAndroid.kt new file mode 100644 index 000000000..ed05c704b --- /dev/null +++ b/build-logic/src/main/java/com/terning/build_logic/convention/CoroutineAndroid.kt @@ -0,0 +1,21 @@ +package com.terning.build_logic.convention + +import com.terning.build_logic.extension.libs +import org.gradle.api.Project +import org.gradle.kotlin.dsl.dependencies + +internal fun Project.configureCoroutineAndroid() { + val libs = extensions.libs + configureCoroutineKotlin() + dependencies { + "implementation"(libs.findLibrary("coroutines.android").get()) + } +} + +internal fun Project.configureCoroutineKotlin() { + val libs = extensions.libs + dependencies { + "implementation"(libs.findLibrary("coroutines.core").get()) + "testImplementation"(libs.findLibrary("coroutines.test").get()) + } +} \ No newline at end of file diff --git a/build-logic/src/main/java/com/terning/build_logic/convention/HiltAndroid.kt b/build-logic/src/main/java/com/terning/build_logic/convention/HiltAndroid.kt new file mode 100644 index 000000000..3204a66db --- /dev/null +++ b/build-logic/src/main/java/com/terning/build_logic/convention/HiltAndroid.kt @@ -0,0 +1,29 @@ +package com.terning.build_logic.convention + +import com.terning.build_logic.extension.libs +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.kotlin.dsl.dependencies + +internal fun Project.configureHiltAndroid() { + with(pluginManager) { + apply("dagger.hilt.android.plugin") + apply("com.google.devtools.ksp") + } + + val libs = extensions.libs + dependencies { + "implementation"(libs.findLibrary("hilt.android").get()) + "ksp"(libs.findLibrary("hilt.android.compiler").get()) + "kspAndroidTest"(libs.findLibrary("hilt.android.compiler").get()) + } +} + +internal class HiltAndroidPlugin : Plugin { + + override fun apply(target: Project) { + with(target) { + configureHiltAndroid() + } + } +} \ No newline at end of file diff --git a/build-logic/src/main/java/com/terning/build_logic/convention/HiltKotlin.kt b/build-logic/src/main/java/com/terning/build_logic/convention/HiltKotlin.kt new file mode 100644 index 000000000..da0c0d201 --- /dev/null +++ b/build-logic/src/main/java/com/terning/build_logic/convention/HiltKotlin.kt @@ -0,0 +1,18 @@ +package com.terning.build_logic.convention + +import com.terning.build_logic.extension.libs +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.kotlin.dsl.dependencies + +internal fun Project.configureHiltKotlin() { + with(pluginManager) { + apply("com.google.devtools.ksp") + } + + val libs = extensions.libs + dependencies { + "implementation"(libs.findLibrary("hilt.core").get()) + "ksp"(libs.findLibrary("hilt.compiler").get()) + } +} diff --git a/build-logic/src/main/java/com/terning/build_logic/convention/KotlinAndroid.kt b/build-logic/src/main/java/com/terning/build_logic/convention/KotlinAndroid.kt new file mode 100644 index 000000000..8d579443b --- /dev/null +++ b/build-logic/src/main/java/com/terning/build_logic/convention/KotlinAndroid.kt @@ -0,0 +1,66 @@ +package com.terning.build_logic.convention + +import com.terning.build_logic.extension.androidExtension +import com.terning.build_logic.extension.libs +import org.gradle.api.JavaVersion +import org.gradle.api.Project +import org.gradle.kotlin.dsl.dependencies +import org.gradle.kotlin.dsl.provideDelegate +import org.gradle.kotlin.dsl.withType +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +internal fun Project.configureKotlinAndroid() { + val libs = extensions.libs + + // Plugins + pluginManager.apply("org.jetbrains.kotlin.android") + + // Android settings + androidExtension.apply { + compileSdk = libs.findVersion("compileSdk").get().requiredVersion.toInt() + + defaultConfig { + minSdk = libs.findVersion("minSdk").get().requiredVersion.toInt() + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + isCoreLibraryDesugaringEnabled = true + } + + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + } + + configureKotlin() + + dependencies { + add("coreLibraryDesugaring", libs.findLibrary("android.desugarJdkLibs").get()) + } +} + +internal fun Project.configureKotlin() { + tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_1_8) + // Treat all Kotlin warnings as errors (disabled by default) + // Override by setting warningsAsErrors=true in your ~/.gradle/gradle.properties + val warningsAsErrors: String? by project + allWarningsAsErrors.set(warningsAsErrors.toBoolean()) + freeCompilerArgs.set( + freeCompilerArgs.get() + listOf( + "-opt-in=kotlin.RequiresOptIn", + ) + ) + } + } +} diff --git a/build-logic/src/main/java/com/terning/build_logic/convention/SerializationAndroid.kt b/build-logic/src/main/java/com/terning/build_logic/convention/SerializationAndroid.kt new file mode 100644 index 000000000..60e183ff2 --- /dev/null +++ b/build-logic/src/main/java/com/terning/build_logic/convention/SerializationAndroid.kt @@ -0,0 +1,17 @@ +package com.terning.build_logic.convention + +import com.terning.build_logic.extension.libs +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.kotlin.dsl.dependencies + +internal fun Project.configureSerializationAndroid() { + with(pluginManager) { + apply("org.jetbrains.kotlin.plugin.serialization") + } + + val libs = extensions.libs + dependencies { + add("implementation", libs.findLibrary("kotlinx.serialization.json").get()) + } +} \ No newline at end of file diff --git a/build-logic/src/main/java/com/terning/build_logic/extension/AndroidExtension.kt b/build-logic/src/main/java/com/terning/build_logic/extension/AndroidExtension.kt new file mode 100644 index 000000000..bf86b55b3 --- /dev/null +++ b/build-logic/src/main/java/com/terning/build_logic/extension/AndroidExtension.kt @@ -0,0 +1,25 @@ +package com.terning.build_logic.extension + +import com.android.build.api.dsl.ApplicationExtension +import com.android.build.api.dsl.CommonExtension +import com.android.build.api.dsl.LibraryExtension +import org.gradle.api.Project +import org.gradle.api.artifacts.VersionCatalog +import org.gradle.api.artifacts.VersionCatalogsExtension +import org.gradle.api.plugins.ExtensionContainer +import org.gradle.kotlin.dsl.getByType + +internal val Project.applicationExtension: CommonExtension<*, *, *, *, *, *> + get() = extensions.getByType() + +internal val Project.libraryExtension: CommonExtension<*, *, *, *, *, *> + get() = extensions.getByType() + +internal val Project.androidExtension: CommonExtension<*, *, *, *, *, *> + get() = runCatching { libraryExtension } + .recoverCatching { applicationExtension } + .onFailure { println("Could not find Library or Application extension from this project") } + .getOrThrow() + +internal val ExtensionContainer.libs: VersionCatalog + get() = getByType().named("libs") diff --git a/build-logic/src/main/java/com/terning/build_logic/extension/NameSpaceExtension.kt b/build-logic/src/main/java/com/terning/build_logic/extension/NameSpaceExtension.kt new file mode 100644 index 000000000..a390d1cc7 --- /dev/null +++ b/build-logic/src/main/java/com/terning/build_logic/extension/NameSpaceExtension.kt @@ -0,0 +1,10 @@ +package com.terning.build_logic.extension + +import com.android.build.gradle.BaseExtension +import org.gradle.api.Project + +fun Project.setNamespace(name: String) { + extensions.findByType(BaseExtension::class.java)?.apply { + namespace = "com.terning.$name" + } +} \ No newline at end of file diff --git a/build-logic/src/main/java/terning.android.application.gradle.kts b/build-logic/src/main/java/terning.android.application.gradle.kts new file mode 100644 index 000000000..cebafa412 --- /dev/null +++ b/build-logic/src/main/java/terning.android.application.gradle.kts @@ -0,0 +1,9 @@ +import com.terning.build_logic.convention.configureHiltAndroid +import com.terning.build_logic.convention.configureKotlinAndroid + +plugins { + id("com.android.application") +} + +configureKotlinAndroid() +configureHiltAndroid() \ No newline at end of file diff --git a/build-logic/src/main/java/terning.android.compose.gradle.kts b/build-logic/src/main/java/terning.android.compose.gradle.kts new file mode 100644 index 000000000..23c4f0401 --- /dev/null +++ b/build-logic/src/main/java/terning.android.compose.gradle.kts @@ -0,0 +1,3 @@ +import com.terning.build_logic.convention.configureComposeAndroid + +configureComposeAndroid() \ No newline at end of file diff --git a/build-logic/src/main/java/terning.android.data.gradle.kts b/build-logic/src/main/java/terning.android.data.gradle.kts new file mode 100644 index 000000000..d364583ea --- /dev/null +++ b/build-logic/src/main/java/terning.android.data.gradle.kts @@ -0,0 +1,36 @@ +import com.terning.build_logic.convention.configureHiltAndroid +import com.terning.build_logic.convention.configureSerializationAndroid +import com.terning.build_logic.extension.libs + +plugins { + id("terning.android.library") +} + +android { + packaging { + resources { + excludes.add("META-INF/**") + } + } + defaultConfig { + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } +} + +configureHiltAndroid() +configureSerializationAndroid() + +dependencies { + val libs = project.extensions.libs + + // modules + implementation(project(":core:network")) + + // ThirdPartyDependencies + implementation(libs.findLibrary("timber").get()) + implementation(libs.findLibrary("retrofit.core").get()) + implementation(libs.findLibrary("okhttp").get()) + implementation(platform(libs.findLibrary("okhttp.bom").get())) + implementation(libs.findLibrary("okhttp.logging").get()) + implementation(libs.findLibrary("retrofit2.kotlinx.serialization.converter.v080").get()) +} \ No newline at end of file diff --git a/build-logic/src/main/java/terning.android.feature.gradle.kts b/build-logic/src/main/java/terning.android.feature.gradle.kts new file mode 100644 index 000000000..1793f9dc8 --- /dev/null +++ b/build-logic/src/main/java/terning.android.feature.gradle.kts @@ -0,0 +1,39 @@ +import com.terning.build_logic.convention.configureHiltAndroid +import com.terning.build_logic.convention.configureSerializationAndroid +import com.terning.build_logic.extension.libs + +plugins { + id("terning.android.library") + id("terning.android.compose") +} + +android { + packaging { + resources { + excludes.add("META-INF/**") + } + } + defaultConfig { + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } +} + +configureHiltAndroid() +configureSerializationAndroid() + +dependencies { + val libs = project.extensions.libs + + // modules + implementation(project(":core:designsystem")) + implementation(project(":core:navigation")) + implementation(project(":core:analytics")) + + // ThirdPartyDependencies + implementation(libs.findLibrary("coil.compose").get()) + implementation(libs.findLibrary("coil.network.okhttp").get()) + implementation(libs.findLibrary("timber").get()) + implementation(libs.findLibrary("lottie").get()) + implementation(libs.findLibrary("accompanist.systemuicontroller").get()) + implementation(libs.findLibrary("androidx.browser").get()) +} diff --git a/build-logic/src/main/java/terning.android.library.gradle.kts b/build-logic/src/main/java/terning.android.library.gradle.kts new file mode 100644 index 000000000..7827adc56 --- /dev/null +++ b/build-logic/src/main/java/terning.android.library.gradle.kts @@ -0,0 +1,11 @@ +import com.terning.build_logic.convention.configureCoroutineAndroid +import com.terning.build_logic.convention.configureHiltAndroid +import com.terning.build_logic.convention.configureKotlinAndroid + +plugins { + id("com.android.library") +} + +configureKotlinAndroid() +configureCoroutineAndroid() +configureHiltAndroid() \ No newline at end of file diff --git a/build-logic/src/main/java/terning.kotlin.library.gradle.kts b/build-logic/src/main/java/terning.kotlin.library.gradle.kts new file mode 100644 index 000000000..adb1b0651 --- /dev/null +++ b/build-logic/src/main/java/terning.kotlin.library.gradle.kts @@ -0,0 +1,11 @@ +import com.terning.build_logic.convention.configureKotlin + +plugins { + kotlin("jvm") +} + +kotlin { + jvmToolchain(8) +} + +configureKotlin() \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 0e4b0d2f0..f36e0f76e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,5 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. +@file:Suppress("DSL_SCOPE_VIOLATION") + plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.kotlin.android) apply false diff --git a/core/analytics/.gitignore b/core/analytics/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/core/analytics/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/core/analytics/build.gradle.kts b/core/analytics/build.gradle.kts new file mode 100644 index 000000000..2d3e49cb0 --- /dev/null +++ b/core/analytics/build.gradle.kts @@ -0,0 +1,39 @@ +import java.util.Properties +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.library) + alias(libs.plugins.terning.compose) +} + +val properties = Properties().apply { + load(rootProject.file("local.properties").inputStream()) +} + +android { + setNamespace("core.analytics") + + buildTypes { + debug { + val devAmplitude = properties["amplitudeDevKey"] as? String ?: "" + buildConfigField("String", "AMPLITUDE_KEY", devAmplitude) + } + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + val prodAmplitude = properties["amplitudeProdKey"] as? String ?: "" + buildConfigField("String", "AMPLITUDE_KEY", prodAmplitude) + } + } + buildFeatures { + buildConfig = true + } +} + +dependencies { + implementation(libs.amplitude) + implementation(libs.timber) +} \ No newline at end of file diff --git a/core/proguard-rules.pro b/core/analytics/proguard-rules.pro similarity index 100% rename from core/proguard-rules.pro rename to core/analytics/proguard-rules.pro diff --git a/core/src/main/AndroidManifest.xml b/core/analytics/src/main/AndroidManifest.xml similarity index 100% rename from core/src/main/AndroidManifest.xml rename to core/analytics/src/main/AndroidManifest.xml diff --git a/core/src/main/java/com/terning/core/analytics/AmplitudeTracker.kt b/core/analytics/src/main/java/com/terning/core/analytics/AmplitudeTracker.kt similarity index 84% rename from core/src/main/java/com/terning/core/analytics/AmplitudeTracker.kt rename to core/analytics/src/main/java/com/terning/core/analytics/AmplitudeTracker.kt index 3340bcc90..34bb25014 100644 --- a/core/src/main/java/com/terning/core/analytics/AmplitudeTracker.kt +++ b/core/analytics/src/main/java/com/terning/core/analytics/AmplitudeTracker.kt @@ -4,7 +4,8 @@ import android.content.Context import androidx.compose.runtime.staticCompositionLocalOf import com.amplitude.android.Amplitude import com.amplitude.android.Configuration -import com.terning.core.BuildConfig +import com.amplitude.common.android.BuildConfig.DEBUG +import com.terning.core.analytics.BuildConfig.AMPLITUDE_KEY import dagger.hilt.android.qualifiers.ApplicationContext import timber.log.Timber import javax.inject.Inject @@ -18,13 +19,13 @@ class AmplitudeTracker @Inject constructor( ) { private val amplitude = Amplitude( Configuration( - apiKey = BuildConfig.AMPLITUDE_KEY, + apiKey = AMPLITUDE_KEY, context = context ) ) fun track(type: EventType, name: String, properties: Map = emptyMap()) { - if (BuildConfig.DEBUG) { + if (DEBUG) { Timber.d("Amplitude: ${type.prefix}_$name properties: $properties") } amplitude.track(eventType = "${type.prefix}_$name", eventProperties = properties) diff --git a/core/src/main/java/com/terning/core/analytics/EventType.kt b/core/analytics/src/main/java/com/terning/core/analytics/EventType.kt similarity index 100% rename from core/src/main/java/com/terning/core/analytics/EventType.kt rename to core/analytics/src/main/java/com/terning/core/analytics/EventType.kt diff --git a/core/build.gradle.kts b/core/build.gradle.kts deleted file mode 100644 index f15513f9b..000000000 --- a/core/build.gradle.kts +++ /dev/null @@ -1,99 +0,0 @@ -import java.util.Properties - -plugins { - alias(libs.plugins.android.library) - alias(libs.plugins.kotlin.android) - alias(libs.plugins.dokka) -} - -val properties = Properties().apply { - load(rootProject.file("local.properties").inputStream()) -} - -android { - namespace = "com.terning.core" - compileSdk = libs.versions.compileSdk.get().toInt() - - defaultConfig { - minSdk = libs.versions.minSdk.get().toInt() - - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles("consumer-rules.pro") - } - - buildTypes { - debug { - val devAmplitude = properties["amplitudeDevKey"] as? String ?: "" - buildConfigField("String", "AMPLITUDE_KEY", devAmplitude) - } - - release { - isMinifyEnabled = false - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) - val prodAmplitude = properties["amplitudeProdKey"] as? String ?: "" - buildConfigField("String", "AMPLITUDE_KEY", prodAmplitude) - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } - kotlinOptions { - jvmTarget = libs.versions.jvmTarget.get() - } - buildFeatures { - compose = true - buildConfig = true - } - composeOptions { - kotlinCompilerExtensionVersion = libs.versions.kotlinCompilerExtensionVersion.get() - } -} - -tasks.dokkaHtml.configure { - dokkaSourceSets { - named("main") { - includes.from("docs.md") - noAndroidSdkLink.set(false) - } - } -} - -dependencies { - // Kotlin - implementation(libs.kotlin) - - // AndroidXDependencies - implementation(libs.androidx.lifecycle.runtime.ktx) - implementation(libs.androidx.compose.saveable) - - // Hilt - implementation(libs.hilt.android) - - // Material Design - implementation(libs.material) - implementation(libs.androidx.ui) - implementation(libs.androidx.ui.graphics) - implementation(libs.androidx.foundation.android) - implementation(libs.androidx.material3.android) - - // Compose Preview - implementation(libs.compose.ui.tooling) - - // Test Dependency - testImplementation(libs.junit) - androidTestImplementation(libs.androidx.junit) - androidTestImplementation(libs.androidx.espresso.core) - - //ThirdPartyDependencies - implementation(libs.coil.compose) - implementation(libs.coil.network.okhttp) - implementation(libs.okhttp) - implementation(libs.lottie) - implementation(libs.amplitude) - implementation(libs.timber) -} \ No newline at end of file diff --git a/core/consumer-rules.pro b/core/consumer-rules.pro deleted file mode 100644 index e69de29bb..000000000 diff --git a/core/designsystem/.gitignore b/core/designsystem/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/core/designsystem/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/core/designsystem/build.gradle.kts b/core/designsystem/build.gradle.kts new file mode 100644 index 000000000..023587850 --- /dev/null +++ b/core/designsystem/build.gradle.kts @@ -0,0 +1,26 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.library) + alias(libs.plugins.terning.compose) + alias(libs.plugins.dokka) +} + +android { + setNamespace("core.designsystem") +} + +tasks.dokkaHtml.configure { + dokkaSourceSets { + named("main") { + includes.from("docs.md") + noAndroidSdkLink.set(false) + } + } +} + +dependencies { + implementation(libs.lottie) + implementation(libs.coil.compose) + implementation(libs.coil.network.okhttp) +} \ No newline at end of file diff --git a/core/docs.md b/core/designsystem/docs.md similarity index 83% rename from core/docs.md rename to core/designsystem/docs.md index a2447db18..be01e6847 100644 --- a/core/docs.md +++ b/core/designsystem/docs.md @@ -25,14 +25,14 @@ contentDescription을 사용하지 않는 Image가 담긴 패키지입니다. # Package com.terning.core.designsystem.theme 의 theme가 있는 패키지입니다. -# Package com.terning.core.extension -확장함수를 모아놓은 패키지입니다. +# Package com.terning.core.designsystem.type +여러 가지 타입을 나타내는 패키지입니다. -# Package com.terning.core.navigation -네비게이션 루트가 있는 패키지입니다. +# Package com.terning.core.designsystem.extension +확장함수를 모아놓은 패키지입니다. -# Package com.terning.core.state +# Package com.terning.core.designsystem.state 기본 상태를 나타내는 파일이 있는 패키지입니다. -# Package com.terning.core.util +# Package com.terning.core.designsystem.util 여러 곳에서 유용하게 쓰이는 객체를 모아놓은 패키지입니다. diff --git a/data/src/main/AndroidManifest.xml b/core/designsystem/src/main/AndroidManifest.xml similarity index 100% rename from data/src/main/AndroidManifest.xml rename to core/designsystem/src/main/AndroidManifest.xml diff --git a/core/src/main/java/com/terning/core/designsystem/component/bottomsheet/MyPageLogoutBottomSheet.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/bottomsheet/MyPageLogoutBottomSheet.kt similarity index 99% rename from core/src/main/java/com/terning/core/designsystem/component/bottomsheet/MyPageLogoutBottomSheet.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/bottomsheet/MyPageLogoutBottomSheet.kt index 9d7e9d318..bba763c15 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/bottomsheet/MyPageLogoutBottomSheet.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/bottomsheet/MyPageLogoutBottomSheet.kt @@ -13,7 +13,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp -import com.terning.core.R +import com.terning.core.designsystem.R import com.terning.core.designsystem.component.button.DeleteRoundButton import com.terning.core.designsystem.component.button.RoundButton import com.terning.core.designsystem.theme.Grey400 diff --git a/core/src/main/java/com/terning/core/designsystem/component/bottomsheet/MyPageQuitBottomSheet.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/bottomsheet/MyPageQuitBottomSheet.kt similarity index 99% rename from core/src/main/java/com/terning/core/designsystem/component/bottomsheet/MyPageQuitBottomSheet.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/bottomsheet/MyPageQuitBottomSheet.kt index dd8717115..9a29a79ac 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/bottomsheet/MyPageQuitBottomSheet.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/bottomsheet/MyPageQuitBottomSheet.kt @@ -14,7 +14,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp -import com.terning.core.R +import com.terning.core.designsystem.R import com.terning.core.designsystem.component.button.DeleteRoundButton import com.terning.core.designsystem.component.button.RoundButton import com.terning.core.designsystem.theme.Grey400 diff --git a/core/src/main/java/com/terning/core/designsystem/component/bottomsheet/ProfileBottomSheet.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/bottomsheet/ProfileBottomSheet.kt similarity index 95% rename from core/src/main/java/com/terning/core/designsystem/component/bottomsheet/ProfileBottomSheet.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/bottomsheet/ProfileBottomSheet.kt index f9a1c8ddc..587fe7c8b 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/bottomsheet/ProfileBottomSheet.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/bottomsheet/ProfileBottomSheet.kt @@ -25,11 +25,11 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp -import com.terning.core.R +import com.terning.core.designsystem.extension.noRippleClickable +import com.terning.core.designsystem.type.ProfileImage +import com.terning.core.designsystem.type.SelectedProfileImage +import com.terning.core.designsystem.R import com.terning.core.designsystem.theme.TerningTheme -import com.terning.core.extension.noRippleClickable -import com.terning.core.type.ProfileImage -import com.terning.core.type.SelectedProfileImage import kotlinx.coroutines.launch /** diff --git a/core/src/main/java/com/terning/core/designsystem/component/bottomsheet/SortingBottomSheet.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/bottomsheet/SortingBottomSheet.kt similarity index 95% rename from core/src/main/java/com/terning/core/designsystem/component/bottomsheet/SortingBottomSheet.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/bottomsheet/SortingBottomSheet.kt index 4f5b1e3d3..5ec838780 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/bottomsheet/SortingBottomSheet.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/bottomsheet/SortingBottomSheet.kt @@ -16,14 +16,14 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp -import com.terning.core.R +import com.terning.core.designsystem.R +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.Black import com.terning.core.designsystem.theme.Grey200 import com.terning.core.designsystem.theme.Grey400 import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningTheme -import com.terning.core.extension.noRippleClickable -import com.terning.core.type.SortBy +import com.terning.core.designsystem.type.SortBy import kotlinx.coroutines.launch @OptIn(ExperimentalMaterial3Api::class) diff --git a/core/src/main/java/com/terning/core/designsystem/component/bottomsheet/TerningBasicBottomSheet.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/bottomsheet/TerningBasicBottomSheet.kt similarity index 100% rename from core/src/main/java/com/terning/core/designsystem/component/bottomsheet/TerningBasicBottomSheet.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/bottomsheet/TerningBasicBottomSheet.kt diff --git a/core/src/main/java/com/terning/core/designsystem/component/button/ChangeFilterButton.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/ChangeFilterButton.kt similarity index 98% rename from core/src/main/java/com/terning/core/designsystem/component/button/ChangeFilterButton.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/button/ChangeFilterButton.kt index dbef1eb85..1fd8f49d9 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/button/ChangeFilterButton.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/ChangeFilterButton.kt @@ -28,7 +28,7 @@ import com.terning.core.designsystem.theme.Grey50 import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.util.NoRippleTheme +import com.terning.core.designsystem.util.NoRippleTheme @Composable fun ChangeFilterButton( diff --git a/core/src/main/java/com/terning/core/designsystem/component/button/DeleteRoundButton.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/DeleteRoundButton.kt similarity index 96% rename from core/src/main/java/com/terning/core/designsystem/component/button/DeleteRoundButton.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/button/DeleteRoundButton.kt index 94c2a85c9..427ca6f02 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/button/DeleteRoundButton.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/DeleteRoundButton.kt @@ -18,11 +18,11 @@ import androidx.compose.ui.text.TextStyle import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import com.terning.core.R +import com.terning.core.designsystem.R import com.terning.core.designsystem.theme.Grey150 import com.terning.core.designsystem.theme.Grey400 import com.terning.core.designsystem.theme.TerningPointTheme -import com.terning.core.util.NoRippleTheme +import com.terning.core.designsystem.util.NoRippleTheme /** * 취소 기능을 하는 버튼입니다. diff --git a/core/src/main/java/com/terning/core/designsystem/component/button/FilteringButton.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/FilteringButton.kt similarity index 97% rename from core/src/main/java/com/terning/core/designsystem/component/button/FilteringButton.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/button/FilteringButton.kt index 6a59e6f51..1ed2399f4 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/button/FilteringButton.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/FilteringButton.kt @@ -22,7 +22,7 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import com.terning.core.R +import com.terning.core.designsystem.R import com.terning.core.designsystem.theme.Grey150 import com.terning.core.designsystem.theme.Grey200 import com.terning.core.designsystem.theme.Grey375 @@ -32,7 +32,7 @@ import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningSub5 import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.util.NoRippleTheme +import com.terning.core.designsystem.util.NoRippleTheme /** * 온보딩 과정에서 필터링을 설정할 때 사용되는 버튼입니다. diff --git a/core/src/main/java/com/terning/core/designsystem/component/button/RectangleButton.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/RectangleButton.kt similarity index 97% rename from core/src/main/java/com/terning/core/designsystem/component/button/RectangleButton.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/button/RectangleButton.kt index 431102e21..32644e98b 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/button/RectangleButton.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/RectangleButton.kt @@ -8,7 +8,7 @@ import androidx.compose.ui.text.TextStyle import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import com.terning.core.R +import com.terning.core.designsystem.R import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme diff --git a/core/src/main/java/com/terning/core/designsystem/component/button/RoundButton.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/RoundButton.kt similarity index 98% rename from core/src/main/java/com/terning/core/designsystem/component/button/RoundButton.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/button/RoundButton.kt index 8ab383b38..d826947a4 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/button/RoundButton.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/RoundButton.kt @@ -8,7 +8,7 @@ import androidx.compose.ui.text.TextStyle import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import com.terning.core.R +import com.terning.core.designsystem.R import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme diff --git a/core/src/main/java/com/terning/core/designsystem/component/button/SortingButton.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/SortingButton.kt similarity index 90% rename from core/src/main/java/com/terning/core/designsystem/component/button/SortingButton.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/button/SortingButton.kt index 162e19b33..e76831d47 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/button/SortingButton.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/SortingButton.kt @@ -9,11 +9,11 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp -import com.terning.core.R -import com.terning.core.type.SortBy +import com.terning.core.designsystem.R +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.Black import com.terning.core.designsystem.theme.TerningTheme -import com.terning.core.extension.noRippleClickable +import com.terning.core.designsystem.type.SortBy @Composable fun SortingButton( diff --git a/core/src/main/java/com/terning/core/designsystem/component/button/TerningBasicButton.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/TerningBasicButton.kt similarity index 97% rename from core/src/main/java/com/terning/core/designsystem/component/button/TerningBasicButton.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/button/TerningBasicButton.kt index 2b4ac9788..e450d9132 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/button/TerningBasicButton.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/TerningBasicButton.kt @@ -20,7 +20,7 @@ import androidx.compose.ui.text.TextStyle import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import com.terning.core.R +import com.terning.core.designsystem.R import com.terning.core.designsystem.theme.Grey150 import com.terning.core.designsystem.theme.Grey350 import com.terning.core.designsystem.theme.TerningMain @@ -28,7 +28,7 @@ import com.terning.core.designsystem.theme.TerningMain2 import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.util.NoRippleTheme +import com.terning.core.designsystem.util.NoRippleTheme /** * 기본 버튼 함수입니다. diff --git a/core/src/main/java/com/terning/core/designsystem/component/dialog/TerningBasicDialog.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/dialog/TerningBasicDialog.kt similarity index 96% rename from core/src/main/java/com/terning/core/designsystem/component/dialog/TerningBasicDialog.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/dialog/TerningBasicDialog.kt index 71f988df2..af2a3bc30 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/dialog/TerningBasicDialog.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/dialog/TerningBasicDialog.kt @@ -16,10 +16,10 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.window.Dialog import androidx.compose.ui.window.DialogProperties -import com.terning.core.R +import com.terning.core.designsystem.R +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.Grey300 import com.terning.core.designsystem.theme.White -import com.terning.core.extension.noRippleClickable /** * 앱에서 사용하는 다이얼로그의 기본 프레임입니다. diff --git a/core/src/main/java/com/terning/core/designsystem/component/image/TerningImage.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/image/TerningImage.kt similarity index 96% rename from core/src/main/java/com/terning/core/designsystem/component/image/TerningImage.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/image/TerningImage.kt index 0030fa4b3..409146036 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/image/TerningImage.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/image/TerningImage.kt @@ -6,7 +6,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview -import com.terning.core.R +import com.terning.core.designsystem.R import com.terning.core.designsystem.theme.TerningPointTheme /** diff --git a/core/src/main/java/com/terning/core/designsystem/component/item/InternItem.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/item/InternItem.kt similarity index 98% rename from core/src/main/java/com/terning/core/designsystem/component/item/InternItem.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/item/InternItem.kt index 5f3e04bca..96c370bc7 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/item/InternItem.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/item/InternItem.kt @@ -28,13 +28,13 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import coil3.compose.AsyncImage import coil3.request.ImageRequest -import com.terning.core.R +import com.terning.core.designsystem.R +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.Grey300 import com.terning.core.designsystem.theme.Grey400 import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme -import com.terning.core.extension.noRippleClickable /** * 홈, 달력, 검색 화면에서 공고를 나타낼 때 사용되는 뷰입니다. diff --git a/core/src/main/java/com/terning/core/designsystem/component/item/InternItemWithShadow.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/item/InternItemWithShadow.kt similarity index 93% rename from core/src/main/java/com/terning/core/designsystem/component/item/InternItemWithShadow.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/item/InternItemWithShadow.kt index cc0f59122..7641408f2 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/item/InternItemWithShadow.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/item/InternItemWithShadow.kt @@ -7,10 +7,9 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp +import com.terning.core.designsystem.extension.customShadow import com.terning.core.designsystem.theme.Grey200 import com.terning.core.designsystem.theme.White -import com.terning.core.extension.customShadow -import com.terning.core.extension.noRippleClickable @Composable fun InternItemWithShadow( diff --git a/core/src/main/java/com/terning/core/designsystem/component/item/ProfileWithPlusButton.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/item/ProfileWithPlusButton.kt similarity index 94% rename from core/src/main/java/com/terning/core/designsystem/component/item/ProfileWithPlusButton.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/item/ProfileWithPlusButton.kt index a8bccb6da..a63a03782 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/item/ProfileWithPlusButton.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/item/ProfileWithPlusButton.kt @@ -13,8 +13,8 @@ import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.res.painterResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import com.terning.core.R -import com.terning.core.type.ProfileImage +import com.terning.core.designsystem.R +import com.terning.core.designsystem.type.ProfileImage @Composable fun ProfileWithPlusButton( diff --git a/core/src/main/java/com/terning/core/designsystem/component/item/RadioButtonGroups.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/item/RadioButtonGroups.kt similarity index 100% rename from core/src/main/java/com/terning/core/designsystem/component/item/RadioButtonGroups.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/item/RadioButtonGroups.kt diff --git a/core/src/main/java/com/terning/core/designsystem/component/item/ScrapBox.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/item/ScrapBox.kt similarity index 100% rename from core/src/main/java/com/terning/core/designsystem/component/item/ScrapBox.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/item/ScrapBox.kt diff --git a/core/src/main/java/com/terning/core/designsystem/component/item/TerningLottieAnimation.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/item/TerningLottieAnimation.kt similarity index 84% rename from core/src/main/java/com/terning/core/designsystem/component/item/TerningLottieAnimation.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/item/TerningLottieAnimation.kt index 1e819a4b5..0c3938bc1 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/item/TerningLottieAnimation.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/item/TerningLottieAnimation.kt @@ -12,18 +12,18 @@ import com.airbnb.lottie.compose.rememberLottieComposition /** * 로티애니메이션을 표시하기 위한 컴포넌트입니다. * - * @param jsonString 로티애니메이션의 JSON 문자열로, assets 폴더에 있는 JSON 파일의 이름입니다. + * @param jsonFile 로티애니메이션의 JSON 문자열로, raw 폴더에 있는 JSON 파일의 이름입니다. * @param modifier 수정자입니다. * @param iterations 반복 횟수입니다. 기본값은 1회입니다. */ @Composable fun TerningLottieAnimation( - jsonString: String, + jsonFile: Int, modifier: Modifier = Modifier, iterations: Int = 1, ) { - val lottieComposition by rememberLottieComposition(LottieCompositionSpec.Asset(jsonString)) + val lottieComposition by rememberLottieComposition(LottieCompositionSpec.RawRes(jsonFile)) LottieAnimation( modifier = modifier.clip(RectangleShape), composition = lottieComposition, diff --git a/core/src/main/java/com/terning/core/designsystem/component/snackbar/TerningBasicSnackBar.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/snackbar/TerningBasicSnackBar.kt similarity index 100% rename from core/src/main/java/com/terning/core/designsystem/component/snackbar/TerningBasicSnackBar.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/snackbar/TerningBasicSnackBar.kt diff --git a/core/src/main/java/com/terning/core/designsystem/component/textfield/NameTextField.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/textfield/NameTextField.kt similarity index 97% rename from core/src/main/java/com/terning/core/designsystem/component/textfield/NameTextField.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/textfield/NameTextField.kt index 927c242cc..f6c8dbf39 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/textfield/NameTextField.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/textfield/NameTextField.kt @@ -8,7 +8,7 @@ import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.platform.LocalSoftwareKeyboardController import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.input.ImeAction -import com.terning.core.R +import com.terning.core.designsystem.R import com.terning.core.designsystem.theme.Black import com.terning.core.designsystem.theme.Grey300 import com.terning.core.designsystem.theme.Grey400 @@ -17,7 +17,7 @@ import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.WarningRed import com.terning.core.designsystem.theme.White -import com.terning.core.util.NAME_ERROR_REGEX +import com.terning.core.designsystem.util.NAME_ERROR_REGEX data class NameFieldState( val name: String, diff --git a/core/src/main/java/com/terning/core/designsystem/component/textfield/SearchTextField.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/textfield/SearchTextField.kt similarity index 100% rename from core/src/main/java/com/terning/core/designsystem/component/textfield/SearchTextField.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/textfield/SearchTextField.kt diff --git a/core/src/main/java/com/terning/core/designsystem/component/textfield/TerningBasicTextField.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/textfield/TerningBasicTextField.kt similarity index 100% rename from core/src/main/java/com/terning/core/designsystem/component/textfield/TerningBasicTextField.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/textfield/TerningBasicTextField.kt diff --git a/core/src/main/java/com/terning/core/designsystem/component/topappbar/BackButtonTopAppBar.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/topappbar/BackButtonTopAppBar.kt similarity index 100% rename from core/src/main/java/com/terning/core/designsystem/component/topappbar/BackButtonTopAppBar.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/topappbar/BackButtonTopAppBar.kt diff --git a/core/src/main/java/com/terning/core/designsystem/component/topappbar/CalendarTopAppBar.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/topappbar/CalendarTopAppBar.kt similarity index 96% rename from core/src/main/java/com/terning/core/designsystem/component/topappbar/CalendarTopAppBar.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/topappbar/CalendarTopAppBar.kt index f7c7d0a60..8e82e03e9 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/topappbar/CalendarTopAppBar.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/topappbar/CalendarTopAppBar.kt @@ -15,14 +15,14 @@ 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 com.terning.core.R +import com.terning.core.designsystem.R +import com.terning.core.designsystem.extension.getStringAsTitle +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.Black import com.terning.core.designsystem.theme.Grey300 import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme -import com.terning.core.extension.getStringAsTitle -import com.terning.core.extension.noRippleClickable import java.time.LocalDate import java.time.YearMonth diff --git a/core/src/main/java/com/terning/core/designsystem/component/topappbar/MyPageTopAppBar.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/topappbar/MyPageTopAppBar.kt similarity index 96% rename from core/src/main/java/com/terning/core/designsystem/component/topappbar/MyPageTopAppBar.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/topappbar/MyPageTopAppBar.kt index 6e2fef405..5b3058930 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/topappbar/MyPageTopAppBar.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/topappbar/MyPageTopAppBar.kt @@ -8,7 +8,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign -import com.terning.core.R +import com.terning.core.designsystem.R import com.terning.core.designsystem.theme.TerningTheme @Composable diff --git a/core/src/main/java/com/terning/core/designsystem/component/topappbar/TerningBasicTopAppBar.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/topappbar/TerningBasicTopAppBar.kt similarity index 95% rename from core/src/main/java/com/terning/core/designsystem/component/topappbar/TerningBasicTopAppBar.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/component/topappbar/TerningBasicTopAppBar.kt index f8abee4ce..7d3b1bd7b 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/topappbar/TerningBasicTopAppBar.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/topappbar/TerningBasicTopAppBar.kt @@ -14,10 +14,10 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp -import com.terning.core.R +import com.terning.core.designsystem.R +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.extension.noRippleClickable @OptIn(ExperimentalMaterial3Api::class) @Composable diff --git a/core/src/main/java/com/terning/core/extension/CalendarExt.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/extension/CalendarExt.kt similarity index 75% rename from core/src/main/java/com/terning/core/extension/CalendarExt.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/extension/CalendarExt.kt index 1bbc06b8a..562a2e6ee 100644 --- a/core/src/main/java/com/terning/core/extension/CalendarExt.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/extension/CalendarExt.kt @@ -1,4 +1,4 @@ -package com.terning.core.extension +package com.terning.core.designsystem.extension import java.util.Calendar diff --git a/core/src/main/java/com/terning/core/extension/ContextExt.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/extension/ContextExt.kt similarity index 90% rename from core/src/main/java/com/terning/core/extension/ContextExt.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/extension/ContextExt.kt index dd79389b8..728a24c32 100644 --- a/core/src/main/java/com/terning/core/extension/ContextExt.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/extension/ContextExt.kt @@ -1,4 +1,4 @@ -package com.terning.core.extension +package com.terning.core.designsystem.extension import android.content.Context import android.widget.Toast diff --git a/core/src/main/java/com/terning/core/extension/LocalDateExt.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/extension/LocalDateExt.kt similarity index 94% rename from core/src/main/java/com/terning/core/extension/LocalDateExt.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/extension/LocalDateExt.kt index efdad9462..e8942aa74 100644 --- a/core/src/main/java/com/terning/core/extension/LocalDateExt.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/extension/LocalDateExt.kt @@ -1,4 +1,4 @@ -package com.terning.core.extension +package com.terning.core.designsystem.extension import java.time.LocalDate import java.time.format.DateTimeFormatter diff --git a/core/src/main/java/com/terning/core/extension/Map.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/extension/Map.kt similarity index 60% rename from core/src/main/java/com/terning/core/extension/Map.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/extension/Map.kt index fab779e23..41ffea657 100644 --- a/core/src/main/java/com/terning/core/extension/Map.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/extension/Map.kt @@ -1,3 +1,3 @@ -package com.terning.core.extension +package com.terning.core.designsystem.extension fun List?.isListNotEmpty():Boolean = this.orEmpty().isNotEmpty() diff --git a/core/src/main/java/com/terning/core/extension/Modifier.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/extension/Modifier.kt similarity index 98% rename from core/src/main/java/com/terning/core/extension/Modifier.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/extension/Modifier.kt index 86f9aa963..d4abacab0 100644 --- a/core/src/main/java/com/terning/core/extension/Modifier.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/extension/Modifier.kt @@ -1,4 +1,4 @@ -package com.terning.core.extension +package com.terning.core.designsystem.extension import android.annotation.SuppressLint import android.graphics.BlurMaskFilter diff --git a/core/src/main/java/com/terning/core/extension/TextStyle.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/extension/TextStyle.kt similarity index 86% rename from core/src/main/java/com/terning/core/extension/TextStyle.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/extension/TextStyle.kt index b72217e3d..a77441767 100644 --- a/core/src/main/java/com/terning/core/extension/TextStyle.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/extension/TextStyle.kt @@ -1,4 +1,4 @@ -package com.terning.core.extension +package com.terning.core.designsystem.extension import androidx.compose.runtime.Composable import androidx.compose.ui.platform.LocalDensity diff --git a/core/src/main/java/com/terning/core/state/UiState.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/state/UiState.kt similarity index 85% rename from core/src/main/java/com/terning/core/state/UiState.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/state/UiState.kt index 0c78263a2..1988fdb40 100644 --- a/core/src/main/java/com/terning/core/state/UiState.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/state/UiState.kt @@ -1,4 +1,4 @@ -package com.terning.core.state +package com.terning.core.designsystem.state sealed interface UiState { data object Empty : UiState diff --git a/core/src/main/java/com/terning/core/designsystem/theme/Color.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/theme/Color.kt similarity index 100% rename from core/src/main/java/com/terning/core/designsystem/theme/Color.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/theme/Color.kt diff --git a/core/src/main/java/com/terning/core/designsystem/theme/Theme.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/theme/Theme.kt similarity index 100% rename from core/src/main/java/com/terning/core/designsystem/theme/Theme.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/theme/Theme.kt diff --git a/core/src/main/java/com/terning/core/designsystem/theme/Type.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/theme/Type.kt similarity index 99% rename from core/src/main/java/com/terning/core/designsystem/theme/Type.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/theme/Type.kt index a650fd23e..3d86124f4 100644 --- a/core/src/main/java/com/terning/core/designsystem/theme/Type.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/theme/Type.kt @@ -11,7 +11,7 @@ import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.em import androidx.compose.ui.unit.sp -import com.terning.core.R +import com.terning.core.designsystem.R val PretendardSemiBold = FontFamily(Font(R.font.pretendard_semibold)) val PretendardMedium = FontFamily(Font(R.font.pretendard_medium)) diff --git a/core/src/main/java/com/terning/core/type/ColorType.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/type/ColorType.kt similarity index 97% rename from core/src/main/java/com/terning/core/type/ColorType.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/type/ColorType.kt index b2ea4fe52..741cf53a5 100644 --- a/core/src/main/java/com/terning/core/type/ColorType.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/type/ColorType.kt @@ -1,4 +1,4 @@ -package com.terning.core.type +package com.terning.core.designsystem.type import androidx.compose.ui.graphics.Color import com.terning.core.designsystem.theme.CalBlue2 diff --git a/core/src/main/java/com/terning/core/type/Grade.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/type/Grade.kt similarity index 88% rename from core/src/main/java/com/terning/core/type/Grade.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/type/Grade.kt index 99fef5432..0429c2cdd 100644 --- a/core/src/main/java/com/terning/core/type/Grade.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/type/Grade.kt @@ -1,7 +1,7 @@ -package com.terning.core.type +package com.terning.core.designsystem.type import androidx.annotation.StringRes -import com.terning.core.R +import com.terning.core.designsystem.R enum class Grade( val stringValue: String, diff --git a/core/src/main/java/com/terning/core/type/ProfileImage.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/type/ProfileImage.kt similarity index 95% rename from core/src/main/java/com/terning/core/type/ProfileImage.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/type/ProfileImage.kt index 551485ee6..54c44ef3a 100644 --- a/core/src/main/java/com/terning/core/type/ProfileImage.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/type/ProfileImage.kt @@ -1,7 +1,7 @@ -package com.terning.core.type +package com.terning.core.designsystem.type import androidx.annotation.DrawableRes -import com.terning.core.R +import com.terning.core.designsystem.R enum class ProfileImage( @DrawableRes val drawableResId: Int, diff --git a/core/src/main/java/com/terning/core/type/SortBy.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/type/SortBy.kt similarity index 83% rename from core/src/main/java/com/terning/core/type/SortBy.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/type/SortBy.kt index d0a8411ec..426af5aae 100644 --- a/core/src/main/java/com/terning/core/type/SortBy.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/type/SortBy.kt @@ -1,7 +1,7 @@ -package com.terning.core.type +package com.terning.core.designsystem.type import androidx.annotation.StringRes -import com.terning.core.R +import com.terning.core.designsystem.R enum class SortBy( @StringRes val sortBy: Int, diff --git a/core/src/main/java/com/terning/core/type/WorkingPeriod.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/type/WorkingPeriod.kt similarity index 86% rename from core/src/main/java/com/terning/core/type/WorkingPeriod.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/type/WorkingPeriod.kt index d7a7328c8..3799285d3 100644 --- a/core/src/main/java/com/terning/core/type/WorkingPeriod.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/type/WorkingPeriod.kt @@ -1,7 +1,7 @@ -package com.terning.core.type +package com.terning.core.designsystem.type import androidx.annotation.StringRes -import com.terning.core.R +import com.terning.core.designsystem.R enum class WorkingPeriod( val stringValue: String, diff --git a/core/src/main/java/com/terning/core/util/CalendarDefaults.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/util/CalendarDefaults.kt similarity index 77% rename from core/src/main/java/com/terning/core/util/CalendarDefaults.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/util/CalendarDefaults.kt index 2d0cb8355..9bcd36ace 100644 --- a/core/src/main/java/com/terning/core/util/CalendarDefaults.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/util/CalendarDefaults.kt @@ -1,4 +1,4 @@ -package com.terning.core.util +package com.terning.core.designsystem.util object CalendarDefaults { const val START_YEAR = 2010 diff --git a/core/src/main/java/com/terning/core/util/NoRippleInteractionSource.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/util/NoRippleInteractionSource.kt similarity index 91% rename from core/src/main/java/com/terning/core/util/NoRippleInteractionSource.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/util/NoRippleInteractionSource.kt index d9d3c92f6..c37c9c432 100644 --- a/core/src/main/java/com/terning/core/util/NoRippleInteractionSource.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/util/NoRippleInteractionSource.kt @@ -1,4 +1,4 @@ -package com.terning.core.util +package com.terning.core.designsystem.util import androidx.compose.foundation.interaction.Interaction import androidx.compose.foundation.interaction.MutableInteractionSource diff --git a/core/src/main/java/com/terning/core/util/NoRippleTheme.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/util/NoRippleTheme.kt similarity index 91% rename from core/src/main/java/com/terning/core/util/NoRippleTheme.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/util/NoRippleTheme.kt index 9d4f7273f..0c38fcbb4 100644 --- a/core/src/main/java/com/terning/core/util/NoRippleTheme.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/util/NoRippleTheme.kt @@ -1,4 +1,4 @@ -package com.terning.core.util +package com.terning.core.designsystem.util import androidx.compose.material.ripple.RippleAlpha import androidx.compose.material.ripple.RippleTheme diff --git a/core/src/main/java/com/terning/core/util/Regex.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/util/Regex.kt similarity index 82% rename from core/src/main/java/com/terning/core/util/Regex.kt rename to core/designsystem/src/main/java/com/terning/core/designsystem/util/Regex.kt index 4fd047690..60bb6df5c 100644 --- a/core/src/main/java/com/terning/core/util/Regex.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/util/Regex.kt @@ -1,4 +1,4 @@ -package com.terning.core.util +package com.terning.core.designsystem.util import java.util.regex.Pattern diff --git a/core/src/main/res/drawable/ic_back.xml b/core/designsystem/src/main/res/drawable/ic_back.xml similarity index 100% rename from core/src/main/res/drawable/ic_back.xml rename to core/designsystem/src/main/res/drawable/ic_back.xml diff --git a/core/src/main/res/drawable/ic_bookmark_filled.xml b/core/designsystem/src/main/res/drawable/ic_bookmark_filled.xml similarity index 100% rename from core/src/main/res/drawable/ic_bookmark_filled.xml rename to core/designsystem/src/main/res/drawable/ic_bookmark_filled.xml diff --git a/core/src/main/res/drawable/ic_bookmark_outlined.xml b/core/designsystem/src/main/res/drawable/ic_bookmark_outlined.xml similarity index 100% rename from core/src/main/res/drawable/ic_bookmark_outlined.xml rename to core/designsystem/src/main/res/drawable/ic_bookmark_outlined.xml diff --git a/core/src/main/res/drawable/ic_calendar_list_selected.xml b/core/designsystem/src/main/res/drawable/ic_calendar_list_selected.xml similarity index 100% rename from core/src/main/res/drawable/ic_calendar_list_selected.xml rename to core/designsystem/src/main/res/drawable/ic_calendar_list_selected.xml diff --git a/core/src/main/res/drawable/ic_calendar_list_unselected.xml b/core/designsystem/src/main/res/drawable/ic_calendar_list_unselected.xml similarity index 100% rename from core/src/main/res/drawable/ic_calendar_list_unselected.xml rename to core/designsystem/src/main/res/drawable/ic_calendar_list_unselected.xml diff --git a/core/src/main/res/drawable/ic_calendar_next.xml b/core/designsystem/src/main/res/drawable/ic_calendar_next.xml similarity index 100% rename from core/src/main/res/drawable/ic_calendar_next.xml rename to core/designsystem/src/main/res/drawable/ic_calendar_next.xml diff --git a/core/src/main/res/drawable/ic_calendar_previous.xml b/core/designsystem/src/main/res/drawable/ic_calendar_previous.xml similarity index 100% rename from core/src/main/res/drawable/ic_calendar_previous.xml rename to core/designsystem/src/main/res/drawable/ic_calendar_previous.xml diff --git a/core/src/main/res/drawable/ic_color_check.xml b/core/designsystem/src/main/res/drawable/ic_color_check.xml similarity index 100% rename from core/src/main/res/drawable/ic_color_check.xml rename to core/designsystem/src/main/res/drawable/ic_color_check.xml diff --git a/core/src/main/res/drawable/ic_dialog_x_32.xml b/core/designsystem/src/main/res/drawable/ic_dialog_x_32.xml similarity index 100% rename from core/src/main/res/drawable/ic_dialog_x_32.xml rename to core/designsystem/src/main/res/drawable/ic_dialog_x_32.xml diff --git a/core/src/main/res/drawable/ic_down_18.xml b/core/designsystem/src/main/res/drawable/ic_down_18.xml similarity index 100% rename from core/src/main/res/drawable/ic_down_18.xml rename to core/designsystem/src/main/res/drawable/ic_down_18.xml diff --git a/core/src/main/res/drawable/ic_down_22.xml b/core/designsystem/src/main/res/drawable/ic_down_22.xml similarity index 100% rename from core/src/main/res/drawable/ic_down_22.xml rename to core/designsystem/src/main/res/drawable/ic_down_22.xml diff --git a/core/src/main/res/drawable/ic_logo.xml b/core/designsystem/src/main/res/drawable/ic_logo.xml similarity index 100% rename from core/src/main/res/drawable/ic_logo.xml rename to core/designsystem/src/main/res/drawable/ic_logo.xml diff --git a/core/src/main/res/drawable/ic_name_text_field_check.xml b/core/designsystem/src/main/res/drawable/ic_name_text_field_check.xml similarity index 100% rename from core/src/main/res/drawable/ic_name_text_field_check.xml rename to core/designsystem/src/main/res/drawable/ic_name_text_field_check.xml diff --git a/core/src/main/res/drawable/ic_name_text_field_error.xml b/core/designsystem/src/main/res/drawable/ic_name_text_field_error.xml similarity index 100% rename from core/src/main/res/drawable/ic_name_text_field_error.xml rename to core/designsystem/src/main/res/drawable/ic_name_text_field_error.xml diff --git a/core/src/main/res/drawable/ic_right.xml b/core/designsystem/src/main/res/drawable/ic_right.xml similarity index 100% rename from core/src/main/res/drawable/ic_right.xml rename to core/designsystem/src/main/res/drawable/ic_right.xml diff --git a/core/src/main/res/drawable/ic_selected_character.xml b/core/designsystem/src/main/res/drawable/ic_selected_character.xml similarity index 100% rename from core/src/main/res/drawable/ic_selected_character.xml rename to core/designsystem/src/main/res/drawable/ic_selected_character.xml diff --git a/core/src/main/res/drawable/ic_sign_in_selected.xml b/core/designsystem/src/main/res/drawable/ic_sign_in_selected.xml similarity index 100% rename from core/src/main/res/drawable/ic_sign_in_selected.xml rename to core/designsystem/src/main/res/drawable/ic_sign_in_selected.xml diff --git a/core/src/main/res/drawable/ic_sign_up_button.xml b/core/designsystem/src/main/res/drawable/ic_sign_up_button.xml similarity index 100% rename from core/src/main/res/drawable/ic_sign_up_button.xml rename to core/designsystem/src/main/res/drawable/ic_sign_up_button.xml diff --git a/core/src/main/res/drawable/ic_terning_logo_typo.xml b/core/designsystem/src/main/res/drawable/ic_terning_logo_typo.xml similarity index 100% rename from core/src/main/res/drawable/ic_terning_logo_typo.xml rename to core/designsystem/src/main/res/drawable/ic_terning_logo_typo.xml diff --git a/core/src/main/res/drawable/ic_terning_profile_00.xml b/core/designsystem/src/main/res/drawable/ic_terning_profile_00.xml similarity index 100% rename from core/src/main/res/drawable/ic_terning_profile_00.xml rename to core/designsystem/src/main/res/drawable/ic_terning_profile_00.xml diff --git a/core/src/main/res/drawable/ic_terning_profile_01.xml b/core/designsystem/src/main/res/drawable/ic_terning_profile_01.xml similarity index 100% rename from core/src/main/res/drawable/ic_terning_profile_01.xml rename to core/designsystem/src/main/res/drawable/ic_terning_profile_01.xml diff --git a/core/src/main/res/drawable/ic_terning_profile_02.xml b/core/designsystem/src/main/res/drawable/ic_terning_profile_02.xml similarity index 100% rename from core/src/main/res/drawable/ic_terning_profile_02.xml rename to core/designsystem/src/main/res/drawable/ic_terning_profile_02.xml diff --git a/core/src/main/res/drawable/ic_terning_profile_03.xml b/core/designsystem/src/main/res/drawable/ic_terning_profile_03.xml similarity index 100% rename from core/src/main/res/drawable/ic_terning_profile_03.xml rename to core/designsystem/src/main/res/drawable/ic_terning_profile_03.xml diff --git a/core/src/main/res/drawable/ic_terning_profile_04.xml b/core/designsystem/src/main/res/drawable/ic_terning_profile_04.xml similarity index 100% rename from core/src/main/res/drawable/ic_terning_profile_04.xml rename to core/designsystem/src/main/res/drawable/ic_terning_profile_04.xml diff --git a/core/src/main/res/drawable/ic_terning_profile_05.xml b/core/designsystem/src/main/res/drawable/ic_terning_profile_05.xml similarity index 100% rename from core/src/main/res/drawable/ic_terning_profile_05.xml rename to core/designsystem/src/main/res/drawable/ic_terning_profile_05.xml diff --git a/core/src/main/res/drawable/ic_terning_profile_default.xml b/core/designsystem/src/main/res/drawable/ic_terning_profile_default.xml similarity index 100% rename from core/src/main/res/drawable/ic_terning_profile_default.xml rename to core/designsystem/src/main/res/drawable/ic_terning_profile_default.xml diff --git a/core/src/main/res/drawable/ic_terning_selected_profile_00.xml b/core/designsystem/src/main/res/drawable/ic_terning_selected_profile_00.xml similarity index 100% rename from core/src/main/res/drawable/ic_terning_selected_profile_00.xml rename to core/designsystem/src/main/res/drawable/ic_terning_selected_profile_00.xml diff --git a/core/src/main/res/drawable/ic_terning_selected_profile_01.xml b/core/designsystem/src/main/res/drawable/ic_terning_selected_profile_01.xml similarity index 100% rename from core/src/main/res/drawable/ic_terning_selected_profile_01.xml rename to core/designsystem/src/main/res/drawable/ic_terning_selected_profile_01.xml diff --git a/core/src/main/res/drawable/ic_terning_selected_profile_02.xml b/core/designsystem/src/main/res/drawable/ic_terning_selected_profile_02.xml similarity index 100% rename from core/src/main/res/drawable/ic_terning_selected_profile_02.xml rename to core/designsystem/src/main/res/drawable/ic_terning_selected_profile_02.xml diff --git a/core/src/main/res/drawable/ic_terning_selected_profile_03.xml b/core/designsystem/src/main/res/drawable/ic_terning_selected_profile_03.xml similarity index 100% rename from core/src/main/res/drawable/ic_terning_selected_profile_03.xml rename to core/designsystem/src/main/res/drawable/ic_terning_selected_profile_03.xml diff --git a/core/src/main/res/drawable/ic_terning_selected_profile_04.xml b/core/designsystem/src/main/res/drawable/ic_terning_selected_profile_04.xml similarity index 100% rename from core/src/main/res/drawable/ic_terning_selected_profile_04.xml rename to core/designsystem/src/main/res/drawable/ic_terning_selected_profile_04.xml diff --git a/core/src/main/res/drawable/ic_terning_selected_profile_05.xml b/core/designsystem/src/main/res/drawable/ic_terning_selected_profile_05.xml similarity index 100% rename from core/src/main/res/drawable/ic_terning_selected_profile_05.xml rename to core/designsystem/src/main/res/drawable/ic_terning_selected_profile_05.xml diff --git a/core/src/main/res/drawable/ic_up_22.xml b/core/designsystem/src/main/res/drawable/ic_up_22.xml similarity index 100% rename from core/src/main/res/drawable/ic_up_22.xml rename to core/designsystem/src/main/res/drawable/ic_up_22.xml diff --git a/core/src/main/res/font/pretendard_light.otf b/core/designsystem/src/main/res/font/pretendard_light.otf similarity index 100% rename from core/src/main/res/font/pretendard_light.otf rename to core/designsystem/src/main/res/font/pretendard_light.otf diff --git a/core/src/main/res/font/pretendard_medium.otf b/core/designsystem/src/main/res/font/pretendard_medium.otf similarity index 100% rename from core/src/main/res/font/pretendard_medium.otf rename to core/designsystem/src/main/res/font/pretendard_medium.otf diff --git a/core/src/main/res/font/pretendard_regular.otf b/core/designsystem/src/main/res/font/pretendard_regular.otf similarity index 100% rename from core/src/main/res/font/pretendard_regular.otf rename to core/designsystem/src/main/res/font/pretendard_regular.otf diff --git a/core/src/main/res/font/pretendard_semibold.otf b/core/designsystem/src/main/res/font/pretendard_semibold.otf similarity index 100% rename from core/src/main/res/font/pretendard_semibold.otf rename to core/designsystem/src/main/res/font/pretendard_semibold.otf diff --git a/core/src/main/res/values/strings.xml b/core/designsystem/src/main/res/values/strings.xml similarity index 100% rename from core/src/main/res/values/strings.xml rename to core/designsystem/src/main/res/values/strings.xml diff --git a/core/local/.gitignore b/core/local/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/core/local/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/core/local/build.gradle.kts b/core/local/build.gradle.kts new file mode 100644 index 000000000..6d15b8591 --- /dev/null +++ b/core/local/build.gradle.kts @@ -0,0 +1,9 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.library) +} + +android { + setNamespace("core.local") +} \ No newline at end of file diff --git a/core/local/src/main/AndroidManifest.xml b/core/local/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/core/local/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/local/TerningDataStore.kt b/core/local/src/main/java/com/terning/core/local/TerningDataStore.kt similarity index 80% rename from data/src/main/java/com/terning/data/local/TerningDataStore.kt rename to core/local/src/main/java/com/terning/core/local/TerningDataStore.kt index 23e6af70a..7cec8a2e6 100644 --- a/data/src/main/java/com/terning/data/local/TerningDataStore.kt +++ b/core/local/src/main/java/com/terning/core/local/TerningDataStore.kt @@ -1,4 +1,4 @@ -package com.terning.data.local +package com.terning.core.local interface TerningDataStore { var accessToken: String diff --git a/data/src/main/java/com/terning/data/local/TerningDataStoreImpl.kt b/core/local/src/main/java/com/terning/core/local/TerningDataStoreImpl.kt similarity index 96% rename from data/src/main/java/com/terning/data/local/TerningDataStoreImpl.kt rename to core/local/src/main/java/com/terning/core/local/TerningDataStoreImpl.kt index 573cc8f27..e3c7bb472 100644 --- a/data/src/main/java/com/terning/data/local/TerningDataStoreImpl.kt +++ b/core/local/src/main/java/com/terning/core/local/TerningDataStoreImpl.kt @@ -1,4 +1,4 @@ -package com.terning.data.local +package com.terning.core.local import android.content.SharedPreferences import androidx.core.content.edit diff --git a/app/src/main/java/com/terning/point/di/DataStoreModule.kt b/core/local/src/main/java/com/terning/core/local/di/DataStoreModule.kt similarity index 84% rename from app/src/main/java/com/terning/point/di/DataStoreModule.kt rename to core/local/src/main/java/com/terning/core/local/di/DataStoreModule.kt index bfc402ad1..79f0314ab 100644 --- a/app/src/main/java/com/terning/point/di/DataStoreModule.kt +++ b/core/local/src/main/java/com/terning/core/local/di/DataStoreModule.kt @@ -1,9 +1,9 @@ -package com.terning.point.di +package com.terning.core.local.di import android.content.Context import android.content.SharedPreferences -import com.terning.data.local.TerningDataStore -import com.terning.data.local.TerningDataStoreImpl +import com.terning.core.local.TerningDataStore +import com.terning.core.local.TerningDataStoreImpl import dagger.Module import dagger.Provides import dagger.hilt.InstallIn @@ -14,7 +14,6 @@ import javax.inject.Singleton @Module @InstallIn(SingletonComponent::class) object DataStoreModule { - @Provides @Singleton fun provideSharedPreferences(@ApplicationContext context: Context): SharedPreferences = @@ -24,5 +23,4 @@ object DataStoreModule { @Singleton fun provideTerningDataStore(dataStoreImpl: TerningDataStoreImpl): TerningDataStore = dataStoreImpl - } \ No newline at end of file diff --git a/core/navigation/.gitignore b/core/navigation/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/core/navigation/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/core/navigation/build.gradle.kts b/core/navigation/build.gradle.kts new file mode 100644 index 000000000..0fde5b106 --- /dev/null +++ b/core/navigation/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { + alias(libs.plugins.terning.kotlin) +} \ No newline at end of file diff --git a/app/src/androidTest/java/com/terning/point/ExampleInstrumentedTest.kt b/core/navigation/src/androidTest/java/com/terning/core/navigation/ExampleInstrumentedTest.kt similarity index 82% rename from app/src/androidTest/java/com/terning/point/ExampleInstrumentedTest.kt rename to core/navigation/src/androidTest/java/com/terning/core/navigation/ExampleInstrumentedTest.kt index 2de2bd896..fe8b84687 100644 --- a/app/src/androidTest/java/com/terning/point/ExampleInstrumentedTest.kt +++ b/core/navigation/src/androidTest/java/com/terning/core/navigation/ExampleInstrumentedTest.kt @@ -1,4 +1,4 @@ -package com.terning.point +package com.terning.core.navigation import androidx.test.platform.app.InstrumentationRegistry import androidx.test.ext.junit.runners.AndroidJUnit4 @@ -19,6 +19,6 @@ class ExampleInstrumentedTest { fun useAppContext() { // Context of the app under test. val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.terning.point", appContext.packageName) + assertEquals("com.terning.core.navigation.test", appContext.packageName) } } \ No newline at end of file diff --git a/core/navigation/src/main/AndroidManifest.xml b/core/navigation/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/core/navigation/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/core/src/main/java/com/terning/core/navigation/MainTabRoute.kt b/core/navigation/src/main/java/com/terning/core/navigation/MainTabRoute.kt similarity index 100% rename from core/src/main/java/com/terning/core/navigation/MainTabRoute.kt rename to core/navigation/src/main/java/com/terning/core/navigation/MainTabRoute.kt diff --git a/core/src/main/java/com/terning/core/navigation/Route.kt b/core/navigation/src/main/java/com/terning/core/navigation/Route.kt similarity index 100% rename from core/src/main/java/com/terning/core/navigation/Route.kt rename to core/navigation/src/main/java/com/terning/core/navigation/Route.kt diff --git a/core/network/.gitignore b/core/network/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/core/network/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/core/network/build.gradle.kts b/core/network/build.gradle.kts new file mode 100644 index 000000000..92bd299a3 --- /dev/null +++ b/core/network/build.gradle.kts @@ -0,0 +1,69 @@ +import com.terning.build_logic.extension.setNamespace +import java.util.Properties + +plugins { + alias(libs.plugins.terning.library) + alias(libs.plugins.kotlin.serialization) +} + +val properties = Properties().apply { + load(rootProject.file("local.properties").inputStream()) +} + +android { + signingConfigs { + create("release") { + keyAlias = properties.getProperty("release.keyAlias") + keyPassword = properties.getProperty("release.keyPassword") + storeFile = file(properties.getProperty("release.storeFile") + "/terning/terning.jks") + storePassword = properties.getProperty("release.storePassword") + } + } + + setNamespace("core.network") + + buildTypes { + debug { + buildConfigField( + "String", + "BASE_URL", + properties.getProperty("test.base.url") + ) + } + release { + buildConfigField( + "String", + "BASE_URL", + properties.getProperty("base.url") + ) + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + signingConfig = signingConfigs.getByName("release") + } + } + + buildFeatures { + buildConfig = true + } +} + +dependencies { + // core + implementation(project(":core:local")) + + //domain + implementation(project(":domain:tokenreissue")) + + implementation(platform(libs.okhttp.bom)) + implementation(libs.okhttp) + implementation(libs.okhttp.logging) + implementation(libs.retrofit.core) + implementation(libs.retrofit.kotlin.serialization) + implementation(libs.kotlinx.serialization.json) + implementation(libs.retrofit2.kotlinx.serialization.converter) + implementation(libs.timber) + implementation(libs.process.phoenix) +} \ No newline at end of file diff --git a/data/proguard-rules.pro b/core/network/proguard-rules.pro similarity index 100% rename from data/proguard-rules.pro rename to core/network/proguard-rules.pro diff --git a/core/network/src/main/AndroidManifest.xml b/core/network/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/core/network/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/src/main/java/com/terning/point/di/AuthInterceptor.kt b/core/network/src/main/java/com/terning/core/network/AuthInterceptor.kt similarity index 80% rename from app/src/main/java/com/terning/point/di/AuthInterceptor.kt rename to core/network/src/main/java/com/terning/core/network/AuthInterceptor.kt index 43de4f28b..cf8bf1eff 100644 --- a/app/src/main/java/com/terning/point/di/AuthInterceptor.kt +++ b/core/network/src/main/java/com/terning/core/network/AuthInterceptor.kt @@ -1,14 +1,12 @@ -package com.terning.point.di +package com.terning.core.network import android.content.Context -import android.content.Intent import android.os.Handler import android.os.Looper +import android.widget.Toast import com.jakewharton.processphoenix.ProcessPhoenix -import com.terning.core.extension.stringToast -import com.terning.data.local.TerningDataStore -import com.terning.domain.repository.TokenReissueRepository -import com.terning.feature.main.MainActivity +import com.terning.core.local.TerningDataStore +import com.terning.domain.tokenreissue.repository.TokenReissueRepository import dagger.hilt.android.qualifiers.ApplicationContext import kotlinx.coroutines.runBlocking import okhttp3.Interceptor @@ -63,13 +61,8 @@ class AuthInterceptor @Inject constructor( terningDataStore.clearInfo() Handler(Looper.getMainLooper()).post { - context.stringToast(TOKEN_EXPIRED_ERROR) - Handler(Looper.getMainLooper()).post { - ProcessPhoenix.triggerRebirth( - context, - Intent(context, MainActivity::class.java) - ) - } + Toast.makeText(context, TOKEN_EXPIRED_ERROR, Toast.LENGTH_LONG).show() + ProcessPhoenix.triggerRebirth(context) } } } diff --git a/data/src/main/java/com/terning/data/dto/BaseResponse.kt b/core/network/src/main/java/com/terning/core/network/BaseResponse.kt similarity index 89% rename from data/src/main/java/com/terning/data/dto/BaseResponse.kt rename to core/network/src/main/java/com/terning/core/network/BaseResponse.kt index a47d7bce9..f924253c4 100644 --- a/data/src/main/java/com/terning/data/dto/BaseResponse.kt +++ b/core/network/src/main/java/com/terning/core/network/BaseResponse.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto +package com.terning.core.network import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/dto/NonDataBaseResponse.kt b/core/network/src/main/java/com/terning/core/network/NonDataBaseResponse.kt similarity index 87% rename from data/src/main/java/com/terning/data/dto/NonDataBaseResponse.kt rename to core/network/src/main/java/com/terning/core/network/NonDataBaseResponse.kt index ddc6d1a70..dfbb073ab 100644 --- a/data/src/main/java/com/terning/data/dto/NonDataBaseResponse.kt +++ b/core/network/src/main/java/com/terning/core/network/NonDataBaseResponse.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto +package com.terning.core.network import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/src/main/java/com/terning/core/extension/Retrofit.kt b/core/network/src/main/java/com/terning/core/network/RetrofitExt.kt similarity index 83% rename from core/src/main/java/com/terning/core/extension/Retrofit.kt rename to core/network/src/main/java/com/terning/core/network/RetrofitExt.kt index 8864fd775..488780922 100644 --- a/core/src/main/java/com/terning/core/extension/Retrofit.kt +++ b/core/network/src/main/java/com/terning/core/network/RetrofitExt.kt @@ -1,4 +1,4 @@ -package com.terning.core.extension +package com.terning.core.network fun String?.isJsonObject(): Boolean = this?.startsWith("{") == true && this.endsWith("}") diff --git a/app/src/main/java/com/terning/point/di/RetrofitModule.kt b/core/network/src/main/java/com/terning/core/network/RetrofitModule.kt similarity index 91% rename from app/src/main/java/com/terning/point/di/RetrofitModule.kt rename to core/network/src/main/java/com/terning/core/network/RetrofitModule.kt index f7f1e8d16..a4535acb7 100644 --- a/app/src/main/java/com/terning/point/di/RetrofitModule.kt +++ b/core/network/src/main/java/com/terning/core/network/RetrofitModule.kt @@ -1,10 +1,8 @@ -package com.terning.point.di +package com.terning.core.network -import com.terning.core.extension.isJsonArray -import com.terning.core.extension.isJsonObject -import com.terning.point.BuildConfig.BASE_URL -import com.terning.point.di.qualifier.JWT -import com.terning.point.di.qualifier.REISSUE +import com.terning.core.network.BuildConfig.BASE_URL +import com.terning.core.network.qualifier.JWT +import com.terning.core.network.qualifier.REISSUE import dagger.Module import dagger.Provides import dagger.hilt.InstallIn diff --git a/app/src/main/java/com/terning/point/di/qualifier/RetrofitQualifier.kt b/core/network/src/main/java/com/terning/core/network/qualifier/RetrofitQualifier.kt similarity index 80% rename from app/src/main/java/com/terning/point/di/qualifier/RetrofitQualifier.kt rename to core/network/src/main/java/com/terning/core/network/qualifier/RetrofitQualifier.kt index 543f704d3..e265293a7 100644 --- a/app/src/main/java/com/terning/point/di/qualifier/RetrofitQualifier.kt +++ b/core/network/src/main/java/com/terning/core/network/qualifier/RetrofitQualifier.kt @@ -1,5 +1,4 @@ -package com.terning.point.di.qualifier - +package com.terning.core.network.qualifier import javax.inject.Qualifier diff --git a/core/src/androidTest/java/com/terning/core/ExampleInstrumentedTest.kt b/core/src/androidTest/java/com/terning/core/ExampleInstrumentedTest.kt deleted file mode 100644 index 62607fa89..000000000 --- a/core/src/androidTest/java/com/terning/core/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.terning.core - -import androidx.test.platform.app.InstrumentationRegistry -import androidx.test.ext.junit.runners.AndroidJUnit4 - -import org.junit.Test -import org.junit.runner.RunWith - -import org.junit.Assert.* - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.terning.core.test", appContext.packageName) - } -} \ No newline at end of file diff --git a/core/src/test/java/com/terning/core/ExampleUnitTest.kt b/core/src/test/java/com/terning/core/ExampleUnitTest.kt deleted file mode 100644 index 5881a2b99..000000000 --- a/core/src/test/java/com/terning/core/ExampleUnitTest.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.terning.core - -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/data/auth/.gitignore b/data/auth/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/data/auth/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/data/auth/build.gradle.kts b/data/auth/build.gradle.kts new file mode 100644 index 000000000..2ca9fcc36 --- /dev/null +++ b/data/auth/build.gradle.kts @@ -0,0 +1,14 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.data) +} + +android { + setNamespace("data.auth") +} + +dependencies { + // domain + implementation(project(":domain:auth")) +} \ No newline at end of file diff --git a/data/auth/src/main/AndroidManifest.xml b/data/auth/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/data/auth/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/data/auth/src/main/java/com/terning/data/auth/datasource/AuthDataSource.kt b/data/auth/src/main/java/com/terning/data/auth/datasource/AuthDataSource.kt new file mode 100644 index 000000000..a8aef130c --- /dev/null +++ b/data/auth/src/main/java/com/terning/data/auth/datasource/AuthDataSource.kt @@ -0,0 +1,21 @@ +package com.terning.data.auth.datasource + +import com.terning.core.network.BaseResponse +import com.terning.data.auth.dto.request.SignInRequestDto +import com.terning.data.auth.dto.request.SignUpRequestDto +import com.terning.data.auth.dto.response.SignInResponseDto +import com.terning.data.auth.dto.response.SignUpResponseDto + +interface AuthDataSource { + + suspend fun postSignIn( + authorization: String, + request: SignInRequestDto + ): BaseResponse + + suspend fun postSignUp( + authId: String, + request: SignUpRequestDto + ): BaseResponse + +} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/datasourceimpl/AuthDataSourceImpl.kt b/data/auth/src/main/java/com/terning/data/auth/datasourceimpl/AuthDataSourceImpl.kt similarity index 55% rename from data/src/main/java/com/terning/data/datasourceimpl/AuthDataSourceImpl.kt rename to data/auth/src/main/java/com/terning/data/auth/datasourceimpl/AuthDataSourceImpl.kt index 8a1080c9e..05e50a438 100644 --- a/data/src/main/java/com/terning/data/datasourceimpl/AuthDataSourceImpl.kt +++ b/data/auth/src/main/java/com/terning/data/auth/datasourceimpl/AuthDataSourceImpl.kt @@ -1,12 +1,12 @@ -package com.terning.data.datasourceimpl +package com.terning.data.auth.datasourceimpl -import com.terning.data.datasource.AuthDataSource -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.request.SignInRequestDto -import com.terning.data.dto.request.SignUpRequestDto -import com.terning.data.dto.response.SignInResponseDto -import com.terning.data.dto.response.SignUpResponseDto -import com.terning.data.service.AuthService +import com.terning.core.network.BaseResponse +import com.terning.data.auth.datasource.AuthDataSource +import com.terning.data.auth.dto.request.SignInRequestDto +import com.terning.data.auth.dto.request.SignUpRequestDto +import com.terning.data.auth.dto.response.SignInResponseDto +import com.terning.data.auth.dto.response.SignUpResponseDto +import com.terning.data.auth.service.AuthService import javax.inject.Inject class AuthDataSourceImpl @Inject constructor( diff --git a/data/auth/src/main/java/com/terning/data/auth/di/DataSourceModule.kt b/data/auth/src/main/java/com/terning/data/auth/di/DataSourceModule.kt new file mode 100644 index 000000000..a78c940e9 --- /dev/null +++ b/data/auth/src/main/java/com/terning/data/auth/di/DataSourceModule.kt @@ -0,0 +1,17 @@ +package com.terning.data.auth.di + +import com.terning.data.auth.datasource.AuthDataSource +import com.terning.data.auth.datasourceimpl.AuthDataSourceImpl +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class DataSourceModule { + @Binds + @Singleton + abstract fun bindAuthDataSource(authDataSourceImpl: AuthDataSourceImpl): AuthDataSource +} \ No newline at end of file diff --git a/data/auth/src/main/java/com/terning/data/auth/di/RepositoryModule.kt b/data/auth/src/main/java/com/terning/data/auth/di/RepositoryModule.kt new file mode 100644 index 000000000..cc9358c4b --- /dev/null +++ b/data/auth/src/main/java/com/terning/data/auth/di/RepositoryModule.kt @@ -0,0 +1,17 @@ +package com.terning.data.auth.di + +import com.terning.data.auth.repositoryimpl.AuthRepositoryImpl +import com.terning.domain.auth.repository.AuthRepository +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class RepositoryModule { + @Binds + @Singleton + abstract fun bindAuthRepository(authRepositoryImpl: AuthRepositoryImpl): AuthRepository +} \ No newline at end of file diff --git a/data/auth/src/main/java/com/terning/data/auth/di/ServiceModule.kt b/data/auth/src/main/java/com/terning/data/auth/di/ServiceModule.kt new file mode 100644 index 000000000..e21c6c5c5 --- /dev/null +++ b/data/auth/src/main/java/com/terning/data/auth/di/ServiceModule.kt @@ -0,0 +1,19 @@ +package com.terning.data.auth.di + +import com.terning.core.network.qualifier.JWT +import com.terning.data.auth.service.AuthService +import dagger.Module +import dagger.Provides +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import retrofit2.Retrofit +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +object ServiceModule { + @Provides + @Singleton + fun provideAuthService(@JWT retrofit: Retrofit): AuthService = + retrofit.create(AuthService::class.java) +} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/dto/request/SignInRequestDto.kt b/data/auth/src/main/java/com/terning/data/auth/dto/request/SignInRequestDto.kt similarity index 81% rename from data/src/main/java/com/terning/data/dto/request/SignInRequestDto.kt rename to data/auth/src/main/java/com/terning/data/auth/dto/request/SignInRequestDto.kt index 98123268c..8c6955adb 100644 --- a/data/src/main/java/com/terning/data/dto/request/SignInRequestDto.kt +++ b/data/auth/src/main/java/com/terning/data/auth/dto/request/SignInRequestDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.request +package com.terning.data.auth.dto.request import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/dto/request/SignUpRequestDto.kt b/data/auth/src/main/java/com/terning/data/auth/dto/request/SignUpRequestDto.kt similarity index 87% rename from data/src/main/java/com/terning/data/dto/request/SignUpRequestDto.kt rename to data/auth/src/main/java/com/terning/data/auth/dto/request/SignUpRequestDto.kt index 9cea3722d..81d10d903 100644 --- a/data/src/main/java/com/terning/data/dto/request/SignUpRequestDto.kt +++ b/data/auth/src/main/java/com/terning/data/auth/dto/request/SignUpRequestDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.request +package com.terning.data.auth.dto.request import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/dto/response/SignInResponseDto.kt b/data/auth/src/main/java/com/terning/data/auth/dto/response/SignInResponseDto.kt similarity index 90% rename from data/src/main/java/com/terning/data/dto/response/SignInResponseDto.kt rename to data/auth/src/main/java/com/terning/data/auth/dto/response/SignInResponseDto.kt index f68e837bd..5767189a5 100644 --- a/data/src/main/java/com/terning/data/dto/response/SignInResponseDto.kt +++ b/data/auth/src/main/java/com/terning/data/auth/dto/response/SignInResponseDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.response +package com.terning.data.auth.dto.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/dto/response/SignUpResponseDto.kt b/data/auth/src/main/java/com/terning/data/auth/dto/response/SignUpResponseDto.kt similarity index 89% rename from data/src/main/java/com/terning/data/dto/response/SignUpResponseDto.kt rename to data/auth/src/main/java/com/terning/data/auth/dto/response/SignUpResponseDto.kt index 579049fdd..5c345750d 100644 --- a/data/src/main/java/com/terning/data/dto/response/SignUpResponseDto.kt +++ b/data/auth/src/main/java/com/terning/data/auth/dto/response/SignUpResponseDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.response +package com.terning.data.auth.dto.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/auth/src/main/java/com/terning/data/auth/mapper/SignInRequestMapper.kt b/data/auth/src/main/java/com/terning/data/auth/mapper/SignInRequestMapper.kt new file mode 100644 index 000000000..a140186c7 --- /dev/null +++ b/data/auth/src/main/java/com/terning/data/auth/mapper/SignInRequestMapper.kt @@ -0,0 +1,7 @@ +package com.terning.data.auth.mapper + +import com.terning.data.auth.dto.request.SignInRequestDto +import com.terning.domain.auth.entity.SignInRequest + +fun SignInRequest.toSignInRequestDto(): SignInRequestDto = + SignInRequestDto(authType = authType) \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/mapper/onboarding/SignInResponseMapper.kt b/data/auth/src/main/java/com/terning/data/auth/mapper/SignInResponseMapper.kt similarity index 60% rename from data/src/main/java/com/terning/data/mapper/onboarding/SignInResponseMapper.kt rename to data/auth/src/main/java/com/terning/data/auth/mapper/SignInResponseMapper.kt index e5f2cd258..93920066b 100644 --- a/data/src/main/java/com/terning/data/mapper/onboarding/SignInResponseMapper.kt +++ b/data/auth/src/main/java/com/terning/data/auth/mapper/SignInResponseMapper.kt @@ -1,7 +1,7 @@ -package com.terning.data.mapper.onboarding +package com.terning.data.auth.mapper -import com.terning.data.dto.response.SignInResponseDto -import com.terning.domain.entity.onboarding.SignInResponse +import com.terning.data.auth.dto.response.SignInResponseDto +import com.terning.domain.auth.entity.SignInResponse fun SignInResponseDto.toSignInResponse(): SignInResponse = SignInResponse( diff --git a/data/src/main/java/com/terning/data/mapper/onboarding/SignUpRequestMapper.kt b/data/auth/src/main/java/com/terning/data/auth/mapper/SignUpRequestMapper.kt similarity index 53% rename from data/src/main/java/com/terning/data/mapper/onboarding/SignUpRequestMapper.kt rename to data/auth/src/main/java/com/terning/data/auth/mapper/SignUpRequestMapper.kt index 68ed36d8d..25ef15768 100644 --- a/data/src/main/java/com/terning/data/mapper/onboarding/SignUpRequestMapper.kt +++ b/data/auth/src/main/java/com/terning/data/auth/mapper/SignUpRequestMapper.kt @@ -1,7 +1,7 @@ -package com.terning.data.mapper.onboarding +package com.terning.data.auth.mapper -import com.terning.data.dto.request.SignUpRequestDto -import com.terning.domain.entity.onboarding.SignUpRequest +import com.terning.data.auth.dto.request.SignUpRequestDto +import com.terning.domain.auth.entity.SignUpRequest fun SignUpRequest.toSignUpRequestDto(): SignUpRequestDto = SignUpRequestDto( diff --git a/data/src/main/java/com/terning/data/mapper/onboarding/SignUpResponseMapper.kt b/data/auth/src/main/java/com/terning/data/auth/mapper/SignUpResponseMapper.kt similarity index 57% rename from data/src/main/java/com/terning/data/mapper/onboarding/SignUpResponseMapper.kt rename to data/auth/src/main/java/com/terning/data/auth/mapper/SignUpResponseMapper.kt index adf8a7186..6db6ff859 100644 --- a/data/src/main/java/com/terning/data/mapper/onboarding/SignUpResponseMapper.kt +++ b/data/auth/src/main/java/com/terning/data/auth/mapper/SignUpResponseMapper.kt @@ -1,7 +1,7 @@ -package com.terning.data.mapper.onboarding +package com.terning.data.auth.mapper -import com.terning.data.dto.response.SignUpResponseDto -import com.terning.domain.entity.onboarding.SignUpResponse +import com.terning.data.auth.dto.response.SignUpResponseDto +import com.terning.domain.auth.entity.SignUpResponse fun SignUpResponseDto.toSignUpResponse(): SignUpResponse = SignUpResponse( diff --git a/data/src/main/java/com/terning/data/repositoryimpl/AuthRepositoryImpl.kt b/data/auth/src/main/java/com/terning/data/auth/repositoryimpl/AuthRepositoryImpl.kt similarity index 53% rename from data/src/main/java/com/terning/data/repositoryimpl/AuthRepositoryImpl.kt rename to data/auth/src/main/java/com/terning/data/auth/repositoryimpl/AuthRepositoryImpl.kt index 4cb0ef47a..ed2275616 100644 --- a/data/src/main/java/com/terning/data/repositoryimpl/AuthRepositoryImpl.kt +++ b/data/auth/src/main/java/com/terning/data/auth/repositoryimpl/AuthRepositoryImpl.kt @@ -1,15 +1,15 @@ -package com.terning.data.repositoryimpl +package com.terning.data.auth.repositoryimpl -import com.terning.data.datasource.AuthDataSource -import com.terning.data.mapper.onboarding.toSignInRequestDto -import com.terning.data.mapper.onboarding.toSignInResponse -import com.terning.data.mapper.onboarding.toSignUpRequestDto -import com.terning.data.mapper.onboarding.toSignUpResponse -import com.terning.domain.entity.onboarding.SignInRequest -import com.terning.domain.entity.onboarding.SignInResponse -import com.terning.domain.entity.onboarding.SignUpRequest -import com.terning.domain.entity.onboarding.SignUpResponse -import com.terning.domain.repository.AuthRepository +import com.terning.data.auth.datasource.AuthDataSource +import com.terning.data.auth.mapper.toSignInRequestDto +import com.terning.data.auth.mapper.toSignInResponse +import com.terning.data.auth.mapper.toSignUpRequestDto +import com.terning.data.auth.mapper.toSignUpResponse +import com.terning.domain.auth.entity.SignInRequest +import com.terning.domain.auth.entity.SignInResponse +import com.terning.domain.auth.entity.SignUpRequest +import com.terning.domain.auth.entity.SignUpResponse +import com.terning.domain.auth.repository.AuthRepository import javax.inject.Inject class AuthRepositoryImpl @Inject constructor( diff --git a/data/src/main/java/com/terning/data/service/AuthService.kt b/data/auth/src/main/java/com/terning/data/auth/service/AuthService.kt similarity index 60% rename from data/src/main/java/com/terning/data/service/AuthService.kt rename to data/auth/src/main/java/com/terning/data/auth/service/AuthService.kt index 841757744..1f931374c 100644 --- a/data/src/main/java/com/terning/data/service/AuthService.kt +++ b/data/auth/src/main/java/com/terning/data/auth/service/AuthService.kt @@ -1,10 +1,10 @@ -package com.terning.data.service +package com.terning.data.auth.service -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.request.SignInRequestDto -import com.terning.data.dto.request.SignUpRequestDto -import com.terning.data.dto.response.SignInResponseDto -import com.terning.data.dto.response.SignUpResponseDto +import com.terning.core.network.BaseResponse +import com.terning.data.auth.dto.request.SignInRequestDto +import com.terning.data.auth.dto.request.SignUpRequestDto +import com.terning.data.auth.dto.response.SignInResponseDto +import com.terning.data.auth.dto.response.SignUpResponseDto import retrofit2.http.Body import retrofit2.http.Header import retrofit2.http.POST diff --git a/data/build.gradle.kts b/data/build.gradle.kts deleted file mode 100644 index 471b31f46..000000000 --- a/data/build.gradle.kts +++ /dev/null @@ -1,64 +0,0 @@ -plugins { - alias(libs.plugins.android.library) - alias(libs.plugins.kotlin.android) - alias(libs.plugins.kotlin.serialization) -} - -android { - namespace = "com.terning.data" - compileSdk = libs.versions.compileSdk.get().toInt() - - defaultConfig { - minSdk = libs.versions.minSdk.get().toInt() - - 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 = libs.versions.jvmTarget.get() - } - buildFeatures{ - buildConfig = true - } -} - -dependencies { - implementation(project(":domain")) - - // AndroidXDependencies - implementation(libs.hilt.android) - implementation(libs.androidx.security) - implementation(libs.androidx.core.ktx) - - // KotlinDependencies - implementation(libs.kotlin) - implementation(libs.kotlinx.serialization.json.v151) - implementation(libs.coroutines.android) - - // ThirdPartyDependencies - implementation(libs.retrofit.core) - implementation(libs.okhttp) - implementation(platform(libs.okhttp.bom)) - implementation(libs.okhttp.logging) - implementation (libs.retrofit2.kotlinx.serialization.converter.v080) - implementation(libs.timber) - - // TestDependencies - testImplementation(libs.junit) - androidTestImplementation(libs.androidx.junit) - androidTestImplementation(libs.androidx.espresso.core) -} \ No newline at end of file diff --git a/data/calendar/.gitignore b/data/calendar/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/data/calendar/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/data/calendar/build.gradle.kts b/data/calendar/build.gradle.kts new file mode 100644 index 000000000..d459f2dc0 --- /dev/null +++ b/data/calendar/build.gradle.kts @@ -0,0 +1,14 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.data) +} + +android { + setNamespace("data.calendar") +} + +dependencies { + // domain + implementation(project(":domain:calendar")) +} \ No newline at end of file diff --git a/data/calendar/src/main/AndroidManifest.xml b/data/calendar/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/data/calendar/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/data/calendar/src/main/java/com/terning/data/calendar/datasource/CalendarDataSource.kt b/data/calendar/src/main/java/com/terning/data/calendar/datasource/CalendarDataSource.kt new file mode 100644 index 000000000..869fb9fcc --- /dev/null +++ b/data/calendar/src/main/java/com/terning/data/calendar/datasource/CalendarDataSource.kt @@ -0,0 +1,15 @@ +package com.terning.data.calendar.datasource + +import com.terning.core.network.BaseResponse +import com.terning.data.calendar.dto.request.CalendarDayListRequestDto +import com.terning.data.calendar.dto.request.CalendarMonthListRequestDto +import com.terning.data.calendar.dto.request.CalendarMonthRequestDto +import com.terning.data.calendar.dto.response.CalendarDayListResponseDto +import com.terning.data.calendar.dto.response.CalendarMonthListResponseDto +import com.terning.data.calendar.dto.response.CalendarMonthResponseDto + +interface CalendarDataSource { + suspend fun getCalendarMonth(request: CalendarMonthRequestDto): BaseResponse> + suspend fun getCalendarMonthList(request: CalendarMonthListRequestDto): BaseResponse> + suspend fun getCalendarDayList(request: CalendarDayListRequestDto): BaseResponse> +} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/datasourceimpl/CalendarDataSourceImpl.kt b/data/calendar/src/main/java/com/terning/data/calendar/datasourceimpl/CalendarDataSourceImpl.kt similarity index 54% rename from data/src/main/java/com/terning/data/datasourceimpl/CalendarDataSourceImpl.kt rename to data/calendar/src/main/java/com/terning/data/calendar/datasourceimpl/CalendarDataSourceImpl.kt index 15f60843e..38a8aff51 100644 --- a/data/src/main/java/com/terning/data/datasourceimpl/CalendarDataSourceImpl.kt +++ b/data/calendar/src/main/java/com/terning/data/calendar/datasourceimpl/CalendarDataSourceImpl.kt @@ -1,14 +1,14 @@ -package com.terning.data.datasourceimpl +package com.terning.data.calendar.datasourceimpl -import com.terning.data.datasource.CalendarDataSource -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.request.CalendarDayListRequestDto -import com.terning.data.dto.request.CalendarMonthListRequestDto -import com.terning.data.dto.request.CalendarMonthRequestDto -import com.terning.data.dto.response.CalendarDayListResponseDto -import com.terning.data.dto.response.CalendarMonthListResponseDto -import com.terning.data.dto.response.CalendarMonthResponseDto -import com.terning.data.service.CalendarService +import com.terning.core.network.BaseResponse +import com.terning.data.calendar.datasource.CalendarDataSource +import com.terning.data.calendar.dto.request.CalendarDayListRequestDto +import com.terning.data.calendar.dto.request.CalendarMonthListRequestDto +import com.terning.data.calendar.dto.request.CalendarMonthRequestDto +import com.terning.data.calendar.dto.response.CalendarDayListResponseDto +import com.terning.data.calendar.dto.response.CalendarMonthListResponseDto +import com.terning.data.calendar.dto.response.CalendarMonthResponseDto +import com.terning.data.calendar.service.CalendarService import javax.inject.Inject class CalendarDataSourceImpl @Inject constructor( diff --git a/data/calendar/src/main/java/com/terning/data/calendar/di/DataSourceModule.kt b/data/calendar/src/main/java/com/terning/data/calendar/di/DataSourceModule.kt new file mode 100644 index 000000000..68e67f170 --- /dev/null +++ b/data/calendar/src/main/java/com/terning/data/calendar/di/DataSourceModule.kt @@ -0,0 +1,18 @@ +package com.terning.data.calendar.di + +import com.terning.data.calendar.datasource.CalendarDataSource +import com.terning.data.calendar.datasourceimpl.CalendarDataSourceImpl +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + + +@Module +@InstallIn(SingletonComponent::class) +abstract class DataSourceModule { + @Binds + @Singleton + abstract fun bindCalendarDataSource(calendarDataSourceImpl: CalendarDataSourceImpl): CalendarDataSource +} \ No newline at end of file diff --git a/data/calendar/src/main/java/com/terning/data/calendar/di/RepositoryModule.kt b/data/calendar/src/main/java/com/terning/data/calendar/di/RepositoryModule.kt new file mode 100644 index 000000000..507121cb0 --- /dev/null +++ b/data/calendar/src/main/java/com/terning/data/calendar/di/RepositoryModule.kt @@ -0,0 +1,17 @@ +package com.terning.data.calendar.di + +import com.terning.data.calendar.repositoryimpl.CalendarRepositoryImpl +import com.terning.domain.calendar.repository.CalendarRepository +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class RepositoryModule { + @Binds + @Singleton + abstract fun calendarRepository(calendarRepositoryImpl: CalendarRepositoryImpl): CalendarRepository +} \ No newline at end of file diff --git a/data/calendar/src/main/java/com/terning/data/calendar/di/ServiceModule.kt b/data/calendar/src/main/java/com/terning/data/calendar/di/ServiceModule.kt new file mode 100644 index 000000000..67593d5f2 --- /dev/null +++ b/data/calendar/src/main/java/com/terning/data/calendar/di/ServiceModule.kt @@ -0,0 +1,19 @@ +package com.terning.data.calendar.di + +import com.terning.core.network.qualifier.JWT +import com.terning.data.calendar.service.CalendarService +import dagger.Module +import dagger.Provides +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import retrofit2.Retrofit +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +object ServiceModule { + @Provides + @Singleton + fun provideCalendarService(@JWT retrofit: Retrofit): CalendarService = + retrofit.create(CalendarService::class.java) +} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/dto/request/CalendarDayListRequestDto.kt b/data/calendar/src/main/java/com/terning/data/calendar/dto/request/CalendarDayListRequestDto.kt similarity index 57% rename from data/src/main/java/com/terning/data/dto/request/CalendarDayListRequestDto.kt rename to data/calendar/src/main/java/com/terning/data/calendar/dto/request/CalendarDayListRequestDto.kt index 857b75029..afb14b3b8 100644 --- a/data/src/main/java/com/terning/data/dto/request/CalendarDayListRequestDto.kt +++ b/data/calendar/src/main/java/com/terning/data/calendar/dto/request/CalendarDayListRequestDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.request +package com.terning.data.calendar.dto.request data class CalendarDayListRequestDto( val date: String diff --git a/data/src/main/java/com/terning/data/dto/request/CalendarMonthListRequestDto.kt b/data/calendar/src/main/java/com/terning/data/calendar/dto/request/CalendarMonthListRequestDto.kt similarity index 83% rename from data/src/main/java/com/terning/data/dto/request/CalendarMonthListRequestDto.kt rename to data/calendar/src/main/java/com/terning/data/calendar/dto/request/CalendarMonthListRequestDto.kt index 6a951d73d..5dea8e195 100644 --- a/data/src/main/java/com/terning/data/dto/request/CalendarMonthListRequestDto.kt +++ b/data/calendar/src/main/java/com/terning/data/calendar/dto/request/CalendarMonthListRequestDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.request +package com.terning.data.calendar.dto.request import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/dto/request/CalendarMonthRequestDto.kt b/data/calendar/src/main/java/com/terning/data/calendar/dto/request/CalendarMonthRequestDto.kt similarity index 82% rename from data/src/main/java/com/terning/data/dto/request/CalendarMonthRequestDto.kt rename to data/calendar/src/main/java/com/terning/data/calendar/dto/request/CalendarMonthRequestDto.kt index 00eaf4696..434b62d53 100644 --- a/data/src/main/java/com/terning/data/dto/request/CalendarMonthRequestDto.kt +++ b/data/calendar/src/main/java/com/terning/data/calendar/dto/request/CalendarMonthRequestDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.request +package com.terning.data.calendar.dto.request import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/dto/response/CalendarDayListResponseDto.kt b/data/calendar/src/main/java/com/terning/data/calendar/dto/response/CalendarDayListResponseDto.kt similarity index 94% rename from data/src/main/java/com/terning/data/dto/response/CalendarDayListResponseDto.kt rename to data/calendar/src/main/java/com/terning/data/calendar/dto/response/CalendarDayListResponseDto.kt index d2e897972..a3e9f4306 100644 --- a/data/src/main/java/com/terning/data/dto/response/CalendarDayListResponseDto.kt +++ b/data/calendar/src/main/java/com/terning/data/calendar/dto/response/CalendarDayListResponseDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.response +package com.terning.data.calendar.dto.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/dto/response/CalendarMonthListResponseDto.kt b/data/calendar/src/main/java/com/terning/data/calendar/dto/response/CalendarMonthListResponseDto.kt similarity index 95% rename from data/src/main/java/com/terning/data/dto/response/CalendarMonthListResponseDto.kt rename to data/calendar/src/main/java/com/terning/data/calendar/dto/response/CalendarMonthListResponseDto.kt index 35c2e45aa..1365a65aa 100644 --- a/data/src/main/java/com/terning/data/dto/response/CalendarMonthListResponseDto.kt +++ b/data/calendar/src/main/java/com/terning/data/calendar/dto/response/CalendarMonthListResponseDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.response +package com.terning.data.calendar.dto.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/dto/response/CalendarMonthResponseDto.kt b/data/calendar/src/main/java/com/terning/data/calendar/dto/response/CalendarMonthResponseDto.kt similarity index 90% rename from data/src/main/java/com/terning/data/dto/response/CalendarMonthResponseDto.kt rename to data/calendar/src/main/java/com/terning/data/calendar/dto/response/CalendarMonthResponseDto.kt index fcf9b9e95..0aeeb9e48 100644 --- a/data/src/main/java/com/terning/data/dto/response/CalendarMonthResponseDto.kt +++ b/data/calendar/src/main/java/com/terning/data/calendar/dto/response/CalendarMonthResponseDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.response +package com.terning.data.calendar.dto.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/mapper/CalendarScrapDetailListMapper.kt b/data/calendar/src/main/java/com/terning/data/calendar/mapper/CalendarScrapDetailListMapper.kt similarity index 76% rename from data/src/main/java/com/terning/data/mapper/CalendarScrapDetailListMapper.kt rename to data/calendar/src/main/java/com/terning/data/calendar/mapper/CalendarScrapDetailListMapper.kt index a6701e8bb..916116b67 100644 --- a/data/src/main/java/com/terning/data/mapper/CalendarScrapDetailListMapper.kt +++ b/data/calendar/src/main/java/com/terning/data/calendar/mapper/CalendarScrapDetailListMapper.kt @@ -1,7 +1,7 @@ -package com.terning.data.mapper +package com.terning.data.calendar.mapper -import com.terning.data.dto.response.CalendarMonthListResponseDto -import com.terning.domain.entity.calendar.CalendarScrapDetail +import com.terning.data.calendar.dto.response.CalendarMonthListResponseDto +import com.terning.domain.calendar.entity.CalendarScrapDetail fun CalendarMonthListResponseDto.toCalendarScrapDetailList(): List = announcements.map { announcement -> CalendarScrapDetail( diff --git a/data/src/main/java/com/terning/data/mapper/CalendarScrapDetailMapper.kt b/data/calendar/src/main/java/com/terning/data/calendar/mapper/CalendarScrapDetailMapper.kt similarity index 69% rename from data/src/main/java/com/terning/data/mapper/CalendarScrapDetailMapper.kt rename to data/calendar/src/main/java/com/terning/data/calendar/mapper/CalendarScrapDetailMapper.kt index e2280c2ce..b5c59be35 100644 --- a/data/src/main/java/com/terning/data/mapper/CalendarScrapDetailMapper.kt +++ b/data/calendar/src/main/java/com/terning/data/calendar/mapper/CalendarScrapDetailMapper.kt @@ -1,7 +1,7 @@ -package com.terning.data.mapper +package com.terning.data.calendar.mapper -import com.terning.data.dto.response.CalendarDayListResponseDto -import com.terning.domain.entity.calendar.CalendarScrapDetail +import com.terning.data.calendar.dto.response.CalendarDayListResponseDto +import com.terning.domain.calendar.entity.CalendarScrapDetail fun CalendarDayListResponseDto.toCalendarScrapDetail() = CalendarScrapDetail( diff --git a/data/src/main/java/com/terning/data/mapper/CalendarScrapMapper.kt b/data/calendar/src/main/java/com/terning/data/calendar/mapper/CalendarScrapMapper.kt similarity index 61% rename from data/src/main/java/com/terning/data/mapper/CalendarScrapMapper.kt rename to data/calendar/src/main/java/com/terning/data/calendar/mapper/CalendarScrapMapper.kt index 9d92714e7..07518581e 100644 --- a/data/src/main/java/com/terning/data/mapper/CalendarScrapMapper.kt +++ b/data/calendar/src/main/java/com/terning/data/calendar/mapper/CalendarScrapMapper.kt @@ -1,7 +1,7 @@ -package com.terning.data.mapper +package com.terning.data.calendar.mapper -import com.terning.data.dto.response.CalendarMonthResponseDto -import com.terning.domain.entity.calendar.CalendarScrap +import com.terning.data.calendar.dto.response.CalendarMonthResponseDto +import com.terning.domain.calendar.entity.CalendarScrap fun CalendarMonthResponseDto.toCalendarScrapList(): List = scraps.map { scrap -> CalendarScrap( diff --git a/data/src/main/java/com/terning/data/repositoryimpl/CalendarRepositoryImpl.kt b/data/calendar/src/main/java/com/terning/data/calendar/repositoryimpl/CalendarRepositoryImpl.kt similarity index 73% rename from data/src/main/java/com/terning/data/repositoryimpl/CalendarRepositoryImpl.kt rename to data/calendar/src/main/java/com/terning/data/calendar/repositoryimpl/CalendarRepositoryImpl.kt index ad1c64648..2c0a35370 100644 --- a/data/src/main/java/com/terning/data/repositoryimpl/CalendarRepositoryImpl.kt +++ b/data/calendar/src/main/java/com/terning/data/calendar/repositoryimpl/CalendarRepositoryImpl.kt @@ -1,15 +1,15 @@ -package com.terning.data.repositoryimpl +package com.terning.data.calendar.repositoryimpl -import com.terning.data.datasource.CalendarDataSource -import com.terning.data.dto.request.CalendarDayListRequestDto -import com.terning.data.dto.request.CalendarMonthListRequestDto -import com.terning.data.dto.request.CalendarMonthRequestDto -import com.terning.data.mapper.toCalendarScrapDetail -import com.terning.data.mapper.toCalendarScrapDetailList -import com.terning.data.mapper.toCalendarScrapList -import com.terning.domain.entity.calendar.CalendarScrapDetail -import com.terning.domain.entity.calendar.CalendarScrap -import com.terning.domain.repository.CalendarRepository +import com.terning.data.calendar.datasource.CalendarDataSource +import com.terning.data.calendar.dto.request.CalendarDayListRequestDto +import com.terning.data.calendar.dto.request.CalendarMonthListRequestDto +import com.terning.data.calendar.dto.request.CalendarMonthRequestDto +import com.terning.data.calendar.mapper.toCalendarScrapDetailList +import com.terning.data.calendar.mapper.toCalendarScrapDetail +import com.terning.data.calendar.mapper.toCalendarScrapList +import com.terning.domain.calendar.entity.CalendarScrap +import com.terning.domain.calendar.entity.CalendarScrapDetail +import com.terning.domain.calendar.repository.CalendarRepository import java.time.LocalDate import java.time.format.DateTimeFormatter import javax.inject.Inject diff --git a/data/src/main/java/com/terning/data/service/CalendarService.kt b/data/calendar/src/main/java/com/terning/data/calendar/service/CalendarService.kt similarity index 68% rename from data/src/main/java/com/terning/data/service/CalendarService.kt rename to data/calendar/src/main/java/com/terning/data/calendar/service/CalendarService.kt index 8ca05f7e9..f1f3d44ac 100644 --- a/data/src/main/java/com/terning/data/service/CalendarService.kt +++ b/data/calendar/src/main/java/com/terning/data/calendar/service/CalendarService.kt @@ -1,9 +1,9 @@ -package com.terning.data.service +package com.terning.data.calendar.service -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.response.CalendarDayListResponseDto -import com.terning.data.dto.response.CalendarMonthListResponseDto -import com.terning.data.dto.response.CalendarMonthResponseDto +import com.terning.core.network.BaseResponse +import com.terning.data.calendar.dto.response.CalendarDayListResponseDto +import com.terning.data.calendar.dto.response.CalendarMonthListResponseDto +import com.terning.data.calendar.dto.response.CalendarMonthResponseDto import retrofit2.http.GET import retrofit2.http.Query diff --git a/data/consumer-rules.pro b/data/consumer-rules.pro deleted file mode 100644 index e69de29bb..000000000 diff --git a/data/filtering/.gitignore b/data/filtering/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/data/filtering/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/data/filtering/build.gradle.kts b/data/filtering/build.gradle.kts new file mode 100644 index 000000000..51dfc2b8b --- /dev/null +++ b/data/filtering/build.gradle.kts @@ -0,0 +1,14 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.data) +} + +android { + setNamespace("data.filtering") +} + +dependencies { + // domain + implementation(project(":domain:filtering")) +} \ No newline at end of file diff --git a/data/filtering/src/main/AndroidManifest.xml b/data/filtering/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/data/filtering/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/data/filtering/src/main/java/com/terning/data/filtering/datasource/FilteringDataSource.kt b/data/filtering/src/main/java/com/terning/data/filtering/datasource/FilteringDataSource.kt new file mode 100644 index 000000000..177ae2512 --- /dev/null +++ b/data/filtering/src/main/java/com/terning/data/filtering/datasource/FilteringDataSource.kt @@ -0,0 +1,8 @@ +package com.terning.data.filtering.datasource + +import com.terning.core.network.NonDataBaseResponse +import com.terning.data.filtering.dto.request.FilteringRequestDto + +interface FilteringDataSource { + suspend fun postFiltering(userId: Long, request: FilteringRequestDto): NonDataBaseResponse +} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/datasourceimpl/FilteringDataSourceImpl.kt b/data/filtering/src/main/java/com/terning/data/filtering/datasourceimpl/FilteringDataSourceImpl.kt similarity index 52% rename from data/src/main/java/com/terning/data/datasourceimpl/FilteringDataSourceImpl.kt rename to data/filtering/src/main/java/com/terning/data/filtering/datasourceimpl/FilteringDataSourceImpl.kt index 19443a235..e944ed5e9 100644 --- a/data/src/main/java/com/terning/data/datasourceimpl/FilteringDataSourceImpl.kt +++ b/data/filtering/src/main/java/com/terning/data/filtering/datasourceimpl/FilteringDataSourceImpl.kt @@ -1,14 +1,13 @@ -package com.terning.data.datasourceimpl +package com.terning.data.filtering.datasourceimpl -import com.terning.data.datasource.FilteringDataSource -import com.terning.data.dto.NonDataBaseResponse -import com.terning.data.dto.request.FilteringRequestDto -import com.terning.data.service.FilteringService +import com.terning.core.network.NonDataBaseResponse +import com.terning.data.filtering.dto.request.FilteringRequestDto +import com.terning.data.filtering.service.FilteringService import javax.inject.Inject class FilteringDataSourceImpl @Inject constructor( private val filteringService: FilteringService -) : FilteringDataSource { +) : com.terning.data.filtering.datasource.FilteringDataSource { override suspend fun postFiltering( userId: Long, request: FilteringRequestDto diff --git a/data/filtering/src/main/java/com/terning/data/filtering/di/DataSourceModule.kt b/data/filtering/src/main/java/com/terning/data/filtering/di/DataSourceModule.kt new file mode 100644 index 000000000..065a0c632 --- /dev/null +++ b/data/filtering/src/main/java/com/terning/data/filtering/di/DataSourceModule.kt @@ -0,0 +1,17 @@ +package com.terning.data.filtering.di + +import com.terning.data.filtering.datasource.FilteringDataSource +import com.terning.data.filtering.datasourceimpl.FilteringDataSourceImpl +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class DataSourceModule { + @Binds + @Singleton + abstract fun bindFilteringDataSource(filteringDataSourceImpl: FilteringDataSourceImpl): FilteringDataSource +} \ No newline at end of file diff --git a/data/filtering/src/main/java/com/terning/data/filtering/di/RepositoryModule.kt b/data/filtering/src/main/java/com/terning/data/filtering/di/RepositoryModule.kt new file mode 100644 index 000000000..b51fe0f8c --- /dev/null +++ b/data/filtering/src/main/java/com/terning/data/filtering/di/RepositoryModule.kt @@ -0,0 +1,17 @@ +package com.terning.data.filtering.di + +import com.terning.data.filtering.repositoryimpl.FilteringRepositoryImpl +import com.terning.domain.filtering.repository.FilteringRepository +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class RepositoryModule { + @Binds + @Singleton + abstract fun bindFilteringRepository(filteringRepositoryImpl: FilteringRepositoryImpl): FilteringRepository +} \ No newline at end of file diff --git a/data/filtering/src/main/java/com/terning/data/filtering/di/ServiceModule.kt b/data/filtering/src/main/java/com/terning/data/filtering/di/ServiceModule.kt new file mode 100644 index 000000000..ae99182aa --- /dev/null +++ b/data/filtering/src/main/java/com/terning/data/filtering/di/ServiceModule.kt @@ -0,0 +1,19 @@ +package com.terning.data.filtering.di + +import com.terning.core.network.qualifier.JWT +import com.terning.data.filtering.service.FilteringService +import dagger.Module +import dagger.Provides +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import retrofit2.Retrofit +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +object ServiceModule { + @Provides + @Singleton + fun provideFilteringService(@JWT retrofit: Retrofit): FilteringService = + retrofit.create(FilteringService::class.java) +} diff --git a/data/src/main/java/com/terning/data/dto/request/FilteringRequestDto.kt b/data/filtering/src/main/java/com/terning/data/filtering/dto/request/FilteringRequestDto.kt similarity index 88% rename from data/src/main/java/com/terning/data/dto/request/FilteringRequestDto.kt rename to data/filtering/src/main/java/com/terning/data/filtering/dto/request/FilteringRequestDto.kt index d0ba0abe3..0956c186d 100644 --- a/data/src/main/java/com/terning/data/dto/request/FilteringRequestDto.kt +++ b/data/filtering/src/main/java/com/terning/data/filtering/dto/request/FilteringRequestDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.request +package com.terning.data.filtering.dto.request import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/mapper/filtering/FilteringMapper.kt b/data/filtering/src/main/java/com/terning/data/filtering/mapper/FilteringMapper.kt similarity index 51% rename from data/src/main/java/com/terning/data/mapper/filtering/FilteringMapper.kt rename to data/filtering/src/main/java/com/terning/data/filtering/mapper/FilteringMapper.kt index ec1d829a7..91e6279ba 100644 --- a/data/src/main/java/com/terning/data/mapper/filtering/FilteringMapper.kt +++ b/data/filtering/src/main/java/com/terning/data/filtering/mapper/FilteringMapper.kt @@ -1,10 +1,10 @@ -package com.terning.data.mapper.filtering +package com.terning.data.filtering.mapper -import com.terning.data.dto.request.FilteringRequestDto -import com.terning.domain.entity.filtering.Filtering +import com.terning.data.filtering.dto.request.FilteringRequestDto +import com.terning.domain.filtering.entity.Filtering fun Filtering.toFilteringRequestDto(): FilteringRequestDto = - FilteringRequestDto( + FilteringRequestDto( grade = grade, workingPeriod = workingPeriod, startYear = startYear, diff --git a/data/src/main/java/com/terning/data/repositoryimpl/FilteringRepositoryImpl.kt b/data/filtering/src/main/java/com/terning/data/filtering/repositoryimpl/FilteringRepositoryImpl.kt similarity index 59% rename from data/src/main/java/com/terning/data/repositoryimpl/FilteringRepositoryImpl.kt rename to data/filtering/src/main/java/com/terning/data/filtering/repositoryimpl/FilteringRepositoryImpl.kt index cbcfea14b..1c0ee2265 100644 --- a/data/src/main/java/com/terning/data/repositoryimpl/FilteringRepositoryImpl.kt +++ b/data/filtering/src/main/java/com/terning/data/filtering/repositoryimpl/FilteringRepositoryImpl.kt @@ -1,9 +1,9 @@ -package com.terning.data.repositoryimpl +package com.terning.data.filtering.repositoryimpl -import com.terning.data.datasource.FilteringDataSource -import com.terning.data.mapper.filtering.toFilteringRequestDto -import com.terning.domain.entity.filtering.Filtering -import com.terning.domain.repository.FilteringRepository +import com.terning.data.filtering.datasource.FilteringDataSource +import com.terning.data.filtering.mapper.toFilteringRequestDto +import com.terning.domain.filtering.entity.Filtering +import com.terning.domain.filtering.repository.FilteringRepository import javax.inject.Inject class FilteringRepositoryImpl @Inject constructor( diff --git a/data/src/main/java/com/terning/data/service/FilteringService.kt b/data/filtering/src/main/java/com/terning/data/filtering/service/FilteringService.kt similarity index 65% rename from data/src/main/java/com/terning/data/service/FilteringService.kt rename to data/filtering/src/main/java/com/terning/data/filtering/service/FilteringService.kt index 9dcb125e9..a4a22bb2e 100644 --- a/data/src/main/java/com/terning/data/service/FilteringService.kt +++ b/data/filtering/src/main/java/com/terning/data/filtering/service/FilteringService.kt @@ -1,7 +1,7 @@ -package com.terning.data.service +package com.terning.data.filtering.service -import com.terning.data.dto.NonDataBaseResponse -import com.terning.data.dto.request.FilteringRequestDto +import com.terning.core.network.NonDataBaseResponse +import com.terning.data.filtering.dto.request.FilteringRequestDto import retrofit2.http.Body import retrofit2.http.Header import retrofit2.http.POST diff --git a/data/home/.gitignore b/data/home/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/data/home/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/data/home/build.gradle.kts b/data/home/build.gradle.kts new file mode 100644 index 000000000..b4047c106 --- /dev/null +++ b/data/home/build.gradle.kts @@ -0,0 +1,14 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.data) +} + +android { + setNamespace("data.home") +} + +dependencies { + // domain + implementation(project(":domain:home")) +} \ No newline at end of file diff --git a/data/home/src/main/AndroidManifest.xml b/data/home/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/data/home/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/datasource/HomeDataSource.kt b/data/home/src/main/java/com/terning/data/home/datasource/HomeDataSource.kt similarity index 52% rename from data/src/main/java/com/terning/data/datasource/HomeDataSource.kt rename to data/home/src/main/java/com/terning/data/home/datasource/HomeDataSource.kt index 7c3c87190..21520cc7b 100644 --- a/data/src/main/java/com/terning/data/datasource/HomeDataSource.kt +++ b/data/home/src/main/java/com/terning/data/home/datasource/HomeDataSource.kt @@ -1,11 +1,11 @@ -package com.terning.data.datasource +package com.terning.data.home.datasource -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.NonDataBaseResponse -import com.terning.data.dto.request.ChangeFilterRequestDto -import com.terning.data.dto.response.HomeFilteringInfoResponseDto -import com.terning.data.dto.response.HomeRecommendInternResponseDto -import com.terning.data.dto.response.HomeUpcomingInternResponseDto +import com.terning.core.network.BaseResponse +import com.terning.core.network.NonDataBaseResponse +import com.terning.data.home.dto.request.ChangeFilterRequestDto +import com.terning.data.home.dto.response.HomeFilteringInfoResponseDto +import com.terning.data.home.dto.response.HomeRecommendInternResponseDto +import com.terning.data.home.dto.response.HomeUpcomingInternResponseDto interface HomeDataSource { suspend fun getUpcomingIntern(): BaseResponse diff --git a/data/src/main/java/com/terning/data/datasourceimpl/HomeDataSourceImpl.kt b/data/home/src/main/java/com/terning/data/home/datasourceimpl/HomeDataSourceImpl.kt similarity index 63% rename from data/src/main/java/com/terning/data/datasourceimpl/HomeDataSourceImpl.kt rename to data/home/src/main/java/com/terning/data/home/datasourceimpl/HomeDataSourceImpl.kt index 9e4c3defe..cc73df1b8 100644 --- a/data/src/main/java/com/terning/data/datasourceimpl/HomeDataSourceImpl.kt +++ b/data/home/src/main/java/com/terning/data/home/datasourceimpl/HomeDataSourceImpl.kt @@ -1,13 +1,13 @@ -package com.terning.data.datasourceimpl +package com.terning.data.home.datasourceimpl -import com.terning.data.datasource.HomeDataSource -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.NonDataBaseResponse -import com.terning.data.dto.request.ChangeFilterRequestDto -import com.terning.data.dto.response.HomeFilteringInfoResponseDto -import com.terning.data.dto.response.HomeRecommendInternResponseDto -import com.terning.data.dto.response.HomeUpcomingInternResponseDto -import com.terning.data.service.HomeService +import com.terning.core.network.BaseResponse +import com.terning.core.network.NonDataBaseResponse +import com.terning.data.home.datasource.HomeDataSource +import com.terning.data.home.dto.request.ChangeFilterRequestDto +import com.terning.data.home.dto.response.HomeFilteringInfoResponseDto +import com.terning.data.home.dto.response.HomeRecommendInternResponseDto +import com.terning.data.home.dto.response.HomeUpcomingInternResponseDto +import com.terning.data.home.service.HomeService import javax.inject.Inject class HomeDataSourceImpl @Inject constructor( diff --git a/data/home/src/main/java/com/terning/data/home/di/DataSourceModule.kt b/data/home/src/main/java/com/terning/data/home/di/DataSourceModule.kt new file mode 100644 index 000000000..adc34159a --- /dev/null +++ b/data/home/src/main/java/com/terning/data/home/di/DataSourceModule.kt @@ -0,0 +1,17 @@ +package com.terning.data.home.di + +import com.terning.data.home.datasource.HomeDataSource +import com.terning.data.home.datasourceimpl.HomeDataSourceImpl +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class DataSourceModule { + @Binds + @Singleton + abstract fun bindHomeDataSource(homeDataSourceImpl: HomeDataSourceImpl): HomeDataSource +} \ No newline at end of file diff --git a/data/home/src/main/java/com/terning/data/home/di/RepositoryModule.kt b/data/home/src/main/java/com/terning/data/home/di/RepositoryModule.kt new file mode 100644 index 000000000..b664a1ee8 --- /dev/null +++ b/data/home/src/main/java/com/terning/data/home/di/RepositoryModule.kt @@ -0,0 +1,17 @@ +package com.terning.data.home.di + +import com.terning.data.home.repositoryimpl.HomeRepositoryImpl +import com.terning.domain.home.repository.HomeRepository +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class RepositoryModule { + @Binds + @Singleton + abstract fun bindHomeRepository(homeRepositoryImpl: HomeRepositoryImpl): HomeRepository +} \ No newline at end of file diff --git a/data/home/src/main/java/com/terning/data/home/di/ServiceModule.kt b/data/home/src/main/java/com/terning/data/home/di/ServiceModule.kt new file mode 100644 index 000000000..956a18ca2 --- /dev/null +++ b/data/home/src/main/java/com/terning/data/home/di/ServiceModule.kt @@ -0,0 +1,19 @@ +package com.terning.data.home.di + +import com.terning.core.network.qualifier.JWT +import com.terning.data.home.service.HomeService +import dagger.Module +import dagger.Provides +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import retrofit2.Retrofit +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +object ServiceModule { + @Provides + @Singleton + fun provideHomeService(@JWT retrofit: Retrofit): HomeService = + retrofit.create(HomeService::class.java) +} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/dto/request/ChangeFilterRequestDto.kt b/data/home/src/main/java/com/terning/data/home/dto/request/ChangeFilterRequestDto.kt similarity index 84% rename from data/src/main/java/com/terning/data/dto/request/ChangeFilterRequestDto.kt rename to data/home/src/main/java/com/terning/data/home/dto/request/ChangeFilterRequestDto.kt index 770af1abf..e476b4148 100644 --- a/data/src/main/java/com/terning/data/dto/request/ChangeFilterRequestDto.kt +++ b/data/home/src/main/java/com/terning/data/home/dto/request/ChangeFilterRequestDto.kt @@ -1,6 +1,6 @@ -package com.terning.data.dto.request +package com.terning.data.home.dto.request -import com.terning.domain.entity.request.ChangeFilteringRequestModel +import com.terning.domain.home.entity.ChangeFilteringRequestModel import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/dto/response/HomeFilteringInfoResponseDto.kt b/data/home/src/main/java/com/terning/data/home/dto/response/HomeFilteringInfoResponseDto.kt similarity index 89% rename from data/src/main/java/com/terning/data/dto/response/HomeFilteringInfoResponseDto.kt rename to data/home/src/main/java/com/terning/data/home/dto/response/HomeFilteringInfoResponseDto.kt index 6ea43e383..699a9a58b 100644 --- a/data/src/main/java/com/terning/data/dto/response/HomeFilteringInfoResponseDto.kt +++ b/data/home/src/main/java/com/terning/data/home/dto/response/HomeFilteringInfoResponseDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.response +package com.terning.data.home.dto.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/dto/response/HomeRecommendInternResponseDto.kt b/data/home/src/main/java/com/terning/data/home/dto/response/HomeRecommendInternResponseDto.kt similarity index 95% rename from data/src/main/java/com/terning/data/dto/response/HomeRecommendInternResponseDto.kt rename to data/home/src/main/java/com/terning/data/home/dto/response/HomeRecommendInternResponseDto.kt index 4bb027e02..1cf736f04 100644 --- a/data/src/main/java/com/terning/data/dto/response/HomeRecommendInternResponseDto.kt +++ b/data/home/src/main/java/com/terning/data/home/dto/response/HomeRecommendInternResponseDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.response +package com.terning.data.home.dto.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/dto/response/HomeUpcomingInternResponseDto.kt b/data/home/src/main/java/com/terning/data/home/dto/response/HomeUpcomingInternResponseDto.kt similarity index 95% rename from data/src/main/java/com/terning/data/dto/response/HomeUpcomingInternResponseDto.kt rename to data/home/src/main/java/com/terning/data/home/dto/response/HomeUpcomingInternResponseDto.kt index 3d77d24e1..145e5f9f0 100644 --- a/data/src/main/java/com/terning/data/dto/response/HomeUpcomingInternResponseDto.kt +++ b/data/home/src/main/java/com/terning/data/home/dto/response/HomeUpcomingInternResponseDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.response +package com.terning.data.home.dto.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/mapper/home/HomeFilteringInfoMapper.kt b/data/home/src/main/java/com/terning/data/home/mapper/HomeFilteringInfoMapper.kt similarity index 60% rename from data/src/main/java/com/terning/data/mapper/home/HomeFilteringInfoMapper.kt rename to data/home/src/main/java/com/terning/data/home/mapper/HomeFilteringInfoMapper.kt index afdb5f7bb..dc32a148b 100644 --- a/data/src/main/java/com/terning/data/mapper/home/HomeFilteringInfoMapper.kt +++ b/data/home/src/main/java/com/terning/data/home/mapper/HomeFilteringInfoMapper.kt @@ -1,7 +1,7 @@ -package com.terning.data.mapper.home +package com.terning.data.home.mapper -import com.terning.data.dto.response.HomeFilteringInfoResponseDto -import com.terning.domain.entity.home.HomeFilteringInfo +import com.terning.data.home.dto.response.HomeFilteringInfoResponseDto +import com.terning.domain.home.entity.HomeFilteringInfo fun HomeFilteringInfoResponseDto.toHomeFilteringInfo(): HomeFilteringInfo = HomeFilteringInfo( diff --git a/data/src/main/java/com/terning/data/mapper/home/HomeRecommendInternMapper.kt b/data/home/src/main/java/com/terning/data/home/mapper/HomeRecommendInternMapper.kt similarity index 82% rename from data/src/main/java/com/terning/data/mapper/home/HomeRecommendInternMapper.kt rename to data/home/src/main/java/com/terning/data/home/mapper/HomeRecommendInternMapper.kt index 96a45724d..00f4d2b93 100644 --- a/data/src/main/java/com/terning/data/mapper/home/HomeRecommendInternMapper.kt +++ b/data/home/src/main/java/com/terning/data/home/mapper/HomeRecommendInternMapper.kt @@ -1,7 +1,7 @@ -package com.terning.data.mapper.home +package com.terning.data.home.mapper -import com.terning.data.dto.response.HomeRecommendInternResponseDto -import com.terning.domain.entity.home.HomeRecommendIntern +import com.terning.data.home.dto.response.HomeRecommendInternResponseDto +import com.terning.domain.home.entity.HomeRecommendIntern fun HomeRecommendInternResponseDto.toHomeRecommendInternList(): HomeRecommendIntern = HomeRecommendIntern( diff --git a/data/src/main/java/com/terning/data/mapper/home/HomeUpcomingInternMapper.kt b/data/home/src/main/java/com/terning/data/home/mapper/HomeUpcomingInternMapper.kt similarity index 83% rename from data/src/main/java/com/terning/data/mapper/home/HomeUpcomingInternMapper.kt rename to data/home/src/main/java/com/terning/data/home/mapper/HomeUpcomingInternMapper.kt index e11577c32..503e891bc 100644 --- a/data/src/main/java/com/terning/data/mapper/home/HomeUpcomingInternMapper.kt +++ b/data/home/src/main/java/com/terning/data/home/mapper/HomeUpcomingInternMapper.kt @@ -1,7 +1,7 @@ -package com.terning.data.mapper.home +package com.terning.data.home.mapper -import com.terning.data.dto.response.HomeUpcomingInternResponseDto -import com.terning.domain.entity.home.HomeUpcomingIntern +import com.terning.data.home.dto.response.HomeUpcomingInternResponseDto +import com.terning.domain.home.entity.HomeUpcomingIntern fun HomeUpcomingInternResponseDto.toHomeUpcomingInternList(): HomeUpcomingIntern = HomeUpcomingIntern( diff --git a/data/src/main/java/com/terning/data/repositoryimpl/HomeRepositoryImpl.kt b/data/home/src/main/java/com/terning/data/home/repositoryimpl/HomeRepositoryImpl.kt similarity index 64% rename from data/src/main/java/com/terning/data/repositoryimpl/HomeRepositoryImpl.kt rename to data/home/src/main/java/com/terning/data/home/repositoryimpl/HomeRepositoryImpl.kt index 8955364fd..8c01ea9c1 100644 --- a/data/src/main/java/com/terning/data/repositoryimpl/HomeRepositoryImpl.kt +++ b/data/home/src/main/java/com/terning/data/home/repositoryimpl/HomeRepositoryImpl.kt @@ -1,15 +1,15 @@ -package com.terning.data.repositoryimpl +package com.terning.data.home.repositoryimpl -import com.terning.data.datasource.HomeDataSource -import com.terning.data.dto.request.toChangeFilterRequestDto -import com.terning.data.mapper.home.toHomeFilteringInfo -import com.terning.data.mapper.home.toHomeRecommendInternList -import com.terning.data.mapper.home.toHomeUpcomingInternList -import com.terning.domain.entity.home.HomeFilteringInfo -import com.terning.domain.entity.home.HomeRecommendIntern -import com.terning.domain.entity.home.HomeUpcomingIntern -import com.terning.domain.entity.request.ChangeFilteringRequestModel -import com.terning.domain.repository.HomeRepository +import com.terning.data.home.datasource.HomeDataSource +import com.terning.data.home.dto.request.toChangeFilterRequestDto +import com.terning.data.home.mapper.toHomeFilteringInfo +import com.terning.data.home.mapper.toHomeRecommendInternList +import com.terning.data.home.mapper.toHomeUpcomingInternList +import com.terning.domain.home.entity.ChangeFilteringRequestModel +import com.terning.domain.home.entity.HomeFilteringInfo +import com.terning.domain.home.entity.HomeRecommendIntern +import com.terning.domain.home.entity.HomeUpcomingIntern +import com.terning.domain.home.repository.HomeRepository import javax.inject.Inject class HomeRepositoryImpl @Inject constructor( diff --git a/data/src/main/java/com/terning/data/service/HomeService.kt b/data/home/src/main/java/com/terning/data/home/service/HomeService.kt similarity index 63% rename from data/src/main/java/com/terning/data/service/HomeService.kt rename to data/home/src/main/java/com/terning/data/home/service/HomeService.kt index dd89765d3..1215a33ec 100644 --- a/data/src/main/java/com/terning/data/service/HomeService.kt +++ b/data/home/src/main/java/com/terning/data/home/service/HomeService.kt @@ -1,11 +1,11 @@ -package com.terning.data.service +package com.terning.data.home.service -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.NonDataBaseResponse -import com.terning.data.dto.request.ChangeFilterRequestDto -import com.terning.data.dto.response.HomeFilteringInfoResponseDto -import com.terning.data.dto.response.HomeRecommendInternResponseDto -import com.terning.data.dto.response.HomeUpcomingInternResponseDto +import com.terning.core.network.BaseResponse +import com.terning.core.network.NonDataBaseResponse +import com.terning.data.home.dto.request.ChangeFilterRequestDto +import com.terning.data.home.dto.response.HomeFilteringInfoResponseDto +import com.terning.data.home.dto.response.HomeRecommendInternResponseDto +import com.terning.data.home.dto.response.HomeUpcomingInternResponseDto import retrofit2.http.Body import retrofit2.http.GET import retrofit2.http.PUT diff --git a/data/intern/.gitignore b/data/intern/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/data/intern/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/data/intern/build.gradle.kts b/data/intern/build.gradle.kts new file mode 100644 index 000000000..05f4e96f2 --- /dev/null +++ b/data/intern/build.gradle.kts @@ -0,0 +1,14 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.data) +} + +android { + setNamespace("data.intern") +} + +dependencies { + // domain + implementation(project(":domain:intern")) +} \ No newline at end of file diff --git a/data/intern/src/main/AndroidManifest.xml b/data/intern/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/data/intern/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/data/intern/src/main/java/com/terning/data/intern/datasource/InternDataSource.kt b/data/intern/src/main/java/com/terning/data/intern/datasource/InternDataSource.kt new file mode 100644 index 000000000..859e26ec7 --- /dev/null +++ b/data/intern/src/main/java/com/terning/data/intern/datasource/InternDataSource.kt @@ -0,0 +1,8 @@ +package com.terning.data.intern.datasource + +import com.terning.core.network.BaseResponse +import com.terning.data.intern.dto.response.InternResponseDto + +interface InternDataSource { + suspend fun getInternInfo(id: Long): BaseResponse +} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/datasourceimpl/InternDataSourceImpl.kt b/data/intern/src/main/java/com/terning/data/intern/datasourceimpl/InternDataSourceImpl.kt similarity index 50% rename from data/src/main/java/com/terning/data/datasourceimpl/InternDataSourceImpl.kt rename to data/intern/src/main/java/com/terning/data/intern/datasourceimpl/InternDataSourceImpl.kt index 856e56cc7..082d36d1d 100644 --- a/data/src/main/java/com/terning/data/datasourceimpl/InternDataSourceImpl.kt +++ b/data/intern/src/main/java/com/terning/data/intern/datasourceimpl/InternDataSourceImpl.kt @@ -1,9 +1,9 @@ -package com.terning.data.datasourceimpl +package com.terning.data.intern.datasourceimpl -import com.terning.data.datasource.InternDataSource -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.response.InternResponseDto -import com.terning.data.service.InternService +import com.terning.core.network.BaseResponse +import com.terning.data.intern.datasource.InternDataSource +import com.terning.data.intern.dto.response.InternResponseDto +import com.terning.data.intern.service.InternService import javax.inject.Inject class InternDataSourceImpl @Inject constructor( diff --git a/data/intern/src/main/java/com/terning/data/intern/di/DataSourceModule.kt b/data/intern/src/main/java/com/terning/data/intern/di/DataSourceModule.kt new file mode 100644 index 000000000..c39cd8275 --- /dev/null +++ b/data/intern/src/main/java/com/terning/data/intern/di/DataSourceModule.kt @@ -0,0 +1,17 @@ +package com.terning.data.intern.di + +import com.terning.data.intern.datasource.InternDataSource +import com.terning.data.intern.datasourceimpl.InternDataSourceImpl +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class DataSourceModule { + @Binds + @Singleton + abstract fun bindInternInfoSource(internalInfoDataSourceImpl: InternDataSourceImpl): InternDataSource +} \ No newline at end of file diff --git a/data/intern/src/main/java/com/terning/data/intern/di/RepositoryModule.kt b/data/intern/src/main/java/com/terning/data/intern/di/RepositoryModule.kt new file mode 100644 index 000000000..c97dc2fba --- /dev/null +++ b/data/intern/src/main/java/com/terning/data/intern/di/RepositoryModule.kt @@ -0,0 +1,18 @@ +package com.terning.data.intern.di + +import com.terning.data.intern.repositoryimpl.InternRepositoryImpl +import com.terning.domain.intern.repository.InternRepository +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class RepositoryModule { + @Binds + @Singleton + abstract fun bindInternRepository(internRepositoryImpl: InternRepositoryImpl): InternRepository + +} \ No newline at end of file diff --git a/data/intern/src/main/java/com/terning/data/intern/di/ServiceModule.kt b/data/intern/src/main/java/com/terning/data/intern/di/ServiceModule.kt new file mode 100644 index 000000000..dff79cfcb --- /dev/null +++ b/data/intern/src/main/java/com/terning/data/intern/di/ServiceModule.kt @@ -0,0 +1,19 @@ +package com.terning.data.intern.di + +import com.terning.core.network.qualifier.JWT +import com.terning.data.intern.service.InternService +import dagger.Module +import dagger.Provides +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import retrofit2.Retrofit +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +object ServiceModule { + @Provides + @Singleton + fun providerInternService(@JWT retrofit: Retrofit): InternService = + retrofit.create(InternService::class.java) +} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/dto/response/InternResponseDto.kt b/data/intern/src/main/java/com/terning/data/intern/dto/response/InternResponseDto.kt similarity index 95% rename from data/src/main/java/com/terning/data/dto/response/InternResponseDto.kt rename to data/intern/src/main/java/com/terning/data/intern/dto/response/InternResponseDto.kt index 3be4e1979..e798abb61 100644 --- a/data/src/main/java/com/terning/data/dto/response/InternResponseDto.kt +++ b/data/intern/src/main/java/com/terning/data/intern/dto/response/InternResponseDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.response +package com.terning.data.intern.dto.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/mapper/intern/InternInfoMapper.kt b/data/intern/src/main/java/com/terning/data/intern/mapper/InternInfoMapper.kt similarity index 78% rename from data/src/main/java/com/terning/data/mapper/intern/InternInfoMapper.kt rename to data/intern/src/main/java/com/terning/data/intern/mapper/InternInfoMapper.kt index 9084268eb..49b080ff4 100644 --- a/data/src/main/java/com/terning/data/mapper/intern/InternInfoMapper.kt +++ b/data/intern/src/main/java/com/terning/data/intern/mapper/InternInfoMapper.kt @@ -1,7 +1,7 @@ -package com.terning.data.mapper.intern +package com.terning.data.intern.mapper -import com.terning.data.dto.response.InternResponseDto -import com.terning.domain.entity.intern.InternInfo +import com.terning.data.intern.dto.response.InternResponseDto +import com.terning.domain.intern.entity.InternInfo fun InternResponseDto.toInternInfo(): InternInfo = InternInfo( diff --git a/data/src/main/java/com/terning/data/repositoryimpl/InternRepositoryImpl.kt b/data/intern/src/main/java/com/terning/data/intern/repositoryimpl/InternRepositoryImpl.kt similarity index 53% rename from data/src/main/java/com/terning/data/repositoryimpl/InternRepositoryImpl.kt rename to data/intern/src/main/java/com/terning/data/intern/repositoryimpl/InternRepositoryImpl.kt index 27696e06b..8cbff17d8 100644 --- a/data/src/main/java/com/terning/data/repositoryimpl/InternRepositoryImpl.kt +++ b/data/intern/src/main/java/com/terning/data/intern/repositoryimpl/InternRepositoryImpl.kt @@ -1,9 +1,9 @@ -package com.terning.data.repositoryimpl +package com.terning.data.intern.repositoryimpl -import com.terning.data.datasource.InternDataSource -import com.terning.data.mapper.intern.toInternInfo -import com.terning.domain.entity.intern.InternInfo -import com.terning.domain.repository.InternRepository +import com.terning.data.intern.datasource.InternDataSource +import com.terning.data.intern.mapper.toInternInfo +import com.terning.domain.intern.entity.InternInfo +import com.terning.domain.intern.repository.InternRepository import javax.inject.Inject class InternRepositoryImpl @Inject constructor( diff --git a/data/src/main/java/com/terning/data/service/InternService.kt b/data/intern/src/main/java/com/terning/data/intern/service/InternService.kt similarity index 66% rename from data/src/main/java/com/terning/data/service/InternService.kt rename to data/intern/src/main/java/com/terning/data/intern/service/InternService.kt index ad0c0af5e..68f8d2f03 100644 --- a/data/src/main/java/com/terning/data/service/InternService.kt +++ b/data/intern/src/main/java/com/terning/data/intern/service/InternService.kt @@ -1,7 +1,7 @@ -package com.terning.data.service +package com.terning.data.intern.service -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.response.InternResponseDto +import com.terning.core.network.BaseResponse +import com.terning.data.intern.dto.response.InternResponseDto import retrofit2.http.GET import retrofit2.http.Path diff --git a/data/mypage/.gitignore b/data/mypage/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/data/mypage/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/data/mypage/build.gradle.kts b/data/mypage/build.gradle.kts new file mode 100644 index 000000000..74aa25e1d --- /dev/null +++ b/data/mypage/build.gradle.kts @@ -0,0 +1,14 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.data) +} + +android { + setNamespace("data.mypage") +} + +dependencies { + // domain + implementation(project(":domain:mypage")) +} \ No newline at end of file diff --git a/data/mypage/src/main/AndroidManifest.xml b/data/mypage/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/data/mypage/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/datasource/MyPageDataSource.kt b/data/mypage/src/main/java/com/terning/data/mypage/datasource/MyPageDataSource.kt similarity index 52% rename from data/src/main/java/com/terning/data/datasource/MyPageDataSource.kt rename to data/mypage/src/main/java/com/terning/data/mypage/datasource/MyPageDataSource.kt index 60361d5f2..82733b8f2 100644 --- a/data/src/main/java/com/terning/data/datasource/MyPageDataSource.kt +++ b/data/mypage/src/main/java/com/terning/data/mypage/datasource/MyPageDataSource.kt @@ -1,9 +1,9 @@ -package com.terning.data.datasource +package com.terning.data.mypage.datasource -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.NonDataBaseResponse -import com.terning.data.dto.request.MyPageProfileEditRequestDto -import com.terning.data.dto.response.MyPageResponseDto +import com.terning.core.network.BaseResponse +import com.terning.core.network.NonDataBaseResponse +import com.terning.data.mypage.dto.request.MyPageProfileEditRequestDto +import com.terning.data.mypage.dto.response.MyPageResponseDto interface MyPageDataSource { suspend fun postLogout(): NonDataBaseResponse diff --git a/data/src/main/java/com/terning/data/datasourceimpl/MyPageDataSourceImpl.kt b/data/mypage/src/main/java/com/terning/data/mypage/datasourceimpl/MyPageDataSourceImpl.kt similarity index 59% rename from data/src/main/java/com/terning/data/datasourceimpl/MyPageDataSourceImpl.kt rename to data/mypage/src/main/java/com/terning/data/mypage/datasourceimpl/MyPageDataSourceImpl.kt index a1560963c..a8c1fe64b 100644 --- a/data/src/main/java/com/terning/data/datasourceimpl/MyPageDataSourceImpl.kt +++ b/data/mypage/src/main/java/com/terning/data/mypage/datasourceimpl/MyPageDataSourceImpl.kt @@ -1,11 +1,11 @@ -package com.terning.data.datasourceimpl +package com.terning.data.mypage.datasourceimpl -import com.terning.data.datasource.MyPageDataSource -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.NonDataBaseResponse -import com.terning.data.dto.request.MyPageProfileEditRequestDto -import com.terning.data.dto.response.MyPageResponseDto -import com.terning.data.service.MyPageService +import com.terning.core.network.BaseResponse +import com.terning.core.network.NonDataBaseResponse +import com.terning.data.mypage.datasource.MyPageDataSource +import com.terning.data.mypage.dto.request.MyPageProfileEditRequestDto +import com.terning.data.mypage.dto.response.MyPageResponseDto +import com.terning.data.mypage.service.MyPageService import javax.inject.Inject class MyPageDataSourceImpl @Inject constructor( diff --git a/data/mypage/src/main/java/com/terning/data/mypage/di/DataSourceModule.kt b/data/mypage/src/main/java/com/terning/data/mypage/di/DataSourceModule.kt new file mode 100644 index 000000000..332020863 --- /dev/null +++ b/data/mypage/src/main/java/com/terning/data/mypage/di/DataSourceModule.kt @@ -0,0 +1,17 @@ +package com.terning.data.mypage.di + +import com.terning.data.mypage.datasource.MyPageDataSource +import com.terning.data.mypage.datasourceimpl.MyPageDataSourceImpl +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class DataSourceModule { + @Binds + @Singleton + abstract fun bindMyPageDataSource(myPageDataSourceImpl: MyPageDataSourceImpl): MyPageDataSource +} \ No newline at end of file diff --git a/data/mypage/src/main/java/com/terning/data/mypage/di/RepositoryModule.kt b/data/mypage/src/main/java/com/terning/data/mypage/di/RepositoryModule.kt new file mode 100644 index 000000000..1f26c6532 --- /dev/null +++ b/data/mypage/src/main/java/com/terning/data/mypage/di/RepositoryModule.kt @@ -0,0 +1,17 @@ +package com.terning.data.mypage.di + +import com.terning.data.mypage.repositoryimpl.MyPageRepositoryImpl +import com.terning.domain.mypage.repository.MyPageRepository +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class RepositoryModule { + @Binds + @Singleton + abstract fun bindMyPageRepository(myPageRepositoryImpl: MyPageRepositoryImpl): MyPageRepository +} \ No newline at end of file diff --git a/data/mypage/src/main/java/com/terning/data/mypage/di/ServiceModule.kt b/data/mypage/src/main/java/com/terning/data/mypage/di/ServiceModule.kt new file mode 100644 index 000000000..15c5068ad --- /dev/null +++ b/data/mypage/src/main/java/com/terning/data/mypage/di/ServiceModule.kt @@ -0,0 +1,19 @@ +package com.terning.data.mypage.di + +import com.terning.core.network.qualifier.JWT +import com.terning.data.mypage.service.MyPageService +import dagger.Module +import dagger.Provides +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import retrofit2.Retrofit +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +object ServiceModule { + @Provides + @Singleton + fun provideMyPageService(@JWT retrofit: Retrofit): MyPageService = + retrofit.create(MyPageService::class.java) +} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/dto/request/MyPageProfileEditRequestDto.kt b/data/mypage/src/main/java/com/terning/data/mypage/dto/request/MyPageProfileEditRequestDto.kt similarity index 84% rename from data/src/main/java/com/terning/data/dto/request/MyPageProfileEditRequestDto.kt rename to data/mypage/src/main/java/com/terning/data/mypage/dto/request/MyPageProfileEditRequestDto.kt index 3f4c7ef8a..af1a33c6b 100644 --- a/data/src/main/java/com/terning/data/dto/request/MyPageProfileEditRequestDto.kt +++ b/data/mypage/src/main/java/com/terning/data/mypage/dto/request/MyPageProfileEditRequestDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.request +package com.terning.data.mypage.dto.request import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/dto/response/MyPageResponseDto.kt b/data/mypage/src/main/java/com/terning/data/mypage/dto/response/MyPageResponseDto.kt similarity index 86% rename from data/src/main/java/com/terning/data/dto/response/MyPageResponseDto.kt rename to data/mypage/src/main/java/com/terning/data/mypage/dto/response/MyPageResponseDto.kt index 3afedf5b3..0cca39b7f 100644 --- a/data/src/main/java/com/terning/data/dto/response/MyPageResponseDto.kt +++ b/data/mypage/src/main/java/com/terning/data/mypage/dto/response/MyPageResponseDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.response +package com.terning.data.mypage.dto.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/mapper/mypage/MyPageMapper.kt b/data/mypage/src/main/java/com/terning/data/mypage/mapper/MyPageMapper.kt similarity index 50% rename from data/src/main/java/com/terning/data/mapper/mypage/MyPageMapper.kt rename to data/mypage/src/main/java/com/terning/data/mypage/mapper/MyPageMapper.kt index 0a19f6e76..3a46f7104 100644 --- a/data/src/main/java/com/terning/data/mapper/mypage/MyPageMapper.kt +++ b/data/mypage/src/main/java/com/terning/data/mypage/mapper/MyPageMapper.kt @@ -1,7 +1,7 @@ -package com.terning.data.mapper.mypage +package com.terning.data.mypage.mapper -import com.terning.data.dto.response.MyPageResponseDto -import com.terning.domain.entity.mypage.MyPageProfile +import com.terning.data.mypage.dto.response.MyPageResponseDto +import com.terning.domain.mypage.entity.MyPageProfile fun MyPageResponseDto.toMyPageProfile() = MyPageProfile( diff --git a/data/src/main/java/com/terning/data/mapper/mypage/MyPageProfileEditMapper.kt b/data/mypage/src/main/java/com/terning/data/mypage/mapper/MyPageProfileEditMapper.kt similarity index 52% rename from data/src/main/java/com/terning/data/mapper/mypage/MyPageProfileEditMapper.kt rename to data/mypage/src/main/java/com/terning/data/mypage/mapper/MyPageProfileEditMapper.kt index 892bbd425..f42bb4183 100644 --- a/data/src/main/java/com/terning/data/mapper/mypage/MyPageProfileEditMapper.kt +++ b/data/mypage/src/main/java/com/terning/data/mypage/mapper/MyPageProfileEditMapper.kt @@ -1,7 +1,7 @@ -package com.terning.data.mapper.mypage +package com.terning.data.mypage.mapper -import com.terning.data.dto.request.MyPageProfileEditRequestDto -import com.terning.domain.entity.mypage.MyPageProfileEdit +import com.terning.data.mypage.dto.request.MyPageProfileEditRequestDto +import com.terning.domain.mypage.entity.MyPageProfileEdit fun MyPageProfileEdit.toMyPageProfileEditRequestDto(): MyPageProfileEditRequestDto = MyPageProfileEditRequestDto( diff --git a/data/src/main/java/com/terning/data/repositoryimpl/MyPageRepositoryImpl.kt b/data/mypage/src/main/java/com/terning/data/mypage/repositoryimpl/MyPageRepositoryImpl.kt similarity index 67% rename from data/src/main/java/com/terning/data/repositoryimpl/MyPageRepositoryImpl.kt rename to data/mypage/src/main/java/com/terning/data/mypage/repositoryimpl/MyPageRepositoryImpl.kt index 76aa84af2..dbff41328 100644 --- a/data/src/main/java/com/terning/data/repositoryimpl/MyPageRepositoryImpl.kt +++ b/data/mypage/src/main/java/com/terning/data/mypage/repositoryimpl/MyPageRepositoryImpl.kt @@ -1,11 +1,11 @@ -package com.terning.data.repositoryimpl +package com.terning.data.mypage.repositoryimpl -import com.terning.data.datasource.MyPageDataSource -import com.terning.data.mapper.mypage.toMyPageProfile -import com.terning.data.mapper.mypage.toMyPageProfileEditRequestDto -import com.terning.domain.entity.mypage.MyPageProfile -import com.terning.domain.entity.mypage.MyPageProfileEdit -import com.terning.domain.repository.MyPageRepository +import com.terning.data.mypage.datasource.MyPageDataSource +import com.terning.data.mypage.mapper.toMyPageProfile +import com.terning.data.mypage.mapper.toMyPageProfileEditRequestDto +import com.terning.domain.mypage.entity.MyPageProfile +import com.terning.domain.mypage.entity.MyPageProfileEdit +import com.terning.domain.mypage.repository.MyPageRepository import javax.inject.Inject class MyPageRepositoryImpl @Inject constructor( diff --git a/data/src/main/java/com/terning/data/service/MyPageService.kt b/data/mypage/src/main/java/com/terning/data/mypage/service/MyPageService.kt similarity index 67% rename from data/src/main/java/com/terning/data/service/MyPageService.kt rename to data/mypage/src/main/java/com/terning/data/mypage/service/MyPageService.kt index 9b7a62b61..ece71a44c 100644 --- a/data/src/main/java/com/terning/data/service/MyPageService.kt +++ b/data/mypage/src/main/java/com/terning/data/mypage/service/MyPageService.kt @@ -1,9 +1,9 @@ -package com.terning.data.service +package com.terning.data.mypage.service -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.NonDataBaseResponse -import com.terning.data.dto.request.MyPageProfileEditRequestDto -import com.terning.data.dto.response.MyPageResponseDto +import com.terning.core.network.BaseResponse +import com.terning.core.network.NonDataBaseResponse +import com.terning.data.mypage.dto.request.MyPageProfileEditRequestDto +import com.terning.data.mypage.dto.response.MyPageResponseDto import retrofit2.http.Body import retrofit2.http.DELETE import retrofit2.http.GET diff --git a/data/scrap/.gitignore b/data/scrap/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/data/scrap/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/data/scrap/build.gradle.kts b/data/scrap/build.gradle.kts new file mode 100644 index 000000000..ad074a7f8 --- /dev/null +++ b/data/scrap/build.gradle.kts @@ -0,0 +1,14 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.data) +} + +android { + setNamespace("data.scarp") +} + +dependencies { + // domain + implementation(project(":domain:scrap")) +} \ No newline at end of file diff --git a/data/scrap/src/main/AndroidManifest.xml b/data/scrap/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/data/scrap/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/datasource/ScrapDataSource.kt b/data/scrap/src/main/java/com/terning/data/scrap/datasource/ScrapDataSource.kt similarity index 69% rename from data/src/main/java/com/terning/data/datasource/ScrapDataSource.kt rename to data/scrap/src/main/java/com/terning/data/scrap/datasource/ScrapDataSource.kt index ecab3bd13..7ad59c242 100644 --- a/data/src/main/java/com/terning/data/datasource/ScrapDataSource.kt +++ b/data/scrap/src/main/java/com/terning/data/scrap/datasource/ScrapDataSource.kt @@ -1,7 +1,7 @@ -package com.terning.data.datasource +package com.terning.data.scrap.datasource -import com.terning.data.dto.NonDataBaseResponse -import com.terning.domain.entity.calendar.CalendarScrapRequest +import com.terning.core.network.NonDataBaseResponse +import com.terning.domain.scrap.entity.CalendarScrapRequest interface ScrapDataSource { suspend fun postScrap( diff --git a/data/src/main/java/com/terning/data/datasourceimpl/ScrapDataSourceImpl.kt b/data/scrap/src/main/java/com/terning/data/scrap/datasourceimpl/ScrapDataSourceImpl.kt similarity index 70% rename from data/src/main/java/com/terning/data/datasourceimpl/ScrapDataSourceImpl.kt rename to data/scrap/src/main/java/com/terning/data/scrap/datasourceimpl/ScrapDataSourceImpl.kt index fee3ddcc4..598ff7c35 100644 --- a/data/src/main/java/com/terning/data/datasourceimpl/ScrapDataSourceImpl.kt +++ b/data/scrap/src/main/java/com/terning/data/scrap/datasourceimpl/ScrapDataSourceImpl.kt @@ -1,10 +1,10 @@ -package com.terning.data.datasourceimpl +package com.terning.data.scrap.datasourceimpl -import com.terning.data.datasource.ScrapDataSource -import com.terning.data.dto.NonDataBaseResponse -import com.terning.data.dto.request.ScrapColorRequestDto -import com.terning.data.service.ScrapService -import com.terning.domain.entity.calendar.CalendarScrapRequest +import com.terning.core.network.NonDataBaseResponse +import com.terning.data.scrap.datasource.ScrapDataSource +import com.terning.data.scrap.dto.request.ScrapColorRequestDto +import com.terning.data.scrap.service.ScrapService +import com.terning.domain.scrap.entity.CalendarScrapRequest import javax.inject.Inject class ScrapDataSourceImpl @Inject constructor( diff --git a/data/scrap/src/main/java/com/terning/data/scrap/di/DataSourceModule.kt b/data/scrap/src/main/java/com/terning/data/scrap/di/DataSourceModule.kt new file mode 100644 index 000000000..8f8c57741 --- /dev/null +++ b/data/scrap/src/main/java/com/terning/data/scrap/di/DataSourceModule.kt @@ -0,0 +1,18 @@ +package com.terning.data.scrap.di + +import com.terning.data.scrap.datasource.ScrapDataSource +import com.terning.data.scrap.datasourceimpl.ScrapDataSourceImpl +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class DataSourceModule { + @Binds + @Singleton + abstract fun bindScrapDataSource(scrapDataSourceImpl: ScrapDataSourceImpl): ScrapDataSource + +} \ No newline at end of file diff --git a/data/scrap/src/main/java/com/terning/data/scrap/di/RepositoryModule.kt b/data/scrap/src/main/java/com/terning/data/scrap/di/RepositoryModule.kt new file mode 100644 index 000000000..c3e0f4fe1 --- /dev/null +++ b/data/scrap/src/main/java/com/terning/data/scrap/di/RepositoryModule.kt @@ -0,0 +1,18 @@ +package com.terning.data.scrap.di + +import com.terning.data.scrap.repositoryimpl.ScrapRepositoryImpl +import com.terning.domain.scrap.repository.ScrapRepository +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class RepositoryModule { + @Binds + @Singleton + abstract fun bindScrapRepository(scrapRepositoryImpl: ScrapRepositoryImpl): ScrapRepository + +} \ No newline at end of file diff --git a/data/scrap/src/main/java/com/terning/data/scrap/di/ServiceModule.kt b/data/scrap/src/main/java/com/terning/data/scrap/di/ServiceModule.kt new file mode 100644 index 000000000..89d9ce853 --- /dev/null +++ b/data/scrap/src/main/java/com/terning/data/scrap/di/ServiceModule.kt @@ -0,0 +1,19 @@ +package com.terning.data.scrap.di + +import com.terning.core.network.qualifier.JWT +import com.terning.data.scrap.service.ScrapService +import dagger.Module +import dagger.Provides +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import retrofit2.Retrofit +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +object ServiceModule { + @Provides + @Singleton + fun provideScrapService(@JWT retrofit: Retrofit): ScrapService = + retrofit.create(ScrapService::class.java) +} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/dto/request/ScrapColorRequestDto.kt b/data/scrap/src/main/java/com/terning/data/scrap/dto/request/ScrapColorRequestDto.kt similarity index 81% rename from data/src/main/java/com/terning/data/dto/request/ScrapColorRequestDto.kt rename to data/scrap/src/main/java/com/terning/data/scrap/dto/request/ScrapColorRequestDto.kt index c6d96ce50..ff04b1db7 100644 --- a/data/src/main/java/com/terning/data/dto/request/ScrapColorRequestDto.kt +++ b/data/scrap/src/main/java/com/terning/data/scrap/dto/request/ScrapColorRequestDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.request +package com.terning.data.scrap.dto.request import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/repositoryimpl/ScrapRepositoryImpl.kt b/data/scrap/src/main/java/com/terning/data/scrap/repositoryimpl/ScrapRepositoryImpl.kt similarity index 76% rename from data/src/main/java/com/terning/data/repositoryimpl/ScrapRepositoryImpl.kt rename to data/scrap/src/main/java/com/terning/data/scrap/repositoryimpl/ScrapRepositoryImpl.kt index ba532fe90..cf7a93cb2 100644 --- a/data/src/main/java/com/terning/data/repositoryimpl/ScrapRepositoryImpl.kt +++ b/data/scrap/src/main/java/com/terning/data/scrap/repositoryimpl/ScrapRepositoryImpl.kt @@ -1,8 +1,8 @@ -package com.terning.data.repositoryimpl +package com.terning.data.scrap.repositoryimpl -import com.terning.data.datasource.ScrapDataSource -import com.terning.domain.entity.calendar.CalendarScrapRequest -import com.terning.domain.repository.ScrapRepository +import com.terning.data.scrap.datasource.ScrapDataSource +import com.terning.domain.scrap.entity.CalendarScrapRequest +import com.terning.domain.scrap.repository.ScrapRepository import javax.inject.Inject class ScrapRepositoryImpl @Inject constructor( diff --git a/data/src/main/java/com/terning/data/service/ScrapService.kt b/data/scrap/src/main/java/com/terning/data/scrap/service/ScrapService.kt similarity index 82% rename from data/src/main/java/com/terning/data/service/ScrapService.kt rename to data/scrap/src/main/java/com/terning/data/scrap/service/ScrapService.kt index 1e2276827..08614676b 100644 --- a/data/src/main/java/com/terning/data/service/ScrapService.kt +++ b/data/scrap/src/main/java/com/terning/data/scrap/service/ScrapService.kt @@ -1,7 +1,7 @@ -package com.terning.data.service +package com.terning.data.scrap.service -import com.terning.data.dto.NonDataBaseResponse -import com.terning.data.dto.request.ScrapColorRequestDto +import com.terning.core.network.NonDataBaseResponse +import com.terning.data.scrap.dto.request.ScrapColorRequestDto import retrofit2.http.Body import retrofit2.http.DELETE import retrofit2.http.PATCH diff --git a/data/search/.gitignore b/data/search/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/data/search/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/data/search/build.gradle.kts b/data/search/build.gradle.kts new file mode 100644 index 000000000..33d9f5d27 --- /dev/null +++ b/data/search/build.gradle.kts @@ -0,0 +1,14 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.data) +} + +android { + setNamespace("data.search") +} + +dependencies { + // domain + implementation(project(":domain:search")) +} \ No newline at end of file diff --git a/data/search/src/main/AndroidManifest.xml b/data/search/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/data/search/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/data/search/src/main/java/com/terning/data/search/datasource/SearchDataSource.kt b/data/search/src/main/java/com/terning/data/search/datasource/SearchDataSource.kt new file mode 100644 index 000000000..9743bf91d --- /dev/null +++ b/data/search/src/main/java/com/terning/data/search/datasource/SearchDataSource.kt @@ -0,0 +1,12 @@ +package com.terning.data.search.datasource + +import com.terning.core.network.BaseResponse +import com.terning.data.search.dto.request.SearchRequestDto +import com.terning.data.search.dto.response.SearchAnnouncementResponseDto +import com.terning.data.search.dto.response.SearchResultResponseDto + +interface SearchDataSource { + suspend fun getSearch(request: SearchRequestDto): BaseResponse + suspend fun getSearchViews(): BaseResponse + suspend fun getSearchScraps(): BaseResponse +} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/datasourceimpl/SearchDataSourceImpl.kt b/data/search/src/main/java/com/terning/data/search/datasourceimpl/SearchDataSourceImpl.kt similarity index 62% rename from data/src/main/java/com/terning/data/datasourceimpl/SearchDataSourceImpl.kt rename to data/search/src/main/java/com/terning/data/search/datasourceimpl/SearchDataSourceImpl.kt index 2d2397e79..774624f74 100644 --- a/data/src/main/java/com/terning/data/datasourceimpl/SearchDataSourceImpl.kt +++ b/data/search/src/main/java/com/terning/data/search/datasourceimpl/SearchDataSourceImpl.kt @@ -1,11 +1,11 @@ -package com.terning.data.datasourceimpl +package com.terning.data.search.datasourceimpl -import com.terning.data.datasource.SearchDataSource -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.request.SearchRequestDto -import com.terning.data.dto.response.SearchResultResponseDto -import com.terning.data.dto.response.SearchAnnouncementResponseDto -import com.terning.data.service.SearchService +import com.terning.core.network.BaseResponse +import com.terning.data.search.datasource.SearchDataSource +import com.terning.data.search.dto.request.SearchRequestDto +import com.terning.data.search.dto.response.SearchAnnouncementResponseDto +import com.terning.data.search.dto.response.SearchResultResponseDto +import com.terning.data.search.service.SearchService import javax.inject.Inject class SearchDataSourceImpl @Inject constructor( diff --git a/data/search/src/main/java/com/terning/data/search/di/DataSourceModule.kt b/data/search/src/main/java/com/terning/data/search/di/DataSourceModule.kt new file mode 100644 index 000000000..ce4563557 --- /dev/null +++ b/data/search/src/main/java/com/terning/data/search/di/DataSourceModule.kt @@ -0,0 +1,18 @@ +package com.terning.data.search.di + +import com.terning.data.search.datasource.SearchDataSource +import com.terning.data.search.datasourceimpl.SearchDataSourceImpl +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class DataSourceModule { + @Binds + @Singleton + abstract fun bindSearchDataSource(searchDataSourceImpl: SearchDataSourceImpl): + SearchDataSource +} \ No newline at end of file diff --git a/data/search/src/main/java/com/terning/data/search/di/RepositoryModule.kt b/data/search/src/main/java/com/terning/data/search/di/RepositoryModule.kt new file mode 100644 index 000000000..aa6eddbe5 --- /dev/null +++ b/data/search/src/main/java/com/terning/data/search/di/RepositoryModule.kt @@ -0,0 +1,17 @@ +package com.terning.data.search.di + +import com.terning.data.search.repositoryimpl.SearchRepositoryImpl +import com.terning.domain.search.repository.SearchRepository +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class RepositoryModule { + @Binds + @Singleton + abstract fun bindSearchRepository(searchRepositoryImpl: SearchRepositoryImpl): SearchRepository +} \ No newline at end of file diff --git a/data/search/src/main/java/com/terning/data/search/di/ServiceModule.kt b/data/search/src/main/java/com/terning/data/search/di/ServiceModule.kt new file mode 100644 index 000000000..a5ff90bf3 --- /dev/null +++ b/data/search/src/main/java/com/terning/data/search/di/ServiceModule.kt @@ -0,0 +1,19 @@ +package com.terning.data.search.di + +import com.terning.core.network.qualifier.JWT +import com.terning.data.search.service.SearchService +import dagger.Module +import dagger.Provides +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import retrofit2.Retrofit +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +object ServiceModule { + @Provides + @Singleton + fun provideSearchService(@JWT retrofit: Retrofit): SearchService = + retrofit.create(SearchService::class.java) +} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/dto/request/SearchRequestDto.kt b/data/search/src/main/java/com/terning/data/search/dto/request/SearchRequestDto.kt similarity index 87% rename from data/src/main/java/com/terning/data/dto/request/SearchRequestDto.kt rename to data/search/src/main/java/com/terning/data/search/dto/request/SearchRequestDto.kt index 04107e9cf..6df6bcbcc 100644 --- a/data/src/main/java/com/terning/data/dto/request/SearchRequestDto.kt +++ b/data/search/src/main/java/com/terning/data/search/dto/request/SearchRequestDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.request +package com.terning.data.search.dto.request import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/dto/response/SearchAnnouncementResponseDto.kt b/data/search/src/main/java/com/terning/data/search/dto/response/SearchAnnouncementResponseDto.kt similarity index 91% rename from data/src/main/java/com/terning/data/dto/response/SearchAnnouncementResponseDto.kt rename to data/search/src/main/java/com/terning/data/search/dto/response/SearchAnnouncementResponseDto.kt index 350218693..48ca50e92 100644 --- a/data/src/main/java/com/terning/data/dto/response/SearchAnnouncementResponseDto.kt +++ b/data/search/src/main/java/com/terning/data/search/dto/response/SearchAnnouncementResponseDto.kt @@ -1,9 +1,8 @@ -package com.terning.data.dto.response +package com.terning.data.search.dto.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable - @Serializable data class SearchAnnouncementResponseDto( @SerialName("announcements") diff --git a/data/src/main/java/com/terning/data/dto/response/SearchResultResponseDto.kt b/data/search/src/main/java/com/terning/data/search/dto/response/SearchResultResponseDto.kt similarity index 95% rename from data/src/main/java/com/terning/data/dto/response/SearchResultResponseDto.kt rename to data/search/src/main/java/com/terning/data/search/dto/response/SearchResultResponseDto.kt index 2ce61a3b8..cc36bcb98 100644 --- a/data/src/main/java/com/terning/data/dto/response/SearchResultResponseDto.kt +++ b/data/search/src/main/java/com/terning/data/search/dto/response/SearchResultResponseDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.response +package com.terning.data.search.dto.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/src/main/java/com/terning/data/mapper/search/SearchAnnouncementListMapper.kt b/data/search/src/main/java/com/terning/data/search/mapper/SearchAnnouncementListMapper.kt similarity index 64% rename from data/src/main/java/com/terning/data/mapper/search/SearchAnnouncementListMapper.kt rename to data/search/src/main/java/com/terning/data/search/mapper/SearchAnnouncementListMapper.kt index 739297bff..47861f52f 100644 --- a/data/src/main/java/com/terning/data/mapper/search/SearchAnnouncementListMapper.kt +++ b/data/search/src/main/java/com/terning/data/search/mapper/SearchAnnouncementListMapper.kt @@ -1,7 +1,7 @@ -package com.terning.data.mapper.search +package com.terning.data.search.mapper -import com.terning.data.dto.response.SearchAnnouncementResponseDto -import com.terning.domain.entity.search.SearchPopularAnnouncement +import com.terning.data.search.dto.response.SearchAnnouncementResponseDto +import com.terning.domain.search.entity.SearchPopularAnnouncement fun SearchAnnouncementResponseDto.toSearchPopularAnnouncementList(): List { return announcements.map { diff --git a/data/src/main/java/com/terning/data/mapper/search/SearchResultMapper.kt b/data/search/src/main/java/com/terning/data/search/mapper/SearchResultMapper.kt similarity index 76% rename from data/src/main/java/com/terning/data/mapper/search/SearchResultMapper.kt rename to data/search/src/main/java/com/terning/data/search/mapper/SearchResultMapper.kt index 86eab1bb5..13f5ab0a3 100644 --- a/data/src/main/java/com/terning/data/mapper/search/SearchResultMapper.kt +++ b/data/search/src/main/java/com/terning/data/search/mapper/SearchResultMapper.kt @@ -1,8 +1,7 @@ -package com.terning.data.mapper.search - -import com.terning.data.dto.response.SearchResultResponseDto -import com.terning.domain.entity.search.SearchResult +package com.terning.data.search.mapper +import com.terning.data.search.dto.response.SearchResultResponseDto +import com.terning.domain.search.entity.SearchResult fun SearchResultResponseDto.toSearchResultList(): List { return announcements.map { diff --git a/data/src/main/java/com/terning/data/repositoryimpl/SearchRepositoryImpl.kt b/data/search/src/main/java/com/terning/data/search/repositoryimpl/SearchRepositoryImpl.kt similarity index 69% rename from data/src/main/java/com/terning/data/repositoryimpl/SearchRepositoryImpl.kt rename to data/search/src/main/java/com/terning/data/search/repositoryimpl/SearchRepositoryImpl.kt index 80bbea1c0..15b697c25 100644 --- a/data/src/main/java/com/terning/data/repositoryimpl/SearchRepositoryImpl.kt +++ b/data/search/src/main/java/com/terning/data/search/repositoryimpl/SearchRepositoryImpl.kt @@ -1,12 +1,12 @@ -package com.terning.data.repositoryimpl +package com.terning.data.search.repositoryimpl -import com.terning.data.datasource.SearchDataSource -import com.terning.data.dto.request.SearchRequestDto -import com.terning.data.mapper.search.toSearchPopularAnnouncementList -import com.terning.data.mapper.search.toSearchResultList -import com.terning.domain.entity.search.SearchPopularAnnouncement -import com.terning.domain.entity.search.SearchResult -import com.terning.domain.repository.SearchRepository +import com.terning.data.search.datasource.SearchDataSource +import com.terning.data.search.dto.request.SearchRequestDto +import com.terning.data.search.mapper.toSearchPopularAnnouncementList +import com.terning.data.search.mapper.toSearchResultList +import com.terning.domain.search.entity.SearchPopularAnnouncement +import com.terning.domain.search.entity.SearchResult +import com.terning.domain.search.repository.SearchRepository import javax.inject.Inject class SearchRepositoryImpl @Inject constructor( diff --git a/data/src/main/java/com/terning/data/service/SearchService.kt b/data/search/src/main/java/com/terning/data/search/service/SearchService.kt similarity index 71% rename from data/src/main/java/com/terning/data/service/SearchService.kt rename to data/search/src/main/java/com/terning/data/search/service/SearchService.kt index bd52620cb..1fd70ecbf 100644 --- a/data/src/main/java/com/terning/data/service/SearchService.kt +++ b/data/search/src/main/java/com/terning/data/search/service/SearchService.kt @@ -1,8 +1,8 @@ -package com.terning.data.service +package com.terning.data.search.service -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.response.SearchResultResponseDto -import com.terning.data.dto.response.SearchAnnouncementResponseDto +import com.terning.core.network.BaseResponse +import com.terning.data.search.dto.response.SearchAnnouncementResponseDto +import com.terning.data.search.dto.response.SearchResultResponseDto import retrofit2.http.GET import retrofit2.http.Query diff --git a/data/src/androidTest/java/com/terning/data/ExampleInstrumentedTest.kt b/data/src/androidTest/java/com/terning/data/ExampleInstrumentedTest.kt deleted file mode 100644 index e97b860eb..000000000 --- a/data/src/androidTest/java/com/terning/data/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.terning.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("com.terning.data.test", appContext.packageName) - } -} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/datasource/AuthDataSource.kt b/data/src/main/java/com/terning/data/datasource/AuthDataSource.kt deleted file mode 100644 index 886cd429d..000000000 --- a/data/src/main/java/com/terning/data/datasource/AuthDataSource.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.terning.data.datasource - -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.request.SignInRequestDto -import com.terning.data.dto.request.SignUpRequestDto -import com.terning.data.dto.response.SignInResponseDto -import com.terning.data.dto.response.SignUpResponseDto - -interface AuthDataSource { - - suspend fun postSignIn( - authorization: String, - request: SignInRequestDto - ): BaseResponse - - suspend fun postSignUp( - authId: String, - request: SignUpRequestDto - ): BaseResponse - -} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/datasource/CalendarDataSource.kt b/data/src/main/java/com/terning/data/datasource/CalendarDataSource.kt deleted file mode 100644 index 609019fa8..000000000 --- a/data/src/main/java/com/terning/data/datasource/CalendarDataSource.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.terning.data.datasource - -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.request.CalendarDayListRequestDto -import com.terning.data.dto.request.CalendarMonthListRequestDto -import com.terning.data.dto.request.CalendarMonthRequestDto -import com.terning.data.dto.response.CalendarDayListResponseDto -import com.terning.data.dto.response.CalendarMonthListResponseDto -import com.terning.data.dto.response.CalendarMonthResponseDto - -interface CalendarDataSource { - suspend fun getCalendarMonth(request: CalendarMonthRequestDto): BaseResponse> - suspend fun getCalendarMonthList(request: CalendarMonthListRequestDto): BaseResponse> - suspend fun getCalendarDayList(request: CalendarDayListRequestDto): BaseResponse> -} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/datasource/FilteringDataSource.kt b/data/src/main/java/com/terning/data/datasource/FilteringDataSource.kt deleted file mode 100644 index fa9778fb2..000000000 --- a/data/src/main/java/com/terning/data/datasource/FilteringDataSource.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.terning.data.datasource - -import com.terning.data.dto.NonDataBaseResponse -import com.terning.data.dto.request.FilteringRequestDto - -interface FilteringDataSource { - suspend fun postFiltering(userId: Long, request: FilteringRequestDto): NonDataBaseResponse -} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/datasource/InternDataSource.kt b/data/src/main/java/com/terning/data/datasource/InternDataSource.kt deleted file mode 100644 index 54eafe579..000000000 --- a/data/src/main/java/com/terning/data/datasource/InternDataSource.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.terning.data.datasource - -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.response.InternResponseDto - -interface InternDataSource { - suspend fun getInternInfo(id: Long): BaseResponse -} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/datasource/SearchDataSource.kt b/data/src/main/java/com/terning/data/datasource/SearchDataSource.kt deleted file mode 100644 index 5e00c6955..000000000 --- a/data/src/main/java/com/terning/data/datasource/SearchDataSource.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.terning.data.datasource - -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.request.SearchRequestDto -import com.terning.data.dto.response.SearchResultResponseDto -import com.terning.data.dto.response.SearchAnnouncementResponseDto - -interface SearchDataSource { - suspend fun getSearch(request: SearchRequestDto): BaseResponse - suspend fun getSearchViews(): BaseResponse - suspend fun getSearchScraps(): BaseResponse -} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/mapper/auth/TokenReissueMapper.kt b/data/src/main/java/com/terning/data/mapper/auth/TokenReissueMapper.kt deleted file mode 100644 index 176698aa6..000000000 --- a/data/src/main/java/com/terning/data/mapper/auth/TokenReissueMapper.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.terning.data.mapper.auth - -import com.terning.data.dto.response.TokenReissueResponseDto -import com.terning.domain.entity.auth.TokenReissue - -fun TokenReissueResponseDto.toTokenReissue(): TokenReissue = - TokenReissue(accessToken = accessToken) diff --git a/data/src/main/java/com/terning/data/mapper/onboarding/SignInRequestMapper.kt b/data/src/main/java/com/terning/data/mapper/onboarding/SignInRequestMapper.kt deleted file mode 100644 index 670baae76..000000000 --- a/data/src/main/java/com/terning/data/mapper/onboarding/SignInRequestMapper.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.terning.data.mapper.onboarding - -import com.terning.data.dto.request.SignInRequestDto -import com.terning.domain.entity.onboarding.SignInRequest - -fun SignInRequest.toSignInRequestDto(): SignInRequestDto = - SignInRequestDto(authType = authType) \ No newline at end of file diff --git a/data/src/test/java/com/terning/data/ExampleUnitTest.kt b/data/src/test/java/com/terning/data/ExampleUnitTest.kt deleted file mode 100644 index 12399759e..000000000 --- a/data/src/test/java/com/terning/data/ExampleUnitTest.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.terning.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/data/token/.gitignore b/data/token/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/data/token/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/data/token/build.gradle.kts b/data/token/build.gradle.kts new file mode 100644 index 000000000..ebec17e40 --- /dev/null +++ b/data/token/build.gradle.kts @@ -0,0 +1,17 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.data) +} + +android { + setNamespace("data.token") +} + +dependencies { + // core + implementation(project(":core:local")) + + //domain + implementation(project(":domain:token")) +} \ No newline at end of file diff --git a/data/token/src/main/AndroidManifest.xml b/data/token/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/data/token/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/data/token/src/main/java/com/terning/data/token/di/RepositoryModule.kt b/data/token/src/main/java/com/terning/data/token/di/RepositoryModule.kt new file mode 100644 index 000000000..6a69eda1a --- /dev/null +++ b/data/token/src/main/java/com/terning/data/token/di/RepositoryModule.kt @@ -0,0 +1,17 @@ +package com.terning.data.token.di + +import com.terning.data.token.repositoryimpl.TokenRepositoryImpl +import com.terning.domain.token.repository.TokenRepository +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class RepositoryModule { + @Binds + @Singleton + abstract fun bindTokenRepository(tokenRepositoryImpl: TokenRepositoryImpl): TokenRepository +} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/repositoryimpl/TokenRepositoryImpl.kt b/data/token/src/main/java/com/terning/data/token/repositoryimpl/TokenRepositoryImpl.kt similarity index 82% rename from data/src/main/java/com/terning/data/repositoryimpl/TokenRepositoryImpl.kt rename to data/token/src/main/java/com/terning/data/token/repositoryimpl/TokenRepositoryImpl.kt index e0465112f..eff3dffa6 100644 --- a/data/src/main/java/com/terning/data/repositoryimpl/TokenRepositoryImpl.kt +++ b/data/token/src/main/java/com/terning/data/token/repositoryimpl/TokenRepositoryImpl.kt @@ -1,7 +1,7 @@ -package com.terning.data.repositoryimpl +package com.terning.data.token.repositoryimpl -import com.terning.data.local.TerningDataStore -import com.terning.domain.repository.TokenRepository +import com.terning.core.local.TerningDataStore +import com.terning.domain.token.repository.TokenRepository import javax.inject.Inject class TokenRepositoryImpl @Inject constructor( diff --git a/data/tokenreissue/.gitignore b/data/tokenreissue/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/data/tokenreissue/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/data/tokenreissue/build.gradle.kts b/data/tokenreissue/build.gradle.kts new file mode 100644 index 000000000..38ee15277 --- /dev/null +++ b/data/tokenreissue/build.gradle.kts @@ -0,0 +1,14 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.data) +} + +android { + setNamespace("data.tokenreissue") +} + +dependencies { + //domain + implementation(project(":domain:tokenreissue")) +} \ No newline at end of file diff --git a/data/tokenreissue/src/main/AndroidManifest.xml b/data/tokenreissue/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/data/tokenreissue/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/datasource/TokenReissueDataSource.kt b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/datasource/TokenReissueDataSource.kt similarity index 60% rename from data/src/main/java/com/terning/data/datasource/TokenReissueDataSource.kt rename to data/tokenreissue/src/main/java/com/terning/data/tokenreissue/datasource/TokenReissueDataSource.kt index 76a9aeded..b774f3513 100644 --- a/data/src/main/java/com/terning/data/datasource/TokenReissueDataSource.kt +++ b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/datasource/TokenReissueDataSource.kt @@ -1,7 +1,7 @@ package com.terning.data.datasource -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.response.TokenReissueResponseDto +import com.terning.core.network.BaseResponse +import com.terning.data.tokenreissue.dto.response.TokenReissueResponseDto interface TokenReissueDataSource { suspend fun postReissueToken( diff --git a/data/src/main/java/com/terning/data/datasourceimpl/TokenReissueDataSourceImpl.kt b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/datasourceimpl/TokenReissueDataSourceImpl.kt similarity index 71% rename from data/src/main/java/com/terning/data/datasourceimpl/TokenReissueDataSourceImpl.kt rename to data/tokenreissue/src/main/java/com/terning/data/tokenreissue/datasourceimpl/TokenReissueDataSourceImpl.kt index 3c7bebdfd..681348b0f 100644 --- a/data/src/main/java/com/terning/data/datasourceimpl/TokenReissueDataSourceImpl.kt +++ b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/datasourceimpl/TokenReissueDataSourceImpl.kt @@ -1,9 +1,9 @@ package com.terning.data.datasourceimpl +import com.terning.core.network.BaseResponse import com.terning.data.datasource.TokenReissueDataSource -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.response.TokenReissueResponseDto -import com.terning.data.service.TokenReissueService +import com.terning.data.tokenreissue.dto.response.TokenReissueResponseDto +import com.terning.data.tokenreissue.service.TokenReissueService import javax.inject.Inject class TokenReissueDataSourceImpl @Inject constructor( diff --git a/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/di/DataSourceModule.kt b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/di/DataSourceModule.kt new file mode 100644 index 000000000..31fa7ea2c --- /dev/null +++ b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/di/DataSourceModule.kt @@ -0,0 +1,17 @@ +package com.terning.data.tokenreissue.di + +import com.terning.data.datasource.TokenReissueDataSource +import com.terning.data.datasourceimpl.TokenReissueDataSourceImpl +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class DataSourceModule { + @Binds + @Singleton + abstract fun bindTokenReissueDataSource(tokenReissueDataSourceImpl: TokenReissueDataSourceImpl): TokenReissueDataSource +} \ No newline at end of file diff --git a/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/di/RepositoryModule.kt b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/di/RepositoryModule.kt new file mode 100644 index 000000000..52da95a2e --- /dev/null +++ b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/di/RepositoryModule.kt @@ -0,0 +1,17 @@ +package com.terning.data.tokenreissue.di + +import com.terning.data.tokenreissue.repositoryimpl.TokenReissueRepositoryImpl +import com.terning.domain.tokenreissue.repository.TokenReissueRepository +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class RepositoryModule { + @Binds + @Singleton + abstract fun bindTokenReissueRepository(tokenReissueRepositoryImpl: TokenReissueRepositoryImpl): TokenReissueRepository +} \ No newline at end of file diff --git a/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/di/ServiceModule.kt b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/di/ServiceModule.kt new file mode 100644 index 000000000..92f3a0397 --- /dev/null +++ b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/di/ServiceModule.kt @@ -0,0 +1,19 @@ +package com.terning.data.tokenreissue.di + +import com.terning.core.network.qualifier.REISSUE +import com.terning.data.tokenreissue.service.TokenReissueService +import dagger.Module +import dagger.Provides +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import retrofit2.Retrofit +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +object ServiceModule { + @Provides + @Singleton + fun provideTokenReissueService(@REISSUE retrofit: Retrofit): TokenReissueService = + retrofit.create(TokenReissueService::class.java) +} \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/dto/response/TokenReissueResponseDto.kt b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/dto/response/TokenReissueResponseDto.kt similarity index 79% rename from data/src/main/java/com/terning/data/dto/response/TokenReissueResponseDto.kt rename to data/tokenreissue/src/main/java/com/terning/data/tokenreissue/dto/response/TokenReissueResponseDto.kt index 91cca0810..6b0291c5e 100644 --- a/data/src/main/java/com/terning/data/dto/response/TokenReissueResponseDto.kt +++ b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/dto/response/TokenReissueResponseDto.kt @@ -1,4 +1,4 @@ -package com.terning.data.dto.response +package com.terning.data.tokenreissue.dto.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/mapper/TokenReissueMapper.kt b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/mapper/TokenReissueMapper.kt new file mode 100644 index 000000000..2a19f39d9 --- /dev/null +++ b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/mapper/TokenReissueMapper.kt @@ -0,0 +1,7 @@ +package com.terning.data.tokenreissue.mapper + +import com.terning.data.tokenreissue.dto.response.TokenReissueResponseDto +import com.terning.domain.tokenreissue.entity.TokenReissue + +fun TokenReissueResponseDto.toTokenReissue(): TokenReissue = + TokenReissue(accessToken = accessToken) diff --git a/data/src/main/java/com/terning/data/repositoryimpl/TokenReissueRepositoryImpl.kt b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/repositoryimpl/TokenReissueRepositoryImpl.kt similarity index 67% rename from data/src/main/java/com/terning/data/repositoryimpl/TokenReissueRepositoryImpl.kt rename to data/tokenreissue/src/main/java/com/terning/data/tokenreissue/repositoryimpl/TokenReissueRepositoryImpl.kt index 0a944674a..ada20cc73 100644 --- a/data/src/main/java/com/terning/data/repositoryimpl/TokenReissueRepositoryImpl.kt +++ b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/repositoryimpl/TokenReissueRepositoryImpl.kt @@ -1,9 +1,9 @@ -package com.terning.data.repositoryimpl +package com.terning.data.tokenreissue.repositoryimpl import com.terning.data.datasource.TokenReissueDataSource -import com.terning.data.mapper.auth.toTokenReissue -import com.terning.domain.entity.auth.TokenReissue -import com.terning.domain.repository.TokenReissueRepository +import com.terning.data.tokenreissue.mapper.toTokenReissue +import com.terning.domain.tokenreissue.entity.TokenReissue +import com.terning.domain.tokenreissue.repository.TokenReissueRepository import javax.inject.Inject class TokenReissueRepositoryImpl @Inject constructor( diff --git a/data/src/main/java/com/terning/data/service/TokenReissueService.kt b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/service/TokenReissueService.kt similarity index 61% rename from data/src/main/java/com/terning/data/service/TokenReissueService.kt rename to data/tokenreissue/src/main/java/com/terning/data/tokenreissue/service/TokenReissueService.kt index 10b7eb400..c9b76f5cb 100644 --- a/data/src/main/java/com/terning/data/service/TokenReissueService.kt +++ b/data/tokenreissue/src/main/java/com/terning/data/tokenreissue/service/TokenReissueService.kt @@ -1,7 +1,7 @@ -package com.terning.data.service +package com.terning.data.tokenreissue.service -import com.terning.data.dto.BaseResponse -import com.terning.data.dto.response.TokenReissueResponseDto +import com.terning.core.network.BaseResponse +import com.terning.data.tokenreissue.dto.response.TokenReissueResponseDto import retrofit2.http.Header import retrofit2.http.POST diff --git a/domain/auth/.gitignore b/domain/auth/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/domain/auth/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/domain/auth/build.gradle.kts b/domain/auth/build.gradle.kts new file mode 100644 index 000000000..0fde5b106 --- /dev/null +++ b/domain/auth/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { + alias(libs.plugins.terning.kotlin) +} \ No newline at end of file diff --git a/domain/src/main/java/com/terning/domain/entity/onboarding/SignInRequest.kt b/domain/auth/src/main/java/com/terning/domain/auth/entity/SignInRequest.kt similarity index 54% rename from domain/src/main/java/com/terning/domain/entity/onboarding/SignInRequest.kt rename to domain/auth/src/main/java/com/terning/domain/auth/entity/SignInRequest.kt index 63bd3e13f..798f796ce 100644 --- a/domain/src/main/java/com/terning/domain/entity/onboarding/SignInRequest.kt +++ b/domain/auth/src/main/java/com/terning/domain/auth/entity/SignInRequest.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.onboarding +package com.terning.domain.auth.entity data class SignInRequest( val authType: String diff --git a/domain/src/main/java/com/terning/domain/entity/onboarding/SignInResponse.kt b/domain/auth/src/main/java/com/terning/domain/auth/entity/SignInResponse.kt similarity index 78% rename from domain/src/main/java/com/terning/domain/entity/onboarding/SignInResponse.kt rename to domain/auth/src/main/java/com/terning/domain/auth/entity/SignInResponse.kt index 247bbf3e9..c59a70a59 100644 --- a/domain/src/main/java/com/terning/domain/entity/onboarding/SignInResponse.kt +++ b/domain/auth/src/main/java/com/terning/domain/auth/entity/SignInResponse.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.onboarding +package com.terning.domain.auth.entity data class SignInResponse( val accessToken: String?, diff --git a/domain/src/main/java/com/terning/domain/entity/onboarding/SignUpRequest.kt b/domain/auth/src/main/java/com/terning/domain/auth/entity/SignUpRequest.kt similarity index 70% rename from domain/src/main/java/com/terning/domain/entity/onboarding/SignUpRequest.kt rename to domain/auth/src/main/java/com/terning/domain/auth/entity/SignUpRequest.kt index dc74f8bdb..cde30d14f 100644 --- a/domain/src/main/java/com/terning/domain/entity/onboarding/SignUpRequest.kt +++ b/domain/auth/src/main/java/com/terning/domain/auth/entity/SignUpRequest.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.onboarding +package com.terning.domain.auth.entity data class SignUpRequest ( val name : String, diff --git a/domain/src/main/java/com/terning/domain/entity/onboarding/SignUpResponse.kt b/domain/auth/src/main/java/com/terning/domain/auth/entity/SignUpResponse.kt similarity index 75% rename from domain/src/main/java/com/terning/domain/entity/onboarding/SignUpResponse.kt rename to domain/auth/src/main/java/com/terning/domain/auth/entity/SignUpResponse.kt index d349a00b8..030f08458 100644 --- a/domain/src/main/java/com/terning/domain/entity/onboarding/SignUpResponse.kt +++ b/domain/auth/src/main/java/com/terning/domain/auth/entity/SignUpResponse.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.onboarding +package com.terning.domain.auth.entity data class SignUpResponse( val accessToken: String, diff --git a/domain/auth/src/main/java/com/terning/domain/auth/repository/AuthRepository.kt b/domain/auth/src/main/java/com/terning/domain/auth/repository/AuthRepository.kt new file mode 100644 index 000000000..9ef1b6e6d --- /dev/null +++ b/domain/auth/src/main/java/com/terning/domain/auth/repository/AuthRepository.kt @@ -0,0 +1,20 @@ +package com.terning.domain.auth.repository + +import com.terning.domain.auth.entity.SignInRequest +import com.terning.domain.auth.entity.SignInResponse +import com.terning.domain.auth.entity.SignUpRequest +import com.terning.domain.auth.entity.SignUpResponse + +interface AuthRepository { + + suspend fun postSignIn( + authorization: String, + request: SignInRequest + ): Result + + suspend fun postSignUp( + authId: String, + request: SignUpRequest + ): Result + +} \ No newline at end of file diff --git a/domain/build.gradle.kts b/domain/build.gradle.kts deleted file mode 100644 index 590b5ea33..000000000 --- a/domain/build.gradle.kts +++ /dev/null @@ -1,16 +0,0 @@ -plugins { - id("java-library") - alias(libs.plugins.ksp) - alias(libs.plugins.kotlin.jvm) -} - -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 -} - -dependencies{ - // KotlinDependencies - implementation(libs.kotlin) - implementation(libs.coroutines.android) -} \ No newline at end of file diff --git a/domain/calendar/.gitignore b/domain/calendar/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/domain/calendar/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/domain/calendar/build.gradle.kts b/domain/calendar/build.gradle.kts new file mode 100644 index 000000000..0fde5b106 --- /dev/null +++ b/domain/calendar/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { + alias(libs.plugins.terning.kotlin) +} \ No newline at end of file diff --git a/domain/src/main/java/com/terning/domain/entity/calendar/CalendarScrap.kt b/domain/calendar/src/main/java/com/terning/domain/calendar/entity/CalendarScrap.kt similarity index 77% rename from domain/src/main/java/com/terning/domain/entity/calendar/CalendarScrap.kt rename to domain/calendar/src/main/java/com/terning/domain/calendar/entity/CalendarScrap.kt index da23207aa..12701657b 100644 --- a/domain/src/main/java/com/terning/domain/entity/calendar/CalendarScrap.kt +++ b/domain/calendar/src/main/java/com/terning/domain/calendar/entity/CalendarScrap.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.calendar +package com.terning.domain.calendar.entity data class CalendarScrap( val scrapId: Long, diff --git a/domain/src/main/java/com/terning/domain/entity/calendar/CalendarScrapDetail.kt b/domain/calendar/src/main/java/com/terning/domain/calendar/entity/CalendarScrapDetail.kt similarity index 87% rename from domain/src/main/java/com/terning/domain/entity/calendar/CalendarScrapDetail.kt rename to domain/calendar/src/main/java/com/terning/domain/calendar/entity/CalendarScrapDetail.kt index a4729ffc6..dea551739 100644 --- a/domain/src/main/java/com/terning/domain/entity/calendar/CalendarScrapDetail.kt +++ b/domain/calendar/src/main/java/com/terning/domain/calendar/entity/CalendarScrapDetail.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.calendar +package com.terning.domain.calendar.entity data class CalendarScrapDetail( val internshipAnnouncementId: Long, diff --git a/domain/src/main/java/com/terning/domain/entity/calendar/CalendarScrapRequest.kt b/domain/calendar/src/main/java/com/terning/domain/calendar/entity/CalendarScrapRequest.kt similarity index 66% rename from domain/src/main/java/com/terning/domain/entity/calendar/CalendarScrapRequest.kt rename to domain/calendar/src/main/java/com/terning/domain/calendar/entity/CalendarScrapRequest.kt index 05019d644..b676a40d8 100644 --- a/domain/src/main/java/com/terning/domain/entity/calendar/CalendarScrapRequest.kt +++ b/domain/calendar/src/main/java/com/terning/domain/calendar/entity/CalendarScrapRequest.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.calendar +package com.terning.domain.calendar.entity data class CalendarScrapRequest( val id: Long, diff --git a/domain/src/main/java/com/terning/domain/repository/CalendarRepository.kt b/domain/calendar/src/main/java/com/terning/domain/calendar/repository/CalendarRepository.kt similarity index 67% rename from domain/src/main/java/com/terning/domain/repository/CalendarRepository.kt rename to domain/calendar/src/main/java/com/terning/domain/calendar/repository/CalendarRepository.kt index f9b57a318..6e0625721 100644 --- a/domain/src/main/java/com/terning/domain/repository/CalendarRepository.kt +++ b/domain/calendar/src/main/java/com/terning/domain/calendar/repository/CalendarRepository.kt @@ -1,7 +1,7 @@ -package com.terning.domain.repository +package com.terning.domain.calendar.repository -import com.terning.domain.entity.calendar.CalendarScrapDetail -import com.terning.domain.entity.calendar.CalendarScrap +import com.terning.domain.calendar.entity.CalendarScrap +import com.terning.domain.calendar.entity.CalendarScrapDetail import java.time.LocalDate interface CalendarRepository{ diff --git a/domain/filtering/.gitignore b/domain/filtering/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/domain/filtering/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/domain/filtering/build.gradle.kts b/domain/filtering/build.gradle.kts new file mode 100644 index 000000000..0fde5b106 --- /dev/null +++ b/domain/filtering/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { + alias(libs.plugins.terning.kotlin) +} \ No newline at end of file diff --git a/domain/src/main/java/com/terning/domain/entity/filtering/Filtering.kt b/domain/filtering/src/main/java/com/terning/domain/filtering/entity/Filtering.kt similarity index 74% rename from domain/src/main/java/com/terning/domain/entity/filtering/Filtering.kt rename to domain/filtering/src/main/java/com/terning/domain/filtering/entity/Filtering.kt index 113dd46a3..29f8356e0 100644 --- a/domain/src/main/java/com/terning/domain/entity/filtering/Filtering.kt +++ b/domain/filtering/src/main/java/com/terning/domain/filtering/entity/Filtering.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.filtering +package com.terning.domain.filtering.entity data class Filtering( val grade: String, diff --git a/domain/src/main/java/com/terning/domain/repository/FilteringRepository.kt b/domain/filtering/src/main/java/com/terning/domain/filtering/repository/FilteringRepository.kt similarity index 57% rename from domain/src/main/java/com/terning/domain/repository/FilteringRepository.kt rename to domain/filtering/src/main/java/com/terning/domain/filtering/repository/FilteringRepository.kt index ba2031fab..c912894d7 100644 --- a/domain/src/main/java/com/terning/domain/repository/FilteringRepository.kt +++ b/domain/filtering/src/main/java/com/terning/domain/filtering/repository/FilteringRepository.kt @@ -1,6 +1,6 @@ -package com.terning.domain.repository +package com.terning.domain.filtering.repository -import com.terning.domain.entity.filtering.Filtering +import com.terning.domain.filtering.entity.Filtering interface FilteringRepository { suspend fun postFiltering( diff --git a/domain/home/.gitignore b/domain/home/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/domain/home/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/domain/home/build.gradle.kts b/domain/home/build.gradle.kts new file mode 100644 index 000000000..0fde5b106 --- /dev/null +++ b/domain/home/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { + alias(libs.plugins.terning.kotlin) +} \ No newline at end of file diff --git a/domain/src/main/java/com/terning/domain/entity/request/ChangeFilteringRequestModel.kt b/domain/home/src/main/java/com/terning/domain/home/entity/ChangeFilteringRequestModel.kt similarity index 77% rename from domain/src/main/java/com/terning/domain/entity/request/ChangeFilteringRequestModel.kt rename to domain/home/src/main/java/com/terning/domain/home/entity/ChangeFilteringRequestModel.kt index b908fb3f9..ab7227609 100644 --- a/domain/src/main/java/com/terning/domain/entity/request/ChangeFilteringRequestModel.kt +++ b/domain/home/src/main/java/com/terning/domain/home/entity/ChangeFilteringRequestModel.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.request +package com.terning.domain.home.entity data class ChangeFilteringRequestModel( val grade: String, diff --git a/domain/src/main/java/com/terning/domain/entity/home/HomeFilteringInfo.kt b/domain/home/src/main/java/com/terning/domain/home/entity/HomeFilteringInfo.kt similarity index 78% rename from domain/src/main/java/com/terning/domain/entity/home/HomeFilteringInfo.kt rename to domain/home/src/main/java/com/terning/domain/home/entity/HomeFilteringInfo.kt index 4334dfdb6..9f1176409 100644 --- a/domain/src/main/java/com/terning/domain/entity/home/HomeFilteringInfo.kt +++ b/domain/home/src/main/java/com/terning/domain/home/entity/HomeFilteringInfo.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.home +package com.terning.domain.home.entity data class HomeFilteringInfo( val grade: String?, diff --git a/domain/src/main/java/com/terning/domain/entity/home/HomeRecommendIntern.kt b/domain/home/src/main/java/com/terning/domain/home/entity/HomeRecommendIntern.kt similarity index 92% rename from domain/src/main/java/com/terning/domain/entity/home/HomeRecommendIntern.kt rename to domain/home/src/main/java/com/terning/domain/home/entity/HomeRecommendIntern.kt index 60e4fc2df..7507269cd 100644 --- a/domain/src/main/java/com/terning/domain/entity/home/HomeRecommendIntern.kt +++ b/domain/home/src/main/java/com/terning/domain/home/entity/HomeRecommendIntern.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.home +package com.terning.domain.home.entity data class HomeRecommendIntern( val totalCount: Int, diff --git a/domain/src/main/java/com/terning/domain/entity/home/HomeUpcomingIntern.kt b/domain/home/src/main/java/com/terning/domain/home/entity/HomeUpcomingIntern.kt similarity index 92% rename from domain/src/main/java/com/terning/domain/entity/home/HomeUpcomingIntern.kt rename to domain/home/src/main/java/com/terning/domain/home/entity/HomeUpcomingIntern.kt index 68dcd4711..1cce5a126 100644 --- a/domain/src/main/java/com/terning/domain/entity/home/HomeUpcomingIntern.kt +++ b/domain/home/src/main/java/com/terning/domain/home/entity/HomeUpcomingIntern.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.home +package com.terning.domain.home.entity data class HomeUpcomingIntern( val hasScrapped: Boolean, diff --git a/domain/src/main/java/com/terning/domain/repository/HomeRepository.kt b/domain/home/src/main/java/com/terning/domain/home/repository/HomeRepository.kt similarity index 60% rename from domain/src/main/java/com/terning/domain/repository/HomeRepository.kt rename to domain/home/src/main/java/com/terning/domain/home/repository/HomeRepository.kt index 6d7753435..e7b7f4320 100644 --- a/domain/src/main/java/com/terning/domain/repository/HomeRepository.kt +++ b/domain/home/src/main/java/com/terning/domain/home/repository/HomeRepository.kt @@ -1,9 +1,9 @@ -package com.terning.domain.repository +package com.terning.domain.home.repository -import com.terning.domain.entity.home.HomeFilteringInfo -import com.terning.domain.entity.home.HomeRecommendIntern -import com.terning.domain.entity.home.HomeUpcomingIntern -import com.terning.domain.entity.request.ChangeFilteringRequestModel +import com.terning.domain.home.entity.ChangeFilteringRequestModel +import com.terning.domain.home.entity.HomeFilteringInfo +import com.terning.domain.home.entity.HomeRecommendIntern +import com.terning.domain.home.entity.HomeUpcomingIntern interface HomeRepository { suspend fun getHomeUpcomingInternList(): Result diff --git a/domain/intern/.gitignore b/domain/intern/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/domain/intern/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/domain/intern/build.gradle.kts b/domain/intern/build.gradle.kts new file mode 100644 index 000000000..0fde5b106 --- /dev/null +++ b/domain/intern/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { + alias(libs.plugins.terning.kotlin) +} \ No newline at end of file diff --git a/domain/src/main/java/com/terning/domain/entity/intern/InternInfo.kt b/domain/intern/src/main/java/com/terning/domain/intern/entity/InternInfo.kt similarity index 91% rename from domain/src/main/java/com/terning/domain/entity/intern/InternInfo.kt rename to domain/intern/src/main/java/com/terning/domain/intern/entity/InternInfo.kt index 382db6d52..1e22d52ad 100644 --- a/domain/src/main/java/com/terning/domain/entity/intern/InternInfo.kt +++ b/domain/intern/src/main/java/com/terning/domain/intern/entity/InternInfo.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.intern +package com.terning.domain.intern.entity data class InternInfo( val dDay: String, diff --git a/domain/intern/src/main/java/com/terning/domain/intern/repository/InternRepository.kt b/domain/intern/src/main/java/com/terning/domain/intern/repository/InternRepository.kt new file mode 100644 index 000000000..93bfd767c --- /dev/null +++ b/domain/intern/src/main/java/com/terning/domain/intern/repository/InternRepository.kt @@ -0,0 +1,7 @@ +package com.terning.domain.intern.repository + +import com.terning.domain.intern.entity.InternInfo + +interface InternRepository { + suspend fun getInternInfo(id: Long): Result +} \ No newline at end of file diff --git a/domain/mypage/.gitignore b/domain/mypage/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/domain/mypage/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/domain/mypage/build.gradle.kts b/domain/mypage/build.gradle.kts new file mode 100644 index 000000000..0fde5b106 --- /dev/null +++ b/domain/mypage/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { + alias(libs.plugins.terning.kotlin) +} \ No newline at end of file diff --git a/domain/src/main/java/com/terning/domain/entity/mypage/MyPageProfile.kt b/domain/mypage/src/main/java/com/terning/domain/mypage/entity/MyPageProfile.kt similarity index 71% rename from domain/src/main/java/com/terning/domain/entity/mypage/MyPageProfile.kt rename to domain/mypage/src/main/java/com/terning/domain/mypage/entity/MyPageProfile.kt index 356758d3e..afff9a0fb 100644 --- a/domain/src/main/java/com/terning/domain/entity/mypage/MyPageProfile.kt +++ b/domain/mypage/src/main/java/com/terning/domain/mypage/entity/MyPageProfile.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.mypage +package com.terning.domain.mypage.entity data class MyPageProfile( val name: String, diff --git a/domain/src/main/java/com/terning/domain/entity/mypage/MyPageProfileEdit.kt b/domain/mypage/src/main/java/com/terning/domain/mypage/entity/MyPageProfileEdit.kt similarity index 66% rename from domain/src/main/java/com/terning/domain/entity/mypage/MyPageProfileEdit.kt rename to domain/mypage/src/main/java/com/terning/domain/mypage/entity/MyPageProfileEdit.kt index 398575b04..cdc363f39 100644 --- a/domain/src/main/java/com/terning/domain/entity/mypage/MyPageProfileEdit.kt +++ b/domain/mypage/src/main/java/com/terning/domain/mypage/entity/MyPageProfileEdit.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.mypage +package com.terning.domain.mypage.entity data class MyPageProfileEdit( val name: String, diff --git a/domain/src/main/java/com/terning/domain/repository/MyPageRepository.kt b/domain/mypage/src/main/java/com/terning/domain/mypage/repository/MyPageRepository.kt similarity index 62% rename from domain/src/main/java/com/terning/domain/repository/MyPageRepository.kt rename to domain/mypage/src/main/java/com/terning/domain/mypage/repository/MyPageRepository.kt index 917b82c17..e9478f285 100644 --- a/domain/src/main/java/com/terning/domain/repository/MyPageRepository.kt +++ b/domain/mypage/src/main/java/com/terning/domain/mypage/repository/MyPageRepository.kt @@ -1,7 +1,7 @@ -package com.terning.domain.repository +package com.terning.domain.mypage.repository -import com.terning.domain.entity.mypage.MyPageProfile -import com.terning.domain.entity.mypage.MyPageProfileEdit +import com.terning.domain.mypage.entity.MyPageProfile +import com.terning.domain.mypage.entity.MyPageProfileEdit interface MyPageRepository { suspend fun postLogout(): Result diff --git a/domain/scrap/.gitignore b/domain/scrap/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/domain/scrap/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/domain/scrap/build.gradle.kts b/domain/scrap/build.gradle.kts new file mode 100644 index 000000000..0fde5b106 --- /dev/null +++ b/domain/scrap/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { + alias(libs.plugins.terning.kotlin) +} \ No newline at end of file diff --git a/domain/scrap/src/main/java/com/terning/domain/scrap/entity/CalendarScrapRequest.kt b/domain/scrap/src/main/java/com/terning/domain/scrap/entity/CalendarScrapRequest.kt new file mode 100644 index 000000000..395d76243 --- /dev/null +++ b/domain/scrap/src/main/java/com/terning/domain/scrap/entity/CalendarScrapRequest.kt @@ -0,0 +1,6 @@ +package com.terning.domain.scrap.entity + +data class CalendarScrapRequest( + val id: Long, + val color: String? = "red", +) \ No newline at end of file diff --git a/domain/src/main/java/com/terning/domain/repository/ScrapRepository.kt b/domain/scrap/src/main/java/com/terning/domain/scrap/repository/ScrapRepository.kt similarity index 73% rename from domain/src/main/java/com/terning/domain/repository/ScrapRepository.kt rename to domain/scrap/src/main/java/com/terning/domain/scrap/repository/ScrapRepository.kt index 99631d73a..87a6a7db7 100644 --- a/domain/src/main/java/com/terning/domain/repository/ScrapRepository.kt +++ b/domain/scrap/src/main/java/com/terning/domain/scrap/repository/ScrapRepository.kt @@ -1,6 +1,6 @@ -package com.terning.domain.repository +package com.terning.domain.scrap.repository -import com.terning.domain.entity.calendar.CalendarScrapRequest +import com.terning.domain.scrap.entity.CalendarScrapRequest interface ScrapRepository { suspend fun postScrap(calendarScrapRequest: CalendarScrapRequest): Result diff --git a/domain/search/.gitignore b/domain/search/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/domain/search/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/domain/search/build.gradle.kts b/domain/search/build.gradle.kts new file mode 100644 index 000000000..0fde5b106 --- /dev/null +++ b/domain/search/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { + alias(libs.plugins.terning.kotlin) +} \ No newline at end of file diff --git a/domain/src/main/java/com/terning/domain/entity/search/SearchBanner.kt b/domain/search/src/main/java/com/terning/domain/search/entity/SearchBanner.kt similarity index 63% rename from domain/src/main/java/com/terning/domain/entity/search/SearchBanner.kt rename to domain/search/src/main/java/com/terning/domain/search/entity/SearchBanner.kt index 23ab08701..fcc52d65a 100644 --- a/domain/src/main/java/com/terning/domain/entity/search/SearchBanner.kt +++ b/domain/search/src/main/java/com/terning/domain/search/entity/SearchBanner.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.search +package com.terning.domain.search.entity data class SearchBanner( val imageRes: Int, diff --git a/domain/src/main/java/com/terning/domain/entity/search/SearchPopularAnnouncement.kt b/domain/search/src/main/java/com/terning/domain/search/entity/SearchPopularAnnouncement.kt similarity index 75% rename from domain/src/main/java/com/terning/domain/entity/search/SearchPopularAnnouncement.kt rename to domain/search/src/main/java/com/terning/domain/search/entity/SearchPopularAnnouncement.kt index 4866d3179..80cb3883a 100644 --- a/domain/src/main/java/com/terning/domain/entity/search/SearchPopularAnnouncement.kt +++ b/domain/search/src/main/java/com/terning/domain/search/entity/SearchPopularAnnouncement.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.search +package com.terning.domain.search.entity data class SearchPopularAnnouncement( val title: String, diff --git a/domain/src/main/java/com/terning/domain/entity/search/SearchResult.kt b/domain/search/src/main/java/com/terning/domain/search/entity/SearchResult.kt similarity index 87% rename from domain/src/main/java/com/terning/domain/entity/search/SearchResult.kt rename to domain/search/src/main/java/com/terning/domain/search/entity/SearchResult.kt index 3d0225003..5c66f40f0 100644 --- a/domain/src/main/java/com/terning/domain/entity/search/SearchResult.kt +++ b/domain/search/src/main/java/com/terning/domain/search/entity/SearchResult.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.search +package com.terning.domain.search.entity data class SearchResult( val internshipAnnouncementId: Long, diff --git a/domain/src/main/java/com/terning/domain/repository/SearchRepository.kt b/domain/search/src/main/java/com/terning/domain/search/repository/SearchRepository.kt similarity index 67% rename from domain/src/main/java/com/terning/domain/repository/SearchRepository.kt rename to domain/search/src/main/java/com/terning/domain/search/repository/SearchRepository.kt index f4f94ab53..52b38dd0c 100644 --- a/domain/src/main/java/com/terning/domain/repository/SearchRepository.kt +++ b/domain/search/src/main/java/com/terning/domain/search/repository/SearchRepository.kt @@ -1,7 +1,7 @@ -package com.terning.domain.repository +package com.terning.domain.search.repository -import com.terning.domain.entity.search.SearchResult -import com.terning.domain.entity.search.SearchPopularAnnouncement +import com.terning.domain.search.entity.SearchPopularAnnouncement +import com.terning.domain.search.entity.SearchResult interface SearchRepository { suspend fun getSearchList( diff --git a/domain/src/main/java/com/terning/domain/repository/AuthRepository.kt b/domain/src/main/java/com/terning/domain/repository/AuthRepository.kt deleted file mode 100644 index 0193f7698..000000000 --- a/domain/src/main/java/com/terning/domain/repository/AuthRepository.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.terning.domain.repository - -import com.terning.domain.entity.onboarding.SignInRequest -import com.terning.domain.entity.onboarding.SignUpRequest -import com.terning.domain.entity.onboarding.SignInResponse -import com.terning.domain.entity.onboarding.SignUpResponse - -interface AuthRepository { - - suspend fun postSignIn( - authorization: String, - request: SignInRequest - ): Result - - suspend fun postSignUp( - authId: String, - request: SignUpRequest - ): Result - -} \ No newline at end of file diff --git a/domain/src/main/java/com/terning/domain/repository/InternRepository.kt b/domain/src/main/java/com/terning/domain/repository/InternRepository.kt deleted file mode 100644 index 3bdd6d60a..000000000 --- a/domain/src/main/java/com/terning/domain/repository/InternRepository.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.terning.domain.repository - -import com.terning.domain.entity.intern.InternInfo - -interface InternRepository { - suspend fun getInternInfo(id: Long): Result -} \ No newline at end of file diff --git a/domain/token/.gitignore b/domain/token/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/domain/token/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/domain/token/build.gradle.kts b/domain/token/build.gradle.kts new file mode 100644 index 000000000..0fde5b106 --- /dev/null +++ b/domain/token/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { + alias(libs.plugins.terning.kotlin) +} \ No newline at end of file diff --git a/domain/src/main/java/com/terning/domain/repository/TokenRepository.kt b/domain/token/src/main/java/com/terning/domain/token/repository/TokenRepository.kt similarity index 84% rename from domain/src/main/java/com/terning/domain/repository/TokenRepository.kt rename to domain/token/src/main/java/com/terning/domain/token/repository/TokenRepository.kt index f9aad28a3..19ec27a33 100644 --- a/domain/src/main/java/com/terning/domain/repository/TokenRepository.kt +++ b/domain/token/src/main/java/com/terning/domain/token/repository/TokenRepository.kt @@ -1,4 +1,4 @@ -package com.terning.domain.repository +package com.terning.domain.token.repository interface TokenRepository { fun getAccessToken(): String diff --git a/domain/tokenreissue/.gitignore b/domain/tokenreissue/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/domain/tokenreissue/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/domain/tokenreissue/build.gradle.kts b/domain/tokenreissue/build.gradle.kts new file mode 100644 index 000000000..0fde5b106 --- /dev/null +++ b/domain/tokenreissue/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { + alias(libs.plugins.terning.kotlin) +} \ No newline at end of file diff --git a/domain/src/main/java/com/terning/domain/entity/auth/TokenReissue.kt b/domain/tokenreissue/src/main/java/com/terning/domain/tokenreissue/entity/TokenReissue.kt similarity index 54% rename from domain/src/main/java/com/terning/domain/entity/auth/TokenReissue.kt rename to domain/tokenreissue/src/main/java/com/terning/domain/tokenreissue/entity/TokenReissue.kt index 933015dfc..0dcf8d056 100644 --- a/domain/src/main/java/com/terning/domain/entity/auth/TokenReissue.kt +++ b/domain/tokenreissue/src/main/java/com/terning/domain/tokenreissue/entity/TokenReissue.kt @@ -1,4 +1,4 @@ -package com.terning.domain.entity.auth +package com.terning.domain.tokenreissue.entity data class TokenReissue ( val accessToken : String diff --git a/domain/src/main/java/com/terning/domain/repository/TokenReissueRepository.kt b/domain/tokenreissue/src/main/java/com/terning/domain/tokenreissue/repository/TokenReissueRepository.kt similarity index 54% rename from domain/src/main/java/com/terning/domain/repository/TokenReissueRepository.kt rename to domain/tokenreissue/src/main/java/com/terning/domain/tokenreissue/repository/TokenReissueRepository.kt index 0bc98010c..6cd3e4198 100644 --- a/domain/src/main/java/com/terning/domain/repository/TokenReissueRepository.kt +++ b/domain/tokenreissue/src/main/java/com/terning/domain/tokenreissue/repository/TokenReissueRepository.kt @@ -1,6 +1,6 @@ -package com.terning.domain.repository +package com.terning.domain.tokenreissue.repository -import com.terning.domain.entity.auth.TokenReissue +import com.terning.domain.tokenreissue.entity.TokenReissue interface TokenReissueRepository { suspend fun postReissueToken( diff --git a/feature/build.gradle.kts b/feature/build.gradle.kts deleted file mode 100644 index 1dcf9fcba..000000000 --- a/feature/build.gradle.kts +++ /dev/null @@ -1,106 +0,0 @@ -plugins { - alias(libs.plugins.android.library) - alias(libs.plugins.kotlin.android) - alias(libs.plugins.hilt) - alias(libs.plugins.ksp) - alias(libs.plugins.kotlin.parcelize) - alias(libs.plugins.kotlin.serialization) -} - -android { - namespace = "com.terning.feature" - compileSdk = libs.versions.compileSdk.get().toInt() - - defaultConfig { - minSdk = libs.versions.minSdk.get().toInt() - - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles("consumer-rules.pro") - - buildConfigField("String", "VERSION_NAME", "\"${libs.versions.versionName.get()}\"") - } - - 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 = libs.versions.jvmTarget.get() - } - buildFeatures { - compose = true - buildConfig = true - } - composeOptions { - kotlinCompilerExtensionVersion = libs.versions.kotlinCompilerExtensionVersion.get() - } - packaging { - resources { - excludes += "/META-INF/{AL2.0,LGPL2.1}" - excludes += "/META-INF/gradle/incremental.annotation.processors" - } - } -} - -dependencies { - implementation(project(":core")) - implementation(project(":domain")) - - // KotlinDependencies - implementation(libs.kotlin) - implementation(libs.coroutines.android) - implementation(libs.kotlinx.serialization.json) - - // AndroidXDependencies - implementation(libs.androidx.core.ktx) - implementation(libs.androidx.appcompat) - implementation(libs.hilt.android) - implementation(libs.hilt.navigation.compose) - implementation(libs.androidx.navigation.compose) - implementation(libs.androidx.lifecycle.runtime.ktx) - implementation(libs.androidx.lifecycle.viewModelCompose) - implementation(libs.androidx.workManager) - implementation(libs.hilt.compiler) - implementation(libs.androidx.lifecycle.runtime.compose.android) - implementation(libs.androidx.compose.saveable) - - // KspDependencies - ksp(libs.hilt.android.compiler) - ksp(libs.hilt.manager) - - // Material Design - implementation(libs.material) - implementation(libs.androidx.material3.android) - implementation(libs.androidx.ui.graphics) - - // TestDependencies - testImplementation(libs.junit) - androidTestImplementation(libs.androidx.junit) - androidTestImplementation(libs.androidx.espresso.core) - - // ThirdPartyDependencies - implementation(libs.coil.compose) - implementation(libs.coil.network.okhttp) - implementation(libs.timber) - implementation(libs.ossLicense) - implementation(libs.lottie) - implementation(libs.process.phoenix) - implementation(libs.accompanist.systemuicontroller) - implementation(libs.androidx.core.splashscreen) - implementation(libs.androidx.browser) - - // Compose Preview - implementation(libs.compose.ui.tooling) - - // KakaoDependencies - implementation(libs.kakao.user) -} \ No newline at end of file diff --git a/feature/calendar/.gitignore b/feature/calendar/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/feature/calendar/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/feature/calendar/build.gradle.kts b/feature/calendar/build.gradle.kts new file mode 100644 index 000000000..cc1278c23 --- /dev/null +++ b/feature/calendar/build.gradle.kts @@ -0,0 +1,17 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.feature) +} + +android { + setNamespace("feature.calendar") +} + +dependencies { + //domain + implementation(project(":domain:calendar")) + + // feature + implementation(project(":feature:dialog")) +} \ No newline at end of file diff --git a/feature/calendar/src/main/AndroidManifest.xml b/feature/calendar/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/feature/calendar/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/calendar/calendar/CalendarRoute.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/calendar/CalendarRoute.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/calendar/calendar/CalendarRoute.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/calendar/CalendarRoute.kt diff --git a/feature/src/main/java/com/terning/feature/calendar/calendar/CalendarViewModel.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/calendar/CalendarViewModel.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/calendar/calendar/CalendarViewModel.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/calendar/CalendarViewModel.kt diff --git a/feature/src/main/java/com/terning/feature/calendar/calendar/component/CalendarDay.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/calendar/component/CalendarDay.kt similarity index 97% rename from feature/src/main/java/com/terning/feature/calendar/calendar/component/CalendarDay.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/calendar/component/CalendarDay.kt index 297e42fa8..738133119 100644 --- a/feature/src/main/java/com/terning/feature/calendar/calendar/component/CalendarDay.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/calendar/component/CalendarDay.kt @@ -12,6 +12,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.Black import com.terning.core.designsystem.theme.Grey150 import com.terning.core.designsystem.theme.Grey200 @@ -19,7 +20,6 @@ import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.extension.noRippleClickable import com.terning.feature.calendar.month.model.DayModel import java.time.LocalDate diff --git a/feature/src/main/java/com/terning/feature/calendar/calendar/component/ScreenTransition.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/calendar/component/ScreenTransition.kt similarity index 96% rename from feature/src/main/java/com/terning/feature/calendar/calendar/component/ScreenTransition.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/calendar/component/ScreenTransition.kt index 52339d6af..21d8acdd7 100644 --- a/feature/src/main/java/com/terning/feature/calendar/calendar/component/ScreenTransition.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/calendar/component/ScreenTransition.kt @@ -5,7 +5,7 @@ import androidx.compose.animation.ContentTransform import androidx.compose.animation.SizeTransform import androidx.compose.runtime.Composable import androidx.compose.ui.res.stringResource -import com.terning.feature.R +import com.terning.feature.calendar.R @Composable fun ScreenTransition( diff --git a/feature/src/main/java/com/terning/feature/calendar/calendar/component/WeekDaysHeader.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/calendar/component/WeekDaysHeader.kt similarity index 98% rename from feature/src/main/java/com/terning/feature/calendar/calendar/component/WeekDaysHeader.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/calendar/component/WeekDaysHeader.kt index 554a3cd1d..be398b0c4 100644 --- a/feature/src/main/java/com/terning/feature/calendar/calendar/component/WeekDaysHeader.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/calendar/component/WeekDaysHeader.kt @@ -16,7 +16,7 @@ import com.terning.core.designsystem.theme.Black import com.terning.core.designsystem.theme.SundayRed import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme -import com.terning.feature.R +import com.terning.feature.calendar.R @Composable fun WeekDaysHeader( diff --git a/feature/src/main/java/com/terning/feature/calendar/calendar/model/CalendarModel.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/calendar/model/CalendarModel.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/calendar/calendar/model/CalendarModel.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/calendar/model/CalendarModel.kt diff --git a/feature/src/main/java/com/terning/feature/calendar/calendar/model/CalendarUiState.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/calendar/model/CalendarUiState.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/calendar/calendar/model/CalendarUiState.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/calendar/model/CalendarUiState.kt diff --git a/feature/src/main/java/com/terning/feature/calendar/calendar/navigation/CalendarNavigation.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/calendar/navigation/CalendarNavigation.kt similarity index 84% rename from feature/src/main/java/com/terning/feature/calendar/calendar/navigation/CalendarNavigation.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/calendar/navigation/CalendarNavigation.kt index 61c158402..2590ac671 100644 --- a/feature/src/main/java/com/terning/feature/calendar/calendar/navigation/CalendarNavigation.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/calendar/navigation/CalendarNavigation.kt @@ -9,7 +9,6 @@ import androidx.navigation.NavOptions import androidx.navigation.compose.composable import com.terning.core.navigation.MainTabRoute import com.terning.feature.calendar.calendar.CalendarRoute -import com.terning.feature.intern.navigation.navigateIntern import kotlinx.serialization.Serializable @@ -21,13 +20,13 @@ fun NavController.navigateCalendar(navOptions: NavOptions? = null) { } fun NavGraphBuilder.calendarNavGraph( - navHostController: NavController, + navigateIntern: (Long) -> Unit, paddingValues: PaddingValues ) { composable { CalendarRoute( modifier = Modifier.padding(paddingValues), - navigateToAnnouncement = navHostController::navigateIntern + navigateToAnnouncement = navigateIntern ) } } diff --git a/feature/src/main/java/com/terning/feature/calendar/list/CalendarListScreen.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/list/CalendarListScreen.kt similarity index 96% rename from feature/src/main/java/com/terning/feature/calendar/list/CalendarListScreen.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/list/CalendarListScreen.kt index 36df6fd96..8178199ef 100644 --- a/feature/src/main/java/com/terning/feature/calendar/list/CalendarListScreen.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/list/CalendarListScreen.kt @@ -28,16 +28,16 @@ import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.LocalLifecycleOwner import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.flowWithLifecycle +import com.terning.core.designsystem.state.UiState +import com.terning.core.designsystem.extension.getFullDateStringInKorean +import com.terning.core.designsystem.extension.isListNotEmpty +import com.terning.core.designsystem.extension.toast import com.terning.core.designsystem.theme.Back import com.terning.core.designsystem.theme.Black import com.terning.core.designsystem.theme.Grey400 import com.terning.core.designsystem.theme.TerningTheme -import com.terning.core.extension.getFullDateStringInKorean -import com.terning.core.extension.isListNotEmpty -import com.terning.core.extension.toast -import com.terning.core.state.UiState -import com.terning.domain.entity.calendar.CalendarScrapDetail -import com.terning.feature.R +import com.terning.domain.calendar.entity.CalendarScrapDetail +import com.terning.feature.calendar.R import com.terning.feature.calendar.calendar.model.CalendarModel.Companion.getLocalDateByPage import com.terning.feature.calendar.calendar.model.LocalPagerState import com.terning.feature.calendar.list.component.CalendarScrapList diff --git a/feature/src/main/java/com/terning/feature/calendar/list/CalendarListSideEffect.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/list/CalendarListSideEffect.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/calendar/list/CalendarListSideEffect.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/list/CalendarListSideEffect.kt diff --git a/feature/src/main/java/com/terning/feature/calendar/list/CalendarListViewModel.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/list/CalendarListViewModel.kt similarity index 93% rename from feature/src/main/java/com/terning/feature/calendar/list/CalendarListViewModel.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/list/CalendarListViewModel.kt index ffd9f161b..395c00418 100644 --- a/feature/src/main/java/com/terning/feature/calendar/list/CalendarListViewModel.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/list/CalendarListViewModel.kt @@ -2,10 +2,10 @@ package com.terning.feature.calendar.list import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.terning.core.state.UiState -import com.terning.domain.entity.calendar.CalendarScrapDetail -import com.terning.domain.repository.CalendarRepository -import com.terning.feature.R +import com.terning.core.designsystem.state.UiState +import com.terning.domain.calendar.entity.CalendarScrapDetail +import com.terning.domain.calendar.repository.CalendarRepository +import com.terning.feature.calendar.R import com.terning.feature.calendar.list.model.CalendarListUiState import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.Dispatchers diff --git a/feature/src/main/java/com/terning/feature/calendar/list/component/CalendarScrap.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/list/component/CalendarScrap.kt similarity index 87% rename from feature/src/main/java/com/terning/feature/calendar/list/component/CalendarScrap.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/list/component/CalendarScrap.kt index 4b05329b3..9c2c042ed 100644 --- a/feature/src/main/java/com/terning/feature/calendar/list/component/CalendarScrap.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/list/component/CalendarScrap.kt @@ -6,10 +6,10 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp import com.terning.core.designsystem.component.item.InternItem import com.terning.core.designsystem.component.item.ScrapBox +import com.terning.core.designsystem.extension.customShadow +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.Grey200 -import com.terning.core.extension.customShadow -import com.terning.core.extension.noRippleClickable -import com.terning.domain.entity.calendar.CalendarScrapDetail +import com.terning.domain.calendar.entity.CalendarScrapDetail @Composable fun CalendarScrap( diff --git a/feature/src/main/java/com/terning/feature/calendar/list/component/CalendarScrapList.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/list/component/CalendarScrapList.kt similarity index 95% rename from feature/src/main/java/com/terning/feature/calendar/list/component/CalendarScrapList.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/list/component/CalendarScrapList.kt index 8ca28306a..bb59e2658 100644 --- a/feature/src/main/java/com/terning/feature/calendar/list/component/CalendarScrapList.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/list/component/CalendarScrapList.kt @@ -9,7 +9,7 @@ import androidx.compose.foundation.verticalScroll import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import com.terning.domain.entity.calendar.CalendarScrapDetail +import com.terning.domain.calendar.entity.CalendarScrapDetail @Composable internal fun CalendarScrapList( diff --git a/feature/src/main/java/com/terning/feature/calendar/list/model/CalendarListUiState.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/list/model/CalendarListUiState.kt similarity index 80% rename from feature/src/main/java/com/terning/feature/calendar/list/model/CalendarListUiState.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/list/model/CalendarListUiState.kt index ca214a28f..4be1e18e8 100644 --- a/feature/src/main/java/com/terning/feature/calendar/list/model/CalendarListUiState.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/list/model/CalendarListUiState.kt @@ -1,7 +1,7 @@ package com.terning.feature.calendar.list.model -import com.terning.core.state.UiState -import com.terning.domain.entity.calendar.CalendarScrapDetail +import com.terning.core.designsystem.state.UiState +import com.terning.domain.calendar.entity.CalendarScrapDetail import java.time.LocalDate data class CalendarListUiState( diff --git a/feature/src/main/java/com/terning/feature/calendar/month/CalendarMonthScreen.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/month/CalendarMonthScreen.kt similarity index 96% rename from feature/src/main/java/com/terning/feature/calendar/month/CalendarMonthScreen.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/month/CalendarMonthScreen.kt index b0bade11e..23a57c2b5 100644 --- a/feature/src/main/java/com/terning/feature/calendar/month/CalendarMonthScreen.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/month/CalendarMonthScreen.kt @@ -13,8 +13,8 @@ import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.LocalLifecycleOwner import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.flowWithLifecycle -import com.terning.core.extension.toast -import com.terning.core.state.UiState +import com.terning.core.designsystem.state.UiState +import com.terning.core.designsystem.extension.toast import com.terning.feature.calendar.calendar.model.CalendarModel.Companion.getLocalDateByPage import com.terning.feature.calendar.calendar.model.LocalPagerState import com.terning.feature.calendar.month.component.CalendarMonth diff --git a/feature/src/main/java/com/terning/feature/calendar/month/CalendarMonthSideEffect.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/month/CalendarMonthSideEffect.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/calendar/month/CalendarMonthSideEffect.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/month/CalendarMonthSideEffect.kt diff --git a/feature/src/main/java/com/terning/feature/calendar/month/CalendarMonthViewModel.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/month/CalendarMonthViewModel.kt similarity index 91% rename from feature/src/main/java/com/terning/feature/calendar/month/CalendarMonthViewModel.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/month/CalendarMonthViewModel.kt index c3307f779..0fd23b2ea 100644 --- a/feature/src/main/java/com/terning/feature/calendar/month/CalendarMonthViewModel.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/month/CalendarMonthViewModel.kt @@ -2,9 +2,9 @@ package com.terning.feature.calendar.month import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.terning.core.state.UiState -import com.terning.domain.repository.CalendarRepository -import com.terning.feature.R +import com.terning.core.designsystem.state.UiState +import com.terning.domain.calendar.repository.CalendarRepository +import com.terning.feature.calendar.R import com.terning.feature.calendar.calendar.model.CalendarModel.Companion.getLocalDateByPage import com.terning.feature.calendar.month.model.CalendarMonthUiState import dagger.hilt.android.lifecycle.HiltViewModel diff --git a/feature/src/main/java/com/terning/feature/calendar/month/component/CalendarMonth.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/month/component/CalendarMonth.kt similarity index 93% rename from feature/src/main/java/com/terning/feature/calendar/month/component/CalendarMonth.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/month/component/CalendarMonth.kt index 7a6ee8ef6..d69eb981a 100644 --- a/feature/src/main/java/com/terning/feature/calendar/month/component/CalendarMonth.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/month/component/CalendarMonth.kt @@ -11,12 +11,12 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.terning.core.designsystem.extension.getDateAsMapString +import com.terning.core.designsystem.extension.isToday +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.Grey150 import com.terning.core.designsystem.theme.TerningPointTheme -import com.terning.core.extension.getDateAsMapString -import com.terning.core.extension.isToday -import com.terning.core.extension.noRippleClickable -import com.terning.domain.entity.calendar.CalendarScrap +import com.terning.domain.calendar.entity.CalendarScrap import com.terning.feature.calendar.calendar.component.CalendarDay import com.terning.feature.calendar.month.model.MonthModel import java.time.LocalDate diff --git a/feature/src/main/java/com/terning/feature/calendar/month/component/CalendarMonthScrap.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/month/component/CalendarMonthScrap.kt similarity index 96% rename from feature/src/main/java/com/terning/feature/calendar/month/component/CalendarMonthScrap.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/month/component/CalendarMonthScrap.kt index f20ca1b91..c8771a876 100644 --- a/feature/src/main/java/com/terning/feature/calendar/month/component/CalendarMonthScrap.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/month/component/CalendarMonthScrap.kt @@ -16,8 +16,8 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.domain.entity.calendar.CalendarScrap -import com.terning.feature.R +import com.terning.domain.calendar.entity.CalendarScrap +import com.terning.feature.calendar.R private const val SCRAP_COUNT_WEEK_SIX = 3 private const val SCRAP_COUNT_WEEK_FIVE = 4 diff --git a/feature/src/main/java/com/terning/feature/calendar/month/model/CalendarMonthUiState.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/month/model/CalendarMonthUiState.kt similarity index 60% rename from feature/src/main/java/com/terning/feature/calendar/month/model/CalendarMonthUiState.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/month/model/CalendarMonthUiState.kt index 89e0f0f45..4fb463868 100644 --- a/feature/src/main/java/com/terning/feature/calendar/month/model/CalendarMonthUiState.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/month/model/CalendarMonthUiState.kt @@ -1,7 +1,7 @@ package com.terning.feature.calendar.month.model -import com.terning.core.state.UiState -import com.terning.domain.entity.calendar.CalendarScrap +import com.terning.core.designsystem.state.UiState +import com.terning.domain.calendar.entity.CalendarScrap data class CalendarMonthUiState( val loadState: UiState>> = UiState.Loading diff --git a/feature/src/main/java/com/terning/feature/calendar/month/model/DayModel.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/month/model/DayModel.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/calendar/month/model/DayModel.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/month/model/DayModel.kt diff --git a/feature/src/main/java/com/terning/feature/calendar/month/model/MonthModel.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/month/model/MonthModel.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/calendar/month/model/MonthModel.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/month/model/MonthModel.kt diff --git a/feature/src/main/java/com/terning/feature/calendar/week/CalendarWeekScreen.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/week/CalendarWeekScreen.kt similarity index 96% rename from feature/src/main/java/com/terning/feature/calendar/week/CalendarWeekScreen.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/week/CalendarWeekScreen.kt index 0186f8db4..cb7141efa 100644 --- a/feature/src/main/java/com/terning/feature/calendar/week/CalendarWeekScreen.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/week/CalendarWeekScreen.kt @@ -31,18 +31,18 @@ import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.LocalLifecycleOwner import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.flowWithLifecycle +import com.terning.core.designsystem.state.UiState +import com.terning.core.designsystem.extension.getDateStringInKorean +import com.terning.core.designsystem.extension.getFullDateStringInKorean +import com.terning.core.designsystem.extension.swipableVertically +import com.terning.core.designsystem.extension.toast import com.terning.core.designsystem.theme.Back import com.terning.core.designsystem.theme.Black import com.terning.core.designsystem.theme.Grey400 import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.extension.getDateStringInKorean -import com.terning.core.extension.getFullDateStringInKorean -import com.terning.core.extension.swipableVertically -import com.terning.core.extension.toast -import com.terning.core.state.UiState -import com.terning.domain.entity.calendar.CalendarScrapDetail -import com.terning.feature.R +import com.terning.domain.calendar.entity.CalendarScrapDetail +import com.terning.feature.calendar.R import com.terning.feature.calendar.calendar.model.CalendarUiState import com.terning.feature.calendar.calendar.model.LocalPagerState import com.terning.feature.calendar.list.component.CalendarScrapList diff --git a/feature/src/main/java/com/terning/feature/calendar/week/CalendarWeekSideEffect.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/week/CalendarWeekSideEffect.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/calendar/week/CalendarWeekSideEffect.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/week/CalendarWeekSideEffect.kt diff --git a/feature/src/main/java/com/terning/feature/calendar/week/CalendarWeekViewModel.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/week/CalendarWeekViewModel.kt similarity index 93% rename from feature/src/main/java/com/terning/feature/calendar/week/CalendarWeekViewModel.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/week/CalendarWeekViewModel.kt index 1e4c17d4e..77e8ffce7 100644 --- a/feature/src/main/java/com/terning/feature/calendar/week/CalendarWeekViewModel.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/week/CalendarWeekViewModel.kt @@ -2,10 +2,10 @@ package com.terning.feature.calendar.week import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.terning.core.state.UiState -import com.terning.domain.entity.calendar.CalendarScrapDetail -import com.terning.domain.repository.CalendarRepository -import com.terning.feature.R +import com.terning.core.designsystem.state.UiState +import com.terning.domain.calendar.entity.CalendarScrapDetail +import com.terning.domain.calendar.repository.CalendarRepository +import com.terning.feature.calendar.R import com.terning.feature.calendar.week.model.CalendarWeekUiState import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.Dispatchers diff --git a/feature/src/main/java/com/terning/feature/calendar/week/component/HorizontalCalendarWeek.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/week/component/HorizontalCalendarWeek.kt similarity index 93% rename from feature/src/main/java/com/terning/feature/calendar/week/component/HorizontalCalendarWeek.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/week/component/HorizontalCalendarWeek.kt index e179cc7cc..bc9b6bf64 100644 --- a/feature/src/main/java/com/terning/feature/calendar/week/component/HorizontalCalendarWeek.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/week/component/HorizontalCalendarWeek.kt @@ -11,8 +11,8 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import com.terning.core.extension.getWeekIndexContainingSelectedDate -import com.terning.core.extension.isToday +import com.terning.core.designsystem.extension.getWeekIndexContainingSelectedDate +import com.terning.core.designsystem.extension.isToday import com.terning.feature.calendar.calendar.component.CalendarDay import com.terning.feature.calendar.month.model.MonthModel import java.time.LocalDate diff --git a/feature/src/main/java/com/terning/feature/calendar/week/model/CalendarWeekUiState.kt b/feature/calendar/src/main/java/com/terning/feature/calendar/week/model/CalendarWeekUiState.kt similarity index 76% rename from feature/src/main/java/com/terning/feature/calendar/week/model/CalendarWeekUiState.kt rename to feature/calendar/src/main/java/com/terning/feature/calendar/week/model/CalendarWeekUiState.kt index e0326f7e8..dbee4de44 100644 --- a/feature/src/main/java/com/terning/feature/calendar/week/model/CalendarWeekUiState.kt +++ b/feature/calendar/src/main/java/com/terning/feature/calendar/week/model/CalendarWeekUiState.kt @@ -1,7 +1,7 @@ package com.terning.feature.calendar.week.model -import com.terning.core.state.UiState -import com.terning.domain.entity.calendar.CalendarScrapDetail +import com.terning.core.designsystem.state.UiState +import com.terning.domain.calendar.entity.CalendarScrapDetail data class CalendarWeekUiState( val loadState: UiState> = UiState.Loading, diff --git a/feature/calendar/src/main/res/drawable/ic_terning_calendar_empty.xml b/feature/calendar/src/main/res/drawable/ic_terning_calendar_empty.xml new file mode 100644 index 000000000..9f1e706fa --- /dev/null +++ b/feature/calendar/src/main/res/drawable/ic_terning_calendar_empty.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/feature/calendar/src/main/res/drawable/ic_terning_launcher_background.xml b/feature/calendar/src/main/res/drawable/ic_terning_launcher_background.xml new file mode 100644 index 000000000..ca3826a46 --- /dev/null +++ b/feature/calendar/src/main/res/drawable/ic_terning_launcher_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/feature/calendar/src/main/res/values/strings.xml b/feature/calendar/src/main/res/values/strings.xml new file mode 100644 index 000000000..d713b85bb --- /dev/null +++ b/feature/calendar/src/main/res/values/strings.xml @@ -0,0 +1,21 @@ + + + 서버통신에 성공했어요 + 서버통신에 실패했어요 + + + + + + + + + + previous + next + list + Calendar Transition + 선택하신 날짜에 지원 마감인 스크랩 공고가 없어요 + +%s + + diff --git a/feature/calendar/src/main/res/values/themes.xml b/feature/calendar/src/main/res/values/themes.xml new file mode 100644 index 000000000..9e25abbdf --- /dev/null +++ b/feature/calendar/src/main/res/values/themes.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/feature/consumer-rules.pro b/feature/consumer-rules.pro deleted file mode 100644 index e69de29bb..000000000 diff --git a/feature/dialog/.gitignore b/feature/dialog/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/feature/dialog/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/feature/dialog/build.gradle.kts b/feature/dialog/build.gradle.kts new file mode 100644 index 000000000..036a76fa5 --- /dev/null +++ b/feature/dialog/build.gradle.kts @@ -0,0 +1,14 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.feature) +} + +android { + setNamespace("featrue.dialog") +} + +dependencies { + // domain + implementation(project(":domain:scrap")) +} \ No newline at end of file diff --git a/feature/dialog/src/main/AndroidManifest.xml b/feature/dialog/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/feature/dialog/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/dialog/cancel/ScrapCancelDialog.kt b/feature/dialog/src/main/java/com/terning/feature/dialog/cancel/ScrapCancelDialog.kt similarity index 96% rename from feature/src/main/java/com/terning/feature/dialog/cancel/ScrapCancelDialog.kt rename to feature/dialog/src/main/java/com/terning/feature/dialog/cancel/ScrapCancelDialog.kt index cc4e03004..b82774b04 100644 --- a/feature/src/main/java/com/terning/feature/dialog/cancel/ScrapCancelDialog.kt +++ b/feature/dialog/src/main/java/com/terning/feature/dialog/cancel/ScrapCancelDialog.kt @@ -24,12 +24,12 @@ import com.terning.core.analytics.LocalTracker import com.terning.core.designsystem.component.button.RoundButton import com.terning.core.designsystem.component.dialog.TerningBasicDialog import com.terning.core.designsystem.component.item.TerningLottieAnimation +import com.terning.core.designsystem.extension.toast import com.terning.core.designsystem.theme.Grey350 import com.terning.core.designsystem.theme.Grey500 import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme -import com.terning.core.extension.toast -import com.terning.feature.R +import com.terning.featrue.dialog.R @Composable fun ScrapCancelDialog( @@ -86,7 +86,7 @@ private fun ScrapCancelScreen( horizontalAlignment = Alignment.CenterHorizontally ) { TerningLottieAnimation( - jsonString = "terning_scrap_cancel.json", + jsonFile = R.raw.terning_scrap_cancel, modifier = Modifier .fillMaxWidth() .height(203.dp) diff --git a/feature/src/main/java/com/terning/feature/dialog/cancel/ScrapCancelSideEffect.kt b/feature/dialog/src/main/java/com/terning/feature/dialog/cancel/ScrapCancelSideEffect.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/dialog/cancel/ScrapCancelSideEffect.kt rename to feature/dialog/src/main/java/com/terning/feature/dialog/cancel/ScrapCancelSideEffect.kt diff --git a/feature/src/main/java/com/terning/feature/dialog/cancel/ScrapCancelViewModel.kt b/feature/dialog/src/main/java/com/terning/feature/dialog/cancel/ScrapCancelViewModel.kt similarity index 87% rename from feature/src/main/java/com/terning/feature/dialog/cancel/ScrapCancelViewModel.kt rename to feature/dialog/src/main/java/com/terning/feature/dialog/cancel/ScrapCancelViewModel.kt index 2353d2077..f4956d5b6 100644 --- a/feature/src/main/java/com/terning/feature/dialog/cancel/ScrapCancelViewModel.kt +++ b/feature/dialog/src/main/java/com/terning/feature/dialog/cancel/ScrapCancelViewModel.kt @@ -2,9 +2,9 @@ package com.terning.feature.dialog.cancel import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.terning.domain.entity.calendar.CalendarScrapRequest -import com.terning.domain.repository.ScrapRepository -import com.terning.feature.R +import com.terning.domain.scrap.entity.CalendarScrapRequest +import com.terning.domain.scrap.repository.ScrapRepository +import com.terning.featrue.dialog.R import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.asSharedFlow diff --git a/feature/src/main/java/com/terning/feature/dialog/detail/ScrapDialog.kt b/feature/dialog/src/main/java/com/terning/feature/dialog/detail/ScrapDialog.kt similarity index 98% rename from feature/src/main/java/com/terning/feature/dialog/detail/ScrapDialog.kt rename to feature/dialog/src/main/java/com/terning/feature/dialog/detail/ScrapDialog.kt index 8068d46d0..e02370d3c 100644 --- a/feature/src/main/java/com/terning/feature/dialog/detail/ScrapDialog.kt +++ b/feature/dialog/src/main/java/com/terning/feature/dialog/detail/ScrapDialog.kt @@ -40,6 +40,8 @@ import com.terning.core.analytics.EventType import com.terning.core.analytics.LocalTracker import com.terning.core.designsystem.component.button.RoundButton import com.terning.core.designsystem.component.dialog.TerningBasicDialog +import com.terning.core.designsystem.extension.getFixHeightByMaxLine +import com.terning.core.designsystem.extension.toast import com.terning.core.designsystem.theme.Grey100 import com.terning.core.designsystem.theme.Grey200 import com.terning.core.designsystem.theme.Grey400 @@ -47,10 +49,8 @@ import com.terning.core.designsystem.theme.Grey500 import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme -import com.terning.core.extension.getFixHeightByMaxLine -import com.terning.core.extension.toast -import com.terning.core.type.ColorType -import com.terning.feature.R +import com.terning.core.designsystem.type.ColorType +import com.terning.featrue.dialog.R import com.terning.feature.dialog.detail.component.ColorPalette import com.terning.feature.dialog.detail.component.ScrapColorChangeButton import com.terning.feature.dialog.detail.component.ScrapInfoRow diff --git a/feature/src/main/java/com/terning/feature/dialog/detail/ScrapDialogSideEffect.kt b/feature/dialog/src/main/java/com/terning/feature/dialog/detail/ScrapDialogSideEffect.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/dialog/detail/ScrapDialogSideEffect.kt rename to feature/dialog/src/main/java/com/terning/feature/dialog/detail/ScrapDialogSideEffect.kt diff --git a/feature/src/main/java/com/terning/feature/dialog/detail/ScrapDialogViewModel.kt b/feature/dialog/src/main/java/com/terning/feature/dialog/detail/ScrapDialogViewModel.kt similarity index 93% rename from feature/src/main/java/com/terning/feature/dialog/detail/ScrapDialogViewModel.kt rename to feature/dialog/src/main/java/com/terning/feature/dialog/detail/ScrapDialogViewModel.kt index d850699a8..71cfb9372 100644 --- a/feature/src/main/java/com/terning/feature/dialog/detail/ScrapDialogViewModel.kt +++ b/feature/dialog/src/main/java/com/terning/feature/dialog/detail/ScrapDialogViewModel.kt @@ -2,10 +2,10 @@ package com.terning.feature.dialog.detail import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.terning.core.type.ColorType -import com.terning.domain.entity.calendar.CalendarScrapRequest -import com.terning.domain.repository.ScrapRepository -import com.terning.feature.R +import com.terning.core.designsystem.type.ColorType +import com.terning.domain.scrap.entity.CalendarScrapRequest +import com.terning.domain.scrap.repository.ScrapRepository +import com.terning.featrue.dialog.R import com.terning.feature.dialog.detail.state.ScrapDialogUiState import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow diff --git a/feature/src/main/java/com/terning/feature/dialog/detail/component/ColorPalette.kt b/feature/dialog/src/main/java/com/terning/feature/dialog/detail/component/ColorPalette.kt similarity index 95% rename from feature/src/main/java/com/terning/feature/dialog/detail/component/ColorPalette.kt rename to feature/dialog/src/main/java/com/terning/feature/dialog/detail/component/ColorPalette.kt index b4cfa6ddf..86a585cb2 100644 --- a/feature/src/main/java/com/terning/feature/dialog/detail/component/ColorPalette.kt +++ b/feature/dialog/src/main/java/com/terning/feature/dialog/detail/component/ColorPalette.kt @@ -15,10 +15,11 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.painterResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import com.terning.core.R import com.terning.core.designsystem.component.item.RadioButtonGroups -import com.terning.core.extension.noRippleClickable -import com.terning.core.type.ColorType +import com.terning.core.designsystem.extension.noRippleClickable +import com.terning.core.designsystem.type.ColorType +import com.terning.featrue.dialog.R + @Composable fun ColorPalette( diff --git a/feature/src/main/java/com/terning/feature/dialog/detail/component/ScrapColorChangeButton.kt b/feature/dialog/src/main/java/com/terning/feature/dialog/detail/component/ScrapColorChangeButton.kt similarity index 96% rename from feature/src/main/java/com/terning/feature/dialog/detail/component/ScrapColorChangeButton.kt rename to feature/dialog/src/main/java/com/terning/feature/dialog/detail/component/ScrapColorChangeButton.kt index 5e3221985..a47fb9a05 100644 --- a/feature/src/main/java/com/terning/feature/dialog/detail/component/ScrapColorChangeButton.kt +++ b/feature/dialog/src/main/java/com/terning/feature/dialog/detail/component/ScrapColorChangeButton.kt @@ -22,13 +22,12 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import com.terning.core.designsystem.theme.Grey150 import com.terning.core.designsystem.theme.Grey375 -import com.terning.core.designsystem.theme.Grey400 import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningSub5 import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.util.NoRippleTheme -import com.terning.feature.R +import com.terning.core.designsystem.util.NoRippleTheme +import com.terning.featrue.dialog.R @Composable fun ScrapColorChangeButton( diff --git a/feature/src/main/java/com/terning/feature/dialog/detail/component/ScrapInfoRow.kt b/feature/dialog/src/main/java/com/terning/feature/dialog/detail/component/ScrapInfoRow.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/dialog/detail/component/ScrapInfoRow.kt rename to feature/dialog/src/main/java/com/terning/feature/dialog/detail/component/ScrapInfoRow.kt diff --git a/feature/src/main/java/com/terning/feature/dialog/detail/state/ScrapDialogUiState.kt b/feature/dialog/src/main/java/com/terning/feature/dialog/detail/state/ScrapDialogUiState.kt similarity index 81% rename from feature/src/main/java/com/terning/feature/dialog/detail/state/ScrapDialogUiState.kt rename to feature/dialog/src/main/java/com/terning/feature/dialog/detail/state/ScrapDialogUiState.kt index 1e2daac66..4cb41929a 100644 --- a/feature/src/main/java/com/terning/feature/dialog/detail/state/ScrapDialogUiState.kt +++ b/feature/dialog/src/main/java/com/terning/feature/dialog/detail/state/ScrapDialogUiState.kt @@ -1,6 +1,6 @@ package com.terning.feature.dialog.detail.state -import com.terning.core.type.ColorType +import com.terning.core.designsystem.type.ColorType data class ScrapDialogUiState( val initialColorType: ColorType = ColorType.RED, diff --git a/feature/dialog/src/main/res/drawable/ic_color_check.xml b/feature/dialog/src/main/res/drawable/ic_color_check.xml new file mode 100644 index 000000000..7f91e1bdc --- /dev/null +++ b/feature/dialog/src/main/res/drawable/ic_color_check.xml @@ -0,0 +1,9 @@ + + + diff --git a/feature/dialog/src/main/res/drawable/ic_terning_launcher_background.xml b/feature/dialog/src/main/res/drawable/ic_terning_launcher_background.xml new file mode 100644 index 000000000..ca3826a46 --- /dev/null +++ b/feature/dialog/src/main/res/drawable/ic_terning_launcher_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/feature/src/main/assets/terning_scrap_cancel.json b/feature/dialog/src/main/res/raw/terning_scrap_cancel.json similarity index 100% rename from feature/src/main/assets/terning_scrap_cancel.json rename to feature/dialog/src/main/res/raw/terning_scrap_cancel.json diff --git a/feature/dialog/src/main/res/values/strings.xml b/feature/dialog/src/main/res/values/strings.xml new file mode 100644 index 000000000..a810ddbd1 --- /dev/null +++ b/feature/dialog/src/main/res/values/strings.xml @@ -0,0 +1,25 @@ + + + 서버통신에 성공했어요 + 서버통신에 실패했어요 + + + 공고를 캘린더에 스크랩하시겠어요? + 스크랩 색상 + 색상 변경하기 + 스크랩 색상이 변경되었어요! + 내 캘린더에 스크랩하기 + 관심 공고가 캘린더에서 사라져요! + 스크랩을 취소하시겠어요? + 스크랩 취소하기 + 내가 스크랩한 관심 공고에요! + 공고 상세 정보 보기 + 오늘 마감되는 공고예요! + 관심 공고가 캘린더에 스크랩되었어요! + 관심 공고가 캘린더에서 사라졌어요! + + + 서류 마감 + 근무 기간 + 근무 시작 + diff --git a/feature/dialog/src/main/res/values/themes.xml b/feature/dialog/src/main/res/values/themes.xml new file mode 100644 index 000000000..9e25abbdf --- /dev/null +++ b/feature/dialog/src/main/res/values/themes.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/feature/filtering/.gitignore b/feature/filtering/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/feature/filtering/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/feature/filtering/build.gradle.kts b/feature/filtering/build.gradle.kts new file mode 100644 index 000000000..eb3ef1582 --- /dev/null +++ b/feature/filtering/build.gradle.kts @@ -0,0 +1,15 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.feature) +} + +android { + setNamespace("feature.filtering") +} + +dependencies { + // domain + implementation(project(":domain:filtering")) + implementation(project(":domain:token")) +} \ No newline at end of file diff --git a/feature/filtering/src/main/AndroidManifest.xml b/feature/filtering/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/feature/filtering/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneRoute.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneRoute.kt similarity index 99% rename from feature/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneRoute.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneRoute.kt index 28438e817..dee4f03d2 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneRoute.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneRoute.kt @@ -27,7 +27,7 @@ import com.terning.core.designsystem.theme.Grey300 import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.feature.R +import com.terning.feature.filtering.R import com.terning.feature.filtering.filteringone.component.StatusOneRadioGroup @Composable diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneSideEffect.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneSideEffect.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneSideEffect.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneSideEffect.kt diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneState.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneState.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneState.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneState.kt diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneViewModel.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneViewModel.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneViewModel.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringone/FilteringOneViewModel.kt diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringone/component/StatusOneRadioGroup.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringone/component/StatusOneRadioGroup.kt similarity index 95% rename from feature/src/main/java/com/terning/feature/filtering/filteringone/component/StatusOneRadioGroup.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringone/component/StatusOneRadioGroup.kt index 23630aeae..a6e0d12ba 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filteringone/component/StatusOneRadioGroup.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringone/component/StatusOneRadioGroup.kt @@ -7,14 +7,13 @@ import androidx.compose.foundation.lazy.grid.GridCells import androidx.compose.foundation.lazy.grid.LazyVerticalGrid import androidx.compose.foundation.lazy.grid.itemsIndexed import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableIntStateOf import androidx.compose.runtime.mutableStateListOf import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import com.terning.core.designsystem.component.button.FilteringButton -import com.terning.core.type.Grade -import com.terning.feature.R +import com.terning.core.designsystem.type.Grade +import com.terning.feature.filtering.R @Composable fun StatusOneRadioGroup( diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringone/navigation/FilteringOneNavigation.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringone/navigation/FilteringOneNavigation.kt similarity index 87% rename from feature/src/main/java/com/terning/feature/filtering/filteringone/navigation/FilteringOneNavigation.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringone/navigation/FilteringOneNavigation.kt index dd84da037..247286a74 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filteringone/navigation/FilteringOneNavigation.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringone/navigation/FilteringOneNavigation.kt @@ -1,4 +1,4 @@ -package com.terning.feature.filtering.filtering.navigation +package com.terning.feature.filtering.filteringone.navigation import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder @@ -7,6 +7,7 @@ import androidx.navigation.NavOptions import androidx.navigation.compose.composable import androidx.navigation.toRoute import com.terning.core.navigation.Route +import com.terning.feature.filtering.filteringtwo.navigation.navigateFilteringTwo import com.terning.feature.filtering.filteringone.FilteringOneRoute import kotlinx.serialization.Serializable diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeRoute.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeRoute.kt similarity index 96% rename from feature/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeRoute.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeRoute.kt index 2fce106f9..d10a9298e 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeRoute.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeRoute.kt @@ -27,14 +27,14 @@ import com.terning.core.analytics.EventType import com.terning.core.analytics.LocalTracker import com.terning.core.designsystem.component.button.RectangleButton import com.terning.core.designsystem.component.topappbar.BackButtonTopAppBar +import com.terning.core.designsystem.extension.currentMonth +import com.terning.core.designsystem.extension.currentYear +import com.terning.core.designsystem.extension.toast import com.terning.core.designsystem.theme.Grey300 import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.extension.currentMonth -import com.terning.core.extension.currentYear -import com.terning.core.extension.toast -import com.terning.feature.R +import com.terning.feature.filtering.R import com.terning.feature.filtering.filteringthree.component.YearMonthPicker import java.util.Calendar diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeSideEffect.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeSideEffect.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeSideEffect.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeSideEffect.kt diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeState.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeState.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeState.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeState.kt diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeViewModel.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeViewModel.kt similarity index 89% rename from feature/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeViewModel.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeViewModel.kt index 85263f4f7..3310c5c15 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeViewModel.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringthree/FilteringThreeViewModel.kt @@ -2,10 +2,10 @@ package com.terning.feature.filtering.filteringthree import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.terning.domain.entity.filtering.Filtering -import com.terning.domain.repository.FilteringRepository -import com.terning.domain.repository.TokenRepository -import com.terning.feature.R +import com.terning.domain.filtering.entity.Filtering +import com.terning.domain.filtering.repository.FilteringRepository +import com.terning.domain.token.repository.TokenRepository +import com.terning.feature.filtering.R import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow @@ -18,7 +18,7 @@ import javax.inject.Inject @HiltViewModel class FilteringThreeViewModel @Inject constructor( - private val filteringRepository: FilteringRepository, + private val filteringRepository:FilteringRepository, private val tokenRepository: TokenRepository ) : ViewModel() { diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringthree/component/YearMonthPicker.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringthree/component/YearMonthPicker.kt similarity index 95% rename from feature/src/main/java/com/terning/feature/filtering/filteringthree/component/YearMonthPicker.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringthree/component/YearMonthPicker.kt index d61c06c98..9e870d118 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filteringthree/component/YearMonthPicker.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringthree/component/YearMonthPicker.kt @@ -34,10 +34,10 @@ import com.terning.core.designsystem.theme.Grey300 import com.terning.core.designsystem.theme.Grey500 import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningTheme -import com.terning.core.util.CalendarDefaults.END_MONTH -import com.terning.core.util.CalendarDefaults.END_YEAR -import com.terning.core.util.CalendarDefaults.START_MONTH -import com.terning.core.util.CalendarDefaults.START_YEAR +import com.terning.core.designsystem.util.CalendarDefaults.END_MONTH +import com.terning.core.designsystem.util.CalendarDefaults.END_YEAR +import com.terning.core.designsystem.util.CalendarDefaults.START_MONTH +import com.terning.core.designsystem.util.CalendarDefaults.START_YEAR import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.map import okhttp3.internal.toImmutableList diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringthree/navigation/FilteringThreeNavigation.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringthree/navigation/FilteringThreeNavigation.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/filtering/filteringthree/navigation/FilteringThreeNavigation.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringthree/navigation/FilteringThreeNavigation.kt diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoRoute.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoRoute.kt similarity index 99% rename from feature/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoRoute.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoRoute.kt index facee419f..495d1b6c2 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoRoute.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoRoute.kt @@ -27,7 +27,7 @@ import com.terning.core.designsystem.theme.Grey300 import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.feature.R +import com.terning.feature.filtering.R import com.terning.feature.filtering.filteringtwo.component.StatusTwoRadioGroup @Composable diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoSideEffect.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoSideEffect.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoSideEffect.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoSideEffect.kt diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoState.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoState.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoState.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoState.kt diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoViewModel.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoViewModel.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoViewModel.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringtwo/FilteringTwoViewModel.kt diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringtwo/component/StatusTwoRadioGroup.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringtwo/component/StatusTwoRadioGroup.kt similarity index 95% rename from feature/src/main/java/com/terning/feature/filtering/filteringtwo/component/StatusTwoRadioGroup.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringtwo/component/StatusTwoRadioGroup.kt index 7faac5a44..08f42a882 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filteringtwo/component/StatusTwoRadioGroup.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringtwo/component/StatusTwoRadioGroup.kt @@ -12,8 +12,8 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import com.terning.core.designsystem.component.button.FilteringButton -import com.terning.core.type.WorkingPeriod -import com.terning.feature.R +import com.terning.core.designsystem.type.WorkingPeriod +import com.terning.feature.filtering.R @Composable fun StatusTwoRadioGroup( diff --git a/feature/src/main/java/com/terning/feature/filtering/filteringtwo/navigation/FilteringTwoNavigation.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringtwo/navigation/FilteringTwoNavigation.kt similarity index 95% rename from feature/src/main/java/com/terning/feature/filtering/filteringtwo/navigation/FilteringTwoNavigation.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/filteringtwo/navigation/FilteringTwoNavigation.kt index 8f72ac7a9..1b61b547f 100644 --- a/feature/src/main/java/com/terning/feature/filtering/filteringtwo/navigation/FilteringTwoNavigation.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/filteringtwo/navigation/FilteringTwoNavigation.kt @@ -1,4 +1,4 @@ -package com.terning.feature.filtering.filtering.navigation +package com.terning.feature.filtering.filteringtwo.navigation import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder diff --git a/feature/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt similarity index 95% rename from feature/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt index c82e49436..0b68f45a8 100644 --- a/feature/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt @@ -25,7 +25,9 @@ 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 com.airbnb.lottie.compose.LottieCompositionSpec import com.airbnb.lottie.compose.LottieConstants +import com.airbnb.lottie.compose.rememberLottieComposition import com.terning.core.analytics.EventType import com.terning.core.analytics.LocalTracker import com.terning.core.designsystem.component.button.RectangleButton @@ -33,7 +35,7 @@ import com.terning.core.designsystem.component.item.TerningLottieAnimation import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.feature.R +import com.terning.feature.filtering.R import kotlinx.coroutines.delay @Composable @@ -91,16 +93,14 @@ fun StartFilteringScreen( modifier = Modifier.padding(bottom = 36.dp), textAlign = TextAlign.Center ) - TerningLottieAnimation( - jsonString = "terning_onboarding_start.json", + jsonFile = R.raw.terning_onboarding_start, iterations = LottieConstants.IterateForever, modifier = Modifier .fillMaxWidth() .height(372.dp) .padding(horizontal = 24.dp) ) - Spacer(modifier = Modifier.weight(2f)) } Box( diff --git a/feature/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringState.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringState.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringState.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringState.kt diff --git a/feature/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringViewModel.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringViewModel.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringViewModel.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringViewModel.kt diff --git a/feature/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt similarity index 92% rename from feature/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt index f217cf39e..12b8a4cdc 100644 --- a/feature/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt @@ -7,7 +7,7 @@ import androidx.navigation.NavOptions import androidx.navigation.compose.composable import androidx.navigation.toRoute import com.terning.core.navigation.Route -import com.terning.feature.filtering.filtering.navigation.navigateFilteringOne +import com.terning.feature.filtering.filteringone.navigation.navigateFilteringOne import com.terning.feature.filtering.startfiltering.StartFilteringRoute import kotlinx.serialization.Serializable diff --git a/feature/src/main/java/com/terning/feature/filtering/starthome/StartHomeRoute.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/starthome/StartHomeRoute.kt similarity index 96% rename from feature/src/main/java/com/terning/feature/filtering/starthome/StartHomeRoute.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/starthome/StartHomeRoute.kt index 69ec4e7e6..ba3765118 100644 --- a/feature/src/main/java/com/terning/feature/filtering/starthome/StartHomeRoute.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/starthome/StartHomeRoute.kt @@ -34,7 +34,7 @@ import com.terning.core.designsystem.component.button.RectangleButton import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.feature.R +import com.terning.feature.filtering.R import kotlinx.coroutines.delay @Composable @@ -112,7 +112,9 @@ private const val DELAY: Long = 1000 fun StartHomeLottieAnimation( modifier: Modifier = Modifier ) { - val lottieComposition by rememberLottieComposition(LottieCompositionSpec.Asset("terning_start_home.json")) + val lottieComposition by rememberLottieComposition( + LottieCompositionSpec.RawRes(R.raw.terning_start_home) + ) LottieAnimation( modifier = modifier .fillMaxWidth() diff --git a/feature/src/main/java/com/terning/feature/filtering/starthome/StartHomeState.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/starthome/StartHomeState.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/filtering/starthome/StartHomeState.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/starthome/StartHomeState.kt diff --git a/feature/src/main/java/com/terning/feature/filtering/starthome/StartHomeViewModel.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/starthome/StartHomeViewModel.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/filtering/starthome/StartHomeViewModel.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/starthome/StartHomeViewModel.kt diff --git a/feature/src/main/java/com/terning/feature/filtering/starthome/navigation/StartHomeNavigation.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/starthome/navigation/StartHomeNavigation.kt similarity index 58% rename from feature/src/main/java/com/terning/feature/filtering/starthome/navigation/StartHomeNavigation.kt rename to feature/filtering/src/main/java/com/terning/feature/filtering/starthome/navigation/StartHomeNavigation.kt index 6f5570956..8d4c97085 100644 --- a/feature/src/main/java/com/terning/feature/filtering/starthome/navigation/StartHomeNavigation.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/starthome/navigation/StartHomeNavigation.kt @@ -2,13 +2,10 @@ package com.terning.feature.filtering.starthome.navigation import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder -import androidx.navigation.NavHostController import androidx.navigation.NavOptions import androidx.navigation.compose.composable -import androidx.navigation.navOptions import com.terning.core.navigation.Route import com.terning.feature.filtering.starthome.StartHomeRoute -import com.terning.feature.home.navigation.navigateHome import kotlinx.serialization.Serializable fun NavController.navigateStartHome(navOptions: NavOptions? = null) { @@ -19,20 +16,11 @@ fun NavController.navigateStartHome(navOptions: NavOptions? = null) { } fun NavGraphBuilder.startHomeNavGraph( - navHostController: NavHostController + navigateHome: () -> Unit ) { composable { - val navOptions = navOptions { - popUpTo(id = navHostController.graph.id) { - inclusive = true - } - } StartHomeRoute( - navigateToHome = { - navHostController.navigateHome( - navOptions = navOptions - ) - } + navigateToHome = navigateHome ) } } diff --git a/feature/filtering/src/main/res/drawable/ic_filtering_status1.xml b/feature/filtering/src/main/res/drawable/ic_filtering_status1.xml new file mode 100644 index 000000000..5ec3e7fb5 --- /dev/null +++ b/feature/filtering/src/main/res/drawable/ic_filtering_status1.xml @@ -0,0 +1,44 @@ + + + + + + + + + + diff --git a/feature/filtering/src/main/res/drawable/ic_filtering_status2.xml b/feature/filtering/src/main/res/drawable/ic_filtering_status2.xml new file mode 100644 index 000000000..103737b2d --- /dev/null +++ b/feature/filtering/src/main/res/drawable/ic_filtering_status2.xml @@ -0,0 +1,42 @@ + + + + + + + + + + diff --git a/feature/filtering/src/main/res/drawable/ic_filtering_status3.xml b/feature/filtering/src/main/res/drawable/ic_filtering_status3.xml new file mode 100644 index 000000000..d80473b73 --- /dev/null +++ b/feature/filtering/src/main/res/drawable/ic_filtering_status3.xml @@ -0,0 +1,40 @@ + + + + + + + + + + diff --git a/feature/filtering/src/main/res/drawable/ic_terning_launcher_background.xml b/feature/filtering/src/main/res/drawable/ic_terning_launcher_background.xml new file mode 100644 index 000000000..ca3826a46 --- /dev/null +++ b/feature/filtering/src/main/res/drawable/ic_terning_launcher_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/feature/src/main/assets/terning_onboarding_start.json b/feature/filtering/src/main/res/raw/terning_onboarding_start.json similarity index 100% rename from feature/src/main/assets/terning_onboarding_start.json rename to feature/filtering/src/main/res/raw/terning_onboarding_start.json diff --git a/feature/src/main/assets/terning_start_home.json b/feature/filtering/src/main/res/raw/terning_start_home.json similarity index 100% rename from feature/src/main/assets/terning_start_home.json rename to feature/filtering/src/main/res/raw/terning_start_home.json diff --git a/feature/filtering/src/main/res/values/strings.xml b/feature/filtering/src/main/res/values/strings.xml new file mode 100644 index 000000000..a32446029 --- /dev/null +++ b/feature/filtering/src/main/res/values/strings.xml @@ -0,0 +1,39 @@ + + + 서버통신에 성공했어요 + 서버통신에 실패했어요 + + + 터닝에서 내 계획에 딱 맞는\n대학생 인턴 찾기를 도와드릴게요 + 시작화면 이미지 + 시작하기 + + + 나에게 딱 맞는 공고가 준비됐어요!\n터닝을 시작해 볼까요? + 내 맞춤 공고 바로 보러가기 + + + %s님의 재학 상태를 선택해 주세요 + *5년제 혹은 초과학기인 경우 4학년으로 선택해 주세요 + 휴학 중이라면, 휴학 전 마지막 수료 학년을 선택해 주세요 + 1학년 + 2학년 + 3학년 + 4학년 + 대학생 인턴, 누구보다 빠르게 시작해 보세요! + 인턴이라는 좋은 기회로 단숨에 스펙업하세요! + 지금까지 준비한 역량을 인턴으로 발휘해 보세요! + 사회초년생으로 도약하는 마지막 단계를 경험하세요! + 희망하는 인턴 근무 기간을 선택해 주세요 + 선택한 기간 동안 근무할 수 있는 인턴 공고를 찾아드릴게요 + 1개월 ~ 3개월 + 4개월 ~ 6개월 + 7개월 이상 + 짧은 기간 안에 유의미한 스펙을 쌓을 수 있어요! + 회사와 직무에 대해 이해하기 적당한 기간이에요! + 오랜 기간 내 커리어에 맞는 직무 경험을 만들 수 있어요! + 언제부터 인턴 근무가 가능한지 알려주세요 + 원하는 근무 시작 시기에 맞는 인턴 공고를 찾아드려요 + 다음으로 + + diff --git a/feature/filtering/src/main/res/values/themes.xml b/feature/filtering/src/main/res/values/themes.xml new file mode 100644 index 000000000..9e25abbdf --- /dev/null +++ b/feature/filtering/src/main/res/values/themes.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/feature/home/.gitignore b/feature/home/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/feature/home/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/feature/home/build.gradle.kts b/feature/home/build.gradle.kts new file mode 100644 index 000000000..cce28b828 --- /dev/null +++ b/feature/home/build.gradle.kts @@ -0,0 +1,18 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.feature) +} + +android { + setNamespace("feature.home") +} + +dependencies { + // domain + implementation(project(":domain:home")) + implementation(project(":domain:mypage")) + + // feature + implementation(project(":feature:dialog")) +} \ No newline at end of file diff --git a/feature/home/src/main/AndroidManifest.xml b/feature/home/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/feature/home/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/home/HomeRoute.kt b/feature/home/src/main/java/com/terning/feature/home/HomeRoute.kt similarity index 95% rename from feature/src/main/java/com/terning/feature/home/HomeRoute.kt rename to feature/home/src/main/java/com/terning/feature/home/HomeRoute.kt index bc88bac0d..9cb4c1b55 100644 --- a/feature/src/main/java/com/terning/feature/home/HomeRoute.kt +++ b/feature/home/src/main/java/com/terning/feature/home/HomeRoute.kt @@ -34,22 +34,20 @@ import com.terning.core.designsystem.component.bottomsheet.SortingBottomSheet import com.terning.core.designsystem.component.button.SortingButton import com.terning.core.designsystem.component.image.TerningImage import com.terning.core.designsystem.component.item.InternItemWithShadow +import com.terning.core.designsystem.extension.noRippleClickable +import com.terning.core.designsystem.extension.toast +import com.terning.core.designsystem.state.UiState import com.terning.core.designsystem.theme.Black import com.terning.core.designsystem.theme.CalRed import com.terning.core.designsystem.theme.Grey400 import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.extension.noRippleClickable -import com.terning.core.extension.toast -import com.terning.core.state.UiState -import com.terning.core.type.Grade -import com.terning.core.type.WorkingPeriod -import com.terning.domain.entity.home.HomeFilteringInfo -import com.terning.domain.entity.home.HomeRecommendIntern -import com.terning.domain.entity.home.HomeUpcomingIntern -import com.terning.feature.R -import com.terning.feature.calendar.calendar.navigation.navigateCalendar +import com.terning.core.designsystem.type.Grade +import com.terning.core.designsystem.type.WorkingPeriod +import com.terning.domain.home.entity.HomeFilteringInfo +import com.terning.domain.home.entity.HomeRecommendIntern +import com.terning.domain.home.entity.HomeUpcomingIntern import com.terning.feature.dialog.cancel.ScrapCancelDialog import com.terning.feature.dialog.detail.ScrapDialog import com.terning.feature.home.component.HomeFilteringBottomSheet @@ -58,7 +56,6 @@ import com.terning.feature.home.component.HomeRecommendEmptyIntern import com.terning.feature.home.component.HomeUpcomingEmptyFilter import com.terning.feature.home.component.HomeUpcomingEmptyIntern import com.terning.feature.home.component.HomeUpcomingInternScreen -import com.terning.feature.intern.navigation.navigateIntern const val NAME_START_LENGTH = 7 const val NAME_END_LENGTH = 12 @@ -68,6 +65,8 @@ fun HomeRoute( paddingValues: PaddingValues, navController: NavHostController, viewModel: HomeViewModel = hiltViewModel(), + navigateToCalendar: () -> Unit, + navigateToIntern: (Long) -> Unit ) { val systemUiController = rememberSystemUiController() SideEffect { @@ -95,6 +94,8 @@ fun HomeRoute( when (sideEffect) { is HomeSideEffect.ShowToast -> context.toast(sideEffect.message) is HomeSideEffect.NavigateToHome -> navController.navigateUp() + is HomeSideEffect.NavigateToCalendar -> navigateToCalendar() + is HomeSideEffect.NavigateToIntern -> navigateToIntern(sideEffect.announcementId) } } } @@ -106,14 +107,14 @@ fun HomeRoute( type = EventType.CLICK, name = "home_intern_card" ) - navController.navigateIntern(announcementId = it) + viewModel.navigateIntern(announcementId = it) }, navigateToCalendar = { amplitudeTracker.track( type = EventType.CLICK, name = "check_schedule" ) - navController.navigateCalendar() + viewModel.navigateCalendar() }, updateRecommendDialogVisibility = viewModel::updateRecommendDialogVisibility, updateUpcomingDialogVisibility = viewModel::updateUpcomingDialogVisibility, diff --git a/feature/src/main/java/com/terning/feature/home/HomeSideEffect.kt b/feature/home/src/main/java/com/terning/feature/home/HomeSideEffect.kt similarity index 63% rename from feature/src/main/java/com/terning/feature/home/HomeSideEffect.kt rename to feature/home/src/main/java/com/terning/feature/home/HomeSideEffect.kt index abc8659ec..994850eed 100644 --- a/feature/src/main/java/com/terning/feature/home/HomeSideEffect.kt +++ b/feature/home/src/main/java/com/terning/feature/home/HomeSideEffect.kt @@ -5,4 +5,6 @@ import androidx.annotation.StringRes sealed class HomeSideEffect { data class ShowToast(@StringRes val message: Int) : HomeSideEffect() data object NavigateToHome : HomeSideEffect() + data object NavigateToCalendar : HomeSideEffect() + data class NavigateToIntern(val announcementId: Long) : HomeSideEffect() } \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/home/HomeState.kt b/feature/home/src/main/java/com/terning/feature/home/HomeState.kt similarity index 70% rename from feature/src/main/java/com/terning/feature/home/HomeState.kt rename to feature/home/src/main/java/com/terning/feature/home/HomeState.kt index 6bf0278f2..de563b9be 100644 --- a/feature/src/main/java/com/terning/feature/home/HomeState.kt +++ b/feature/home/src/main/java/com/terning/feature/home/HomeState.kt @@ -1,10 +1,10 @@ package com.terning.feature.home -import com.terning.core.state.UiState -import com.terning.core.type.SortBy -import com.terning.domain.entity.home.HomeFilteringInfo -import com.terning.domain.entity.home.HomeRecommendIntern -import com.terning.domain.entity.home.HomeUpcomingIntern +import com.terning.core.designsystem.state.UiState +import com.terning.core.designsystem.type.SortBy +import com.terning.domain.home.entity.HomeFilteringInfo +import com.terning.domain.home.entity.HomeRecommendIntern +import com.terning.domain.home.entity.HomeUpcomingIntern data class HomeState( val sortBy: SortBy = SortBy.EARLIEST, diff --git a/feature/src/main/java/com/terning/feature/home/HomeViewModel.kt b/feature/home/src/main/java/com/terning/feature/home/HomeViewModel.kt similarity index 86% rename from feature/src/main/java/com/terning/feature/home/HomeViewModel.kt rename to feature/home/src/main/java/com/terning/feature/home/HomeViewModel.kt index 13a9d4d8a..801bea8b9 100644 --- a/feature/src/main/java/com/terning/feature/home/HomeViewModel.kt +++ b/feature/home/src/main/java/com/terning/feature/home/HomeViewModel.kt @@ -2,15 +2,14 @@ package com.terning.feature.home import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.terning.core.extension.currentMonth -import com.terning.core.extension.currentYear -import com.terning.core.state.UiState -import com.terning.core.type.SortBy -import com.terning.domain.entity.home.HomeRecommendIntern -import com.terning.domain.entity.request.ChangeFilteringRequestModel -import com.terning.domain.repository.HomeRepository -import com.terning.domain.repository.MyPageRepository -import com.terning.feature.R +import com.terning.core.designsystem.extension.currentMonth +import com.terning.core.designsystem.extension.currentYear +import com.terning.core.designsystem.state.UiState +import com.terning.core.designsystem.type.SortBy +import com.terning.domain.home.entity.ChangeFilteringRequestModel +import com.terning.domain.home.entity.HomeRecommendIntern +import com.terning.domain.home.repository.HomeRepository +import com.terning.domain.mypage.repository.MyPageRepository import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow @@ -92,7 +91,12 @@ class HomeViewModel @Inject constructor( fun putFilteringInfo(grade: String, workingPeriod: String, year: Int, month: Int) { viewModelScope.launch { homeRepository.putFilteringInfo( - ChangeFilteringRequestModel(grade, workingPeriod, year, month) + ChangeFilteringRequestModel( + grade, + workingPeriod, + year, + month + ) ) } } @@ -172,4 +176,16 @@ class HomeViewModel @Inject constructor( ) } } + + fun navigateCalendar() { + viewModelScope.launch { + _homeSideEffect.emit(HomeSideEffect.NavigateToCalendar) + } + } + + fun navigateIntern(announcementId: Long) { + viewModelScope.launch { + _homeSideEffect.emit(HomeSideEffect.NavigateToIntern(announcementId)) + } + } } \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/home/component/HomeFilteringBottomSheet.kt b/feature/home/src/main/java/com/terning/feature/home/component/HomeFilteringBottomSheet.kt similarity index 96% rename from feature/src/main/java/com/terning/feature/home/component/HomeFilteringBottomSheet.kt rename to feature/home/src/main/java/com/terning/feature/home/component/HomeFilteringBottomSheet.kt index e4de4c0f5..27fb6e5bc 100644 --- a/feature/src/main/java/com/terning/feature/home/component/HomeFilteringBottomSheet.kt +++ b/feature/home/src/main/java/com/terning/feature/home/component/HomeFilteringBottomSheet.kt @@ -21,18 +21,17 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp -import com.terning.core.R import com.terning.core.designsystem.component.bottomsheet.TerningBasicBottomSheet import com.terning.core.designsystem.component.button.ChangeFilterButton import com.terning.core.designsystem.component.button.RoundButton +import com.terning.core.designsystem.extension.currentMonth +import com.terning.core.designsystem.extension.currentYear import com.terning.core.designsystem.theme.Black import com.terning.core.designsystem.theme.Grey200 import com.terning.core.designsystem.theme.TerningTheme -import com.terning.core.extension.currentMonth -import com.terning.core.extension.currentYear -import com.terning.core.type.Grade -import com.terning.core.type.WorkingPeriod -import com.terning.feature.filtering.filteringthree.component.YearMonthPicker +import com.terning.core.designsystem.type.Grade +import com.terning.core.designsystem.type.WorkingPeriod +import com.terning.core.designsystem.R import java.util.Calendar @OptIn(ExperimentalMaterial3Api::class) diff --git a/feature/src/main/java/com/terning/feature/home/component/HomeFilteringScreen.kt b/feature/home/src/main/java/com/terning/feature/home/component/HomeFilteringScreen.kt similarity index 95% rename from feature/src/main/java/com/terning/feature/home/component/HomeFilteringScreen.kt rename to feature/home/src/main/java/com/terning/feature/home/component/HomeFilteringScreen.kt index 992b9e5ee..cbac1746a 100644 --- a/feature/src/main/java/com/terning/feature/home/component/HomeFilteringScreen.kt +++ b/feature/home/src/main/java/com/terning/feature/home/component/HomeFilteringScreen.kt @@ -24,15 +24,15 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import com.terning.core.analytics.EventType import com.terning.core.analytics.LocalTracker +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.Grey350 import com.terning.core.designsystem.theme.Grey400 import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningTheme -import com.terning.core.extension.noRippleClickable -import com.terning.core.type.Grade -import com.terning.core.type.WorkingPeriod -import com.terning.domain.entity.home.HomeFilteringInfo -import com.terning.feature.R +import com.terning.core.designsystem.type.Grade +import com.terning.core.designsystem.type.WorkingPeriod +import com.terning.domain.home.entity.HomeFilteringInfo +import com.terning.feature.home.R @Composable fun HomeFilteringScreen( diff --git a/feature/src/main/java/com/terning/feature/home/component/HomeRecommendEmptyIntern.kt b/feature/home/src/main/java/com/terning/feature/home/component/HomeRecommendEmptyIntern.kt similarity index 98% rename from feature/src/main/java/com/terning/feature/home/component/HomeRecommendEmptyIntern.kt rename to feature/home/src/main/java/com/terning/feature/home/component/HomeRecommendEmptyIntern.kt index d6bca8a39..706bf3621 100644 --- a/feature/src/main/java/com/terning/feature/home/component/HomeRecommendEmptyIntern.kt +++ b/feature/home/src/main/java/com/terning/feature/home/component/HomeRecommendEmptyIntern.kt @@ -18,7 +18,7 @@ import androidx.compose.ui.unit.dp import com.terning.core.designsystem.theme.Grey400 import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme -import com.terning.feature.R +import com.terning.feature.home.R @Composable fun HomeRecommendEmptyIntern( diff --git a/feature/src/main/java/com/terning/feature/home/component/HomeUpcomingEmptyFilter.kt b/feature/home/src/main/java/com/terning/feature/home/component/HomeUpcomingEmptyFilter.kt similarity index 95% rename from feature/src/main/java/com/terning/feature/home/component/HomeUpcomingEmptyFilter.kt rename to feature/home/src/main/java/com/terning/feature/home/component/HomeUpcomingEmptyFilter.kt index ac4e6b6be..5565da425 100644 --- a/feature/src/main/java/com/terning/feature/home/component/HomeUpcomingEmptyFilter.kt +++ b/feature/home/src/main/java/com/terning/feature/home/component/HomeUpcomingEmptyFilter.kt @@ -15,12 +15,12 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import com.terning.core.designsystem.component.image.TerningImage +import com.terning.core.designsystem.extension.customShadow import com.terning.core.designsystem.theme.Grey150 import com.terning.core.designsystem.theme.Grey500 import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.extension.customShadow -import com.terning.feature.R +import com.terning.feature.home.R @Composable fun HomeUpcomingEmptyFilter( diff --git a/feature/src/main/java/com/terning/feature/home/component/HomeUpcomingEmptyIntern.kt b/feature/home/src/main/java/com/terning/feature/home/component/HomeUpcomingEmptyIntern.kt similarity index 94% rename from feature/src/main/java/com/terning/feature/home/component/HomeUpcomingEmptyIntern.kt rename to feature/home/src/main/java/com/terning/feature/home/component/HomeUpcomingEmptyIntern.kt index c85a82062..cec327b9f 100644 --- a/feature/src/main/java/com/terning/feature/home/component/HomeUpcomingEmptyIntern.kt +++ b/feature/home/src/main/java/com/terning/feature/home/component/HomeUpcomingEmptyIntern.kt @@ -15,14 +15,14 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp +import com.terning.core.designsystem.extension.customShadow +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.Grey150 import com.terning.core.designsystem.theme.Grey500 import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.extension.customShadow -import com.terning.core.extension.noRippleClickable -import com.terning.feature.R +import com.terning.feature.home.R @Composable fun HomeUpcomingEmptyIntern( diff --git a/feature/src/main/java/com/terning/feature/home/component/HomeUpcomingInternScreen.kt b/feature/home/src/main/java/com/terning/feature/home/component/HomeUpcomingInternScreen.kt similarity index 97% rename from feature/src/main/java/com/terning/feature/home/component/HomeUpcomingInternScreen.kt rename to feature/home/src/main/java/com/terning/feature/home/component/HomeUpcomingInternScreen.kt index 954199340..8562ccaa4 100644 --- a/feature/src/main/java/com/terning/feature/home/component/HomeUpcomingInternScreen.kt +++ b/feature/home/src/main/java/com/terning/feature/home/component/HomeUpcomingInternScreen.kt @@ -35,18 +35,18 @@ import coil3.request.ImageRequest import com.terning.core.analytics.EventType import com.terning.core.analytics.LocalTracker import com.terning.core.designsystem.component.item.ScrapBox +import com.terning.core.designsystem.extension.customShadow +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.Black import com.terning.core.designsystem.theme.Grey150 import com.terning.core.designsystem.theme.Grey500 import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningSub3 import com.terning.core.designsystem.theme.TerningTheme -import com.terning.core.extension.customShadow -import com.terning.core.extension.noRippleClickable -import com.terning.domain.entity.home.HomeUpcomingIntern -import com.terning.feature.R +import com.terning.domain.home.entity.HomeUpcomingIntern import com.terning.feature.dialog.detail.ScrapDialog import com.terning.feature.home.HomeState +import com.terning.feature.home.R @Composable fun HomeUpcomingInternScreen( diff --git a/feature/home/src/main/java/com/terning/feature/home/component/YearMonthPicker.kt b/feature/home/src/main/java/com/terning/feature/home/component/YearMonthPicker.kt new file mode 100644 index 000000000..1771bc4b3 --- /dev/null +++ b/feature/home/src/main/java/com/terning/feature/home/component/YearMonthPicker.kt @@ -0,0 +1,199 @@ +package com.terning.feature.home.component + +import androidx.compose.foundation.gestures.snapping.rememberSnapFlingBehavior +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.offset +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.rememberLazyListState +import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.runtime.snapshotFlow +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.layout.onSizeChanged +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.IntSize +import androidx.compose.ui.unit.dp +import com.terning.core.designsystem.theme.Grey300 +import com.terning.core.designsystem.theme.Grey500 +import com.terning.core.designsystem.theme.TerningMain +import com.terning.core.designsystem.theme.TerningTheme +import com.terning.core.designsystem.util.CalendarDefaults.END_MONTH +import com.terning.core.designsystem.util.CalendarDefaults.END_YEAR +import com.terning.core.designsystem.util.CalendarDefaults.START_MONTH +import com.terning.core.designsystem.util.CalendarDefaults.START_YEAR +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.map +import okhttp3.internal.toImmutableList + +private val years = + (START_YEAR..END_YEAR).map { "${it}년" }.toImmutableList() + +private val months = + (START_MONTH..END_MONTH).map { "${it}월" }.toImmutableList() + +class PickerState { + var selectedItem by mutableStateOf("") +} + +@Composable +fun rememberPickerState() = remember { PickerState() } + +@Composable +fun YearMonthPicker( + modifier: Modifier = Modifier, + chosenYear: Int, + chosenMonth: Int, + onYearChosen: (Int) -> Unit, + onMonthChosen: (Int) -> Unit, +) { + val yearPickerState = rememberPickerState() + val monthPickerState = rememberPickerState() + + val startYearIndex = years.indexOf("${chosenYear}년").takeIf { it >= 0 } ?: 0 + val startMonthIndex = months.indexOf("${chosenMonth}월").takeIf { it >= 0 } ?: 0 + + LaunchedEffect(chosenYear) { + yearPickerState.selectedItem = "${chosenYear}년" + } + + LaunchedEffect(chosenMonth) { + monthPickerState.selectedItem = "${chosenMonth}월" + } + + Row( + modifier = modifier + .fillMaxWidth() + .padding(horizontal = 95.dp), + horizontalArrangement = Arrangement.Center + ) { + DatePicker( + modifier = Modifier.weight(1f), + pickerState = yearPickerState, + items = years, + startIndex = startYearIndex, + onItemSelected = { year -> + onYearChosen(year.dropLast(1).toInt()) + } + ) + Spacer(modifier = Modifier.width(18.dp)) + DatePicker( + modifier = Modifier.weight(1f), + pickerState = monthPickerState, + items = months, + startIndex = startMonthIndex, + onItemSelected = { month -> + onMonthChosen(month.dropLast(1).toInt()) + } + ) + } +} + +@Composable +fun DatePicker( + items: List, + modifier: Modifier = Modifier, + pickerState: PickerState = rememberPickerState(), + startIndex: Int = 0, + visibleItemCount: Int = 3, + onItemSelected: (String) -> Unit +) { + var itemHeightPixel by remember { mutableIntStateOf(0) } + val itemHeightDp = with(LocalDensity.current) { itemHeightPixel.toDp() } + + val visibleItemsMiddle = visibleItemCount / 2 + val scrollState = rememberLazyListState(initialFirstVisibleItemIndex = startIndex) + val flingBehavior = rememberSnapFlingBehavior(lazyListState = scrollState) + + LaunchedEffect(itemHeightPixel) { + if (itemHeightPixel > 0) scrollState.scrollToItem(startIndex) + } + + LaunchedEffect(scrollState) { + snapshotFlow { scrollState.firstVisibleItemIndex } + .map { index -> items.getOrNull(index) } + .distinctUntilChanged() + .collect { item -> + item?.let { + pickerState.selectedItem = it + onItemSelected(it) + } + } + } + + Box( + modifier = modifier + ) { + LazyColumn( + modifier = Modifier + .fillMaxWidth() + .height(itemHeightDp * visibleItemCount), + flingBehavior = flingBehavior, + state = scrollState, + horizontalAlignment = Alignment.CenterHorizontally + ) { + items(visibleItemsMiddle) { + Spacer(modifier = Modifier.height(itemHeightDp)) + } + items(items.size) { index -> + DatePickerContent( + modifier = Modifier + .onSizeChanged { intSize: IntSize -> itemHeightPixel = intSize.height }, + text = items[index], + color = if (pickerState.selectedItem == items[index]) Grey500 else Grey300 + ) + } + items(visibleItemsMiddle) { + Spacer(modifier = Modifier.height(itemHeightDp)) + } + } + HorizontalDivider( + modifier = Modifier + .offset(y = itemHeightDp * visibleItemsMiddle) + .padding(horizontal = 7.dp), + color = TerningMain, + thickness = 1.dp + ) + HorizontalDivider( + modifier = Modifier + .offset(y = itemHeightDp * (visibleItemsMiddle + 1)) + .padding(horizontal = 7.dp), + color = TerningMain, + thickness = 1.dp + ) + } +} + +@Composable +fun DatePickerContent( + color: Color, + text: String, + modifier: Modifier = Modifier, +) { + Box( + modifier = modifier.padding(vertical = 11.dp) + ) { + Text( + text = text, + textAlign = TextAlign.Center, + style = TerningTheme.typography.title3, + color = color, + ) + } +} diff --git a/feature/src/main/java/com/terning/feature/home/model/HomeDialogState.kt b/feature/home/src/main/java/com/terning/feature/home/model/HomeDialogState.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/home/model/HomeDialogState.kt rename to feature/home/src/main/java/com/terning/feature/home/model/HomeDialogState.kt diff --git a/feature/src/main/java/com/terning/feature/home/navigation/HometNavigation.kt b/feature/home/src/main/java/com/terning/feature/home/navigation/HometNavigation.kt similarity index 75% rename from feature/src/main/java/com/terning/feature/home/navigation/HometNavigation.kt rename to feature/home/src/main/java/com/terning/feature/home/navigation/HometNavigation.kt index ef2ee3c9b..217d4cd8f 100644 --- a/feature/src/main/java/com/terning/feature/home/navigation/HometNavigation.kt +++ b/feature/home/src/main/java/com/terning/feature/home/navigation/HometNavigation.kt @@ -20,8 +20,11 @@ fun NavController.navigateHome(navOptions: NavOptions? = null) { } fun NavGraphBuilder.homeNavGraph( - paddingValues : PaddingValues, - navHostController: NavHostController) { + paddingValues: PaddingValues, + navHostController: NavHostController, + navigateToCalendar: () -> Unit, + navigateToIntern:(Long)-> Unit +) { composable( exitTransition = { ExitTransition.None @@ -37,8 +40,11 @@ fun NavGraphBuilder.homeNavGraph( } ) { HomeRoute( - paddingValues= paddingValues, - navController = navHostController) + paddingValues = paddingValues, + navController = navHostController, + navigateToCalendar = navigateToCalendar, + navigateToIntern = navigateToIntern + ) } } diff --git a/feature/home/src/main/res/drawable/ic_home_bookmark_28.xml b/feature/home/src/main/res/drawable/ic_home_bookmark_28.xml new file mode 100644 index 000000000..bb6ab3c20 --- /dev/null +++ b/feature/home/src/main/res/drawable/ic_home_bookmark_28.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/feature/home/src/main/res/drawable/ic_home_empty_filtering.xml b/feature/home/src/main/res/drawable/ic_home_empty_filtering.xml new file mode 100644 index 000000000..9c6c313b3 --- /dev/null +++ b/feature/home/src/main/res/drawable/ic_home_empty_filtering.xml @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/feature/home/src/main/res/drawable/ic_home_filtering_28.xml b/feature/home/src/main/res/drawable/ic_home_filtering_28.xml new file mode 100644 index 000000000..9968def3a --- /dev/null +++ b/feature/home/src/main/res/drawable/ic_home_filtering_28.xml @@ -0,0 +1,9 @@ + + + diff --git a/feature/home/src/main/res/drawable/ic_home_scrap_empty.png b/feature/home/src/main/res/drawable/ic_home_scrap_empty.png new file mode 100644 index 000000000..479fde601 Binary files /dev/null and b/feature/home/src/main/res/drawable/ic_home_scrap_empty.png differ diff --git a/feature/home/src/main/res/drawable/ic_terning_launcher_background.xml b/feature/home/src/main/res/drawable/ic_terning_launcher_background.xml new file mode 100644 index 000000000..ca3826a46 --- /dev/null +++ b/feature/home/src/main/res/drawable/ic_terning_launcher_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/feature/home/src/main/res/drawable/ic_terning_logo_typo.xml b/feature/home/src/main/res/drawable/ic_terning_logo_typo.xml new file mode 100644 index 000000000..4e7d72284 --- /dev/null +++ b/feature/home/src/main/res/drawable/ic_terning_logo_typo.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + diff --git a/feature/home/src/main/res/drawable/ic_terning_no_filter.xml b/feature/home/src/main/res/drawable/ic_terning_no_filter.xml new file mode 100644 index 000000000..9c6c313b3 --- /dev/null +++ b/feature/home/src/main/res/drawable/ic_terning_no_filter.xml @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/feature/home/src/main/res/values/strings.xml b/feature/home/src/main/res/values/strings.xml new file mode 100644 index 000000000..4de5c31f2 --- /dev/null +++ b/feature/home/src/main/res/values/strings.xml @@ -0,0 +1,28 @@ + + + 서버통신에 성공했어요 + 서버통신에 실패했어요 + + + 곧 마감되는 %s님의 관심 공고 + 아직 스크랩된 인턴 공고가 없어요! + 일주일 내에 마감인 공고가 없어요\n캘린더에서 스크랩한 공고 일정을 확인해 보세요 + 공고 마감 일정 확인하기 + + 근무기간 + 내 계획에 딱 맞는 대학생 인턴 공고 + 필터링 + %s년 %s월 + 필터링 설정에 일치하는 인턴 공고가 없어요! + 인턴 공고가 없어요! + + 지금 공고 필터링을 설정하고\n내 계획에 딱 맞는 대학생 인턴 공고를 추천받아보세요! + + + 개의 공고가 있어요 + 설정된 필터링 정보가 없어요 + + 기업 이미지 + - + 오늘 마감인 공고가 없어요 + diff --git a/feature/home/src/main/res/values/themes.xml b/feature/home/src/main/res/values/themes.xml new file mode 100644 index 000000000..9e25abbdf --- /dev/null +++ b/feature/home/src/main/res/values/themes.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/feature/intern/.gitignore b/feature/intern/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/feature/intern/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/feature/intern/build.gradle.kts b/feature/intern/build.gradle.kts new file mode 100644 index 000000000..e35db6e3f --- /dev/null +++ b/feature/intern/build.gradle.kts @@ -0,0 +1,17 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.feature) +} + +android { + setNamespace("feature.intern") +} + +dependencies { + // domain + implementation(project(":domain:intern")) + + // feature + implementation(project(":feature:dialog")) +} \ No newline at end of file diff --git a/feature/intern/src/main/AndroidManifest.xml b/feature/intern/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/feature/intern/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/intern/InternRoute.kt b/feature/intern/src/main/java/com/terning/feature/intern/InternRoute.kt similarity index 97% rename from feature/src/main/java/com/terning/feature/intern/InternRoute.kt rename to feature/intern/src/main/java/com/terning/feature/intern/InternRoute.kt index 4ca709ba0..c33162aaa 100644 --- a/feature/src/main/java/com/terning/feature/intern/InternRoute.kt +++ b/feature/intern/src/main/java/com/terning/feature/intern/InternRoute.kt @@ -25,18 +25,16 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.flowWithLifecycle import androidx.navigation.NavHostController import com.terning.core.analytics.EventType -import com.terning.core.analytics.LocalTracker import com.terning.core.designsystem.component.topappbar.BackButtonTopAppBar +import com.terning.core.designsystem.extension.customShadow +import com.terning.core.designsystem.extension.toast +import com.terning.core.designsystem.state.UiState import com.terning.core.designsystem.theme.CalRed import com.terning.core.designsystem.theme.Grey200 import com.terning.core.designsystem.theme.Grey400 import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.extension.customShadow -import com.terning.core.extension.toast -import com.terning.core.state.UiState -import com.terning.domain.entity.intern.InternInfo -import com.terning.feature.R +import com.terning.domain.intern.entity.InternInfo import com.terning.feature.dialog.cancel.ScrapCancelDialog import com.terning.feature.dialog.detail.ScrapDialog import com.terning.feature.intern.component.InternBottomBar @@ -56,7 +54,7 @@ fun InternRoute( val context = LocalContext.current val lifecycleOwner = LocalLifecycleOwner.current val internState by viewModel.internUiState.collectAsStateWithLifecycle(lifecycleOwner) - val amplitudeTracker = LocalTracker.current + val amplitudeTracker = com.terning.core.analytics.LocalTracker.current LaunchedEffect(key1 = true) { viewModel.getInternInfo(announcementId) diff --git a/feature/src/main/java/com/terning/feature/intern/InternViewModel.kt b/feature/intern/src/main/java/com/terning/feature/intern/InternViewModel.kt similarity index 93% rename from feature/src/main/java/com/terning/feature/intern/InternViewModel.kt rename to feature/intern/src/main/java/com/terning/feature/intern/InternViewModel.kt index e1f955247..ffe22652e 100644 --- a/feature/src/main/java/com/terning/feature/intern/InternViewModel.kt +++ b/feature/intern/src/main/java/com/terning/feature/intern/InternViewModel.kt @@ -2,10 +2,9 @@ package com.terning.feature.intern import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.terning.core.state.UiState -import com.terning.domain.entity.intern.InternInfo -import com.terning.domain.repository.InternRepository -import com.terning.feature.R +import com.terning.core.designsystem.state.UiState +import com.terning.domain.intern.entity.InternInfo +import com.terning.domain.intern.repository.InternRepository import com.terning.feature.intern.model.InternUiState import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow diff --git a/feature/src/main/java/com/terning/feature/intern/InternViewSideEffect.kt b/feature/intern/src/main/java/com/terning/feature/intern/InternViewSideEffect.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/intern/InternViewSideEffect.kt rename to feature/intern/src/main/java/com/terning/feature/intern/InternViewSideEffect.kt diff --git a/feature/src/main/java/com/terning/feature/intern/component/InternBottomBar.kt b/feature/intern/src/main/java/com/terning/feature/intern/component/InternBottomBar.kt similarity index 93% rename from feature/src/main/java/com/terning/feature/intern/component/InternBottomBar.kt rename to feature/intern/src/main/java/com/terning/feature/intern/component/InternBottomBar.kt index d61ee10a9..eb50e7b10 100644 --- a/feature/src/main/java/com/terning/feature/intern/component/InternBottomBar.kt +++ b/feature/intern/src/main/java/com/terning/feature/intern/component/InternBottomBar.kt @@ -16,19 +16,18 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel import com.terning.core.analytics.EventType -import com.terning.core.analytics.LocalTracker import com.terning.core.designsystem.component.button.RoundButton +import com.terning.core.designsystem.extension.customShadow +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.Grey150 import com.terning.core.designsystem.theme.Grey350 import com.terning.core.designsystem.theme.Grey400 import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.extension.customShadow -import com.terning.core.extension.noRippleClickable -import com.terning.domain.entity.intern.InternInfo -import com.terning.feature.R +import com.terning.domain.intern.entity.InternInfo import com.terning.feature.intern.InternViewModel +import com.terning.feature.intern.R @Composable fun InternBottomBar( @@ -37,7 +36,7 @@ fun InternBottomBar( onScrapClick: (InternInfo) -> Unit, viewModel: InternViewModel = hiltViewModel(), ) { - val amplitudeTracker = LocalTracker.current + val amplitudeTracker = com.terning.core.analytics.LocalTracker.current Row( modifier = modifier diff --git a/feature/src/main/java/com/terning/feature/intern/component/InternCompanyInfo.kt b/feature/intern/src/main/java/com/terning/feature/intern/component/InternCompanyInfo.kt similarity index 98% rename from feature/src/main/java/com/terning/feature/intern/component/InternCompanyInfo.kt rename to feature/intern/src/main/java/com/terning/feature/intern/component/InternCompanyInfo.kt index 342cf3cb0..92c5f3da9 100644 --- a/feature/src/main/java/com/terning/feature/intern/component/InternCompanyInfo.kt +++ b/feature/intern/src/main/java/com/terning/feature/intern/component/InternCompanyInfo.kt @@ -25,7 +25,7 @@ import com.terning.core.designsystem.theme.Black import com.terning.core.designsystem.theme.Grey150 import com.terning.core.designsystem.theme.Grey350 import com.terning.core.designsystem.theme.TerningTheme -import com.terning.feature.R +import com.terning.feature.intern.R private const val MAX_LINES = 2 diff --git a/feature/src/main/java/com/terning/feature/intern/component/InternInfoRow.kt b/feature/intern/src/main/java/com/terning/feature/intern/component/InternInfoRow.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/intern/component/InternInfoRow.kt rename to feature/intern/src/main/java/com/terning/feature/intern/component/InternInfoRow.kt diff --git a/feature/src/main/java/com/terning/feature/intern/component/InternPageTitle.kt b/feature/intern/src/main/java/com/terning/feature/intern/component/InternPageTitle.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/intern/component/InternPageTitle.kt rename to feature/intern/src/main/java/com/terning/feature/intern/component/InternPageTitle.kt diff --git a/feature/src/main/java/com/terning/feature/intern/component/InternTitle.kt b/feature/intern/src/main/java/com/terning/feature/intern/component/InternTitle.kt similarity index 98% rename from feature/src/main/java/com/terning/feature/intern/component/InternTitle.kt rename to feature/intern/src/main/java/com/terning/feature/intern/component/InternTitle.kt index 0108baf23..1e52a5431 100644 --- a/feature/src/main/java/com/terning/feature/intern/component/InternTitle.kt +++ b/feature/intern/src/main/java/com/terning/feature/intern/component/InternTitle.kt @@ -23,8 +23,7 @@ import com.terning.core.designsystem.theme.Grey375 import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningSub3 import com.terning.core.designsystem.theme.TerningTheme -import com.terning.feature.R - +import com.terning.feature.intern.R @Composable fun InternTitle( diff --git a/feature/src/main/java/com/terning/feature/intern/model/InternScrapState.kt b/feature/intern/src/main/java/com/terning/feature/intern/model/InternScrapState.kt similarity index 71% rename from feature/src/main/java/com/terning/feature/intern/model/InternScrapState.kt rename to feature/intern/src/main/java/com/terning/feature/intern/model/InternScrapState.kt index e5bead58c..549b8f754 100644 --- a/feature/src/main/java/com/terning/feature/intern/model/InternScrapState.kt +++ b/feature/intern/src/main/java/com/terning/feature/intern/model/InternScrapState.kt @@ -1,6 +1,6 @@ package com.terning.feature.intern.model -import com.terning.core.state.UiState +import com.terning.core.designsystem.state.UiState data class InternScrapState( val isScrap: UiState = UiState.Loading, diff --git a/feature/src/main/java/com/terning/feature/intern/model/InternUiState.kt b/feature/intern/src/main/java/com/terning/feature/intern/model/InternUiState.kt similarity index 83% rename from feature/src/main/java/com/terning/feature/intern/model/InternUiState.kt rename to feature/intern/src/main/java/com/terning/feature/intern/model/InternUiState.kt index 0adb2c489..3e69c64a6 100644 --- a/feature/src/main/java/com/terning/feature/intern/model/InternUiState.kt +++ b/feature/intern/src/main/java/com/terning/feature/intern/model/InternUiState.kt @@ -1,9 +1,9 @@ package com.terning.feature.intern.model import androidx.compose.ui.graphics.Color +import com.terning.core.designsystem.state.UiState import com.terning.core.designsystem.theme.CalRed -import com.terning.core.state.UiState -import com.terning.domain.entity.intern.InternInfo +import com.terning.domain.intern.entity.InternInfo data class InternUiState( val loadState: UiState = UiState.Loading, diff --git a/feature/src/main/java/com/terning/feature/intern/navigation/InternNavigation.kt b/feature/intern/src/main/java/com/terning/feature/intern/navigation/InternNavigation.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/intern/navigation/InternNavigation.kt rename to feature/intern/src/main/java/com/terning/feature/intern/navigation/InternNavigation.kt diff --git a/feature/intern/src/main/res/drawable/ic_intern_share_22.xml b/feature/intern/src/main/res/drawable/ic_intern_share_22.xml new file mode 100644 index 000000000..db0f653f7 --- /dev/null +++ b/feature/intern/src/main/res/drawable/ic_intern_share_22.xml @@ -0,0 +1,10 @@ + + + diff --git a/feature/intern/src/main/res/drawable/ic_scrap_false_24.xml b/feature/intern/src/main/res/drawable/ic_scrap_false_24.xml new file mode 100644 index 000000000..ed8cf9471 --- /dev/null +++ b/feature/intern/src/main/res/drawable/ic_scrap_false_24.xml @@ -0,0 +1,13 @@ + + + diff --git a/feature/intern/src/main/res/drawable/ic_scrap_true_24.xml b/feature/intern/src/main/res/drawable/ic_scrap_true_24.xml new file mode 100644 index 000000000..0b884f362 --- /dev/null +++ b/feature/intern/src/main/res/drawable/ic_scrap_true_24.xml @@ -0,0 +1,13 @@ + + + diff --git a/feature/intern/src/main/res/drawable/ic_terning_launcher_background.xml b/feature/intern/src/main/res/drawable/ic_terning_launcher_background.xml new file mode 100644 index 000000000..ca3826a46 --- /dev/null +++ b/feature/intern/src/main/res/drawable/ic_terning_launcher_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/feature/intern/src/main/res/drawable/ic_terning_logo_typo.xml b/feature/intern/src/main/res/drawable/ic_terning_logo_typo.xml new file mode 100644 index 000000000..4e7d72284 --- /dev/null +++ b/feature/intern/src/main/res/drawable/ic_terning_logo_typo.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + diff --git a/feature/intern/src/main/res/drawable/ic_view_count_14.xml b/feature/intern/src/main/res/drawable/ic_view_count_14.xml new file mode 100644 index 000000000..3f6e68ef5 --- /dev/null +++ b/feature/intern/src/main/res/drawable/ic_view_count_14.xml @@ -0,0 +1,20 @@ + + + + diff --git a/feature/intern/src/main/res/values/strings.xml b/feature/intern/src/main/res/values/strings.xml new file mode 100644 index 000000000..3aa6b7841 --- /dev/null +++ b/feature/intern/src/main/res/values/strings.xml @@ -0,0 +1,23 @@ + + + 서버통신에 성공했어요 + 서버통신에 실패했어요 + + + 공유 아이콘 + 지원 사이트로 이동하기 + 공고 상세 정보 + %s회 + 서류 마감 + 근무 기간 + 근무 시작 + 공고 요약 + 자격 요건 + 상세 정보 + 모집대상 + 모집직무 + 관심 공고가 캘린더에 스크랩되었어요! + 관심 공고가 캘린더에서 사라졌어요! + 공고 이미지 + + diff --git a/feature/intern/src/main/res/values/themes.xml b/feature/intern/src/main/res/values/themes.xml new file mode 100644 index 000000000..9e25abbdf --- /dev/null +++ b/feature/intern/src/main/res/values/themes.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/feature/main/.gitignore b/feature/main/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/feature/main/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/feature/main/build.gradle.kts b/feature/main/build.gradle.kts new file mode 100644 index 000000000..2856c5295 --- /dev/null +++ b/feature/main/build.gradle.kts @@ -0,0 +1,24 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.feature) +} + +android { + setNamespace("feature.main") +} + +dependencies { + // feature + implementation(project(":feature:calendar")) + implementation(project(":feature:dialog")) + implementation(project(":feature:filtering")) + implementation(project(":feature:home")) + implementation(project(":feature:intern")) + implementation(project(":feature:mypage")) + implementation(project(":feature:onboarding")) + implementation(project(":feature:search")) + + //domain + implementation(project(":domain:token")) +} \ No newline at end of file diff --git a/feature/main/src/main/AndroidManifest.xml b/feature/main/src/main/AndroidManifest.xml new file mode 100644 index 000000000..b1e06be9c --- /dev/null +++ b/feature/main/src/main/AndroidManifest.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/main/MainActivity.kt b/feature/main/src/main/java/com/terning/feature/main/MainActivity.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/main/MainActivity.kt rename to feature/main/src/main/java/com/terning/feature/main/MainActivity.kt diff --git a/feature/src/main/java/com/terning/feature/main/MainNavigator.kt b/feature/main/src/main/java/com/terning/feature/main/MainNavigator.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/main/MainNavigator.kt rename to feature/main/src/main/java/com/terning/feature/main/MainNavigator.kt diff --git a/feature/src/main/java/com/terning/feature/main/MainScreen.kt b/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt similarity index 62% rename from feature/src/main/java/com/terning/feature/main/MainScreen.kt rename to feature/main/src/main/java/com/terning/feature/main/MainScreen.kt index 3f83c0718..2f28f4a4f 100644 --- a/feature/src/main/java/com/terning/feature/main/MainScreen.kt +++ b/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt @@ -1,6 +1,7 @@ package com.terning.feature.main import android.app.Activity +import android.content.Intent import androidx.activity.compose.BackHandler import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.EnterTransition @@ -33,31 +34,38 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.IntOffset import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp +import androidx.navigation.NavOptions import androidx.navigation.compose.NavHost +import androidx.navigation.navOptions import com.terning.core.analytics.EventType -import com.terning.core.analytics.LocalTracker import com.terning.core.designsystem.component.snackbar.TerningBasicSnackBar import com.terning.core.designsystem.theme.Grey300 import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.White -import com.terning.core.util.NoRippleInteractionSource +import com.terning.core.designsystem.util.NoRippleInteractionSource import com.terning.feature.calendar.calendar.navigation.calendarNavGraph -import com.terning.feature.filtering.filtering.navigation.filteringOneNavGraph -import com.terning.feature.filtering.filtering.navigation.filteringTwoNavGraph +import com.terning.feature.filtering.filteringone.navigation.filteringOneNavGraph import com.terning.feature.filtering.filteringthree.navigation.filteringThreeNavGraph +import com.terning.feature.filtering.filteringtwo.navigation.filteringTwoNavGraph +import com.terning.feature.filtering.startfiltering.navigation.navigateStartFiltering import com.terning.feature.filtering.startfiltering.navigation.startFilteringNavGraph import com.terning.feature.filtering.starthome.navigation.startHomeNavGraph import com.terning.feature.home.navigation.homeNavGraph +import com.terning.feature.home.navigation.navigateHome import com.terning.feature.intern.navigation.internNavGraph +import com.terning.feature.intern.navigation.navigateIntern import com.terning.feature.mypage.mypage.navigation.myPageNavGraph import com.terning.feature.mypage.profileedit.navigation.profileEditNavGraph +import com.terning.feature.onboarding.signin.navigation.navigateSignIn import com.terning.feature.onboarding.signin.navigation.signInNavGraph +import com.terning.feature.onboarding.signup.navigation.navigateSignUp import com.terning.feature.onboarding.signup.navigation.signUpNavGraph +import com.terning.feature.onboarding.splash.navigation.Splash import com.terning.feature.onboarding.splash.navigation.splashNavGraph import com.terning.feature.search.search.navigation.searchNavGraph +import com.terning.feature.search.searchprocess.navigation.navigateSearchProcess import com.terning.feature.search.searchprocess.navigation.searchProcessNavGraph import kotlinx.coroutines.launch -import org.openjdk.tools.javac.Main @Composable fun MainScreen( @@ -70,7 +78,7 @@ fun MainScreen( val snackBarHostState = remember { SnackbarHostState() } val coroutineScope = rememberCoroutineScope() - val amplitudeTracker = LocalTracker.current + val amplitudeTracker = com.terning.core.analytics.LocalTracker.current BackHandler(enabled = backPressedState) { if (System.currentTimeMillis() - backPressedTime <= 3000) { @@ -140,36 +148,113 @@ fun MainScreen( navController = navigator.navController, startDestination = navigator.startDestination ) { - splashNavGraph(navHostController = navigator.navController) + splashNavGraph( + navigateHome = { + navigator.navController.navigateHome( + navOptions = NavOptions.Builder().setPopUpTo( + route = Splash, + inclusive = true + ).build() + ) + }, + navigateSignIn = { + navigator.navController.navigateSignIn( + navOptions = NavOptions.Builder().setPopUpTo( + route = Splash, + inclusive = true + ).build() + ) + } + ) homeNavGraph( paddingValues = paddingValues, - navHostController = navigator.navController + navHostController = navigator.navController, + navigateToCalendar = { navigator.navController.navigateHome() }, + navigateToIntern = { announcementId -> + navigator.navController.navigateIntern(announcementId) + } ) calendarNavGraph( paddingValues = paddingValues, - navHostController = navigator.navController + navigateIntern = { announcementId -> + navigator.navController.navigateIntern(announcementId) + } ) searchNavGraph( paddingValues = paddingValues, - navHostController = navigator.navController + navigateSearchProcess = { navigator.navController.navigateSearchProcess() }, + navigateIntern = { announcementId -> + navigator.navController.navigateIntern(announcementId) + } + ) + signInNavGraph( + navigateHome = { + val navOptions = navOptions { + popUpTo(id = navigator.navController.graph.id) { + inclusive = true + } + } + navigator.navController.navigateHome(navOptions) + }, + navigateSignUp = { authId -> + val navOptions = navOptions { + popUpTo(id = navigator.navController.graph.id) { + inclusive = true + } + } + navigator.navController.navigateSignUp( + authId = authId, + navOptions = navOptions + ) + } + ) + signUpNavGraph( + navigateStartFiltering = { name -> + val navOptions = navOptions { + popUpTo(id = navigator.navController.graph.id) { + inclusive = true + } + } + navigator.navController.navigateStartFiltering( + name = name, + navOptions = navOptions + ) + } ) - signInNavGraph(navHostController = navigator.navController) - signUpNavGraph(navHostController = navigator.navController) startFilteringNavGraph(navHostController = navigator.navController) - startHomeNavGraph(navHostController = navigator.navController) + startHomeNavGraph( + navigateHome = { + val navOptions = navOptions { + popUpTo(id = navigator.navController.graph.id) { + inclusive = true + } + } + navigator.navController.navigateHome(navOptions) + } + ) filteringOneNavGraph(navHostController = navigator.navController) filteringTwoNavGraph(navHostController = navigator.navController) filteringThreeNavGraph(navHostController = navigator.navController) searchProcessNavGraph( paddingValues = paddingValues, - navHostController = navigator.navController + navHostController = navigator.navController, + navigateIntern = { internshipAnnouncementId -> + navigator.navController.navigateIntern(internshipAnnouncementId) + } ) internNavGraph( navHostController = navigator.navController ) myPageNavGraph( paddingValues = paddingValues, - navHostController = navigator.navController + navHostController = navigator.navController, + restartApp = { + Intent(context, MainActivity::class.java).apply { + addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK) + addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + context.startActivity(this) + } + } ) profileEditNavGraph(navHostController = navigator.navController) } diff --git a/feature/src/main/java/com/terning/feature/main/MainTab.kt b/feature/main/src/main/java/com/terning/feature/main/MainTab.kt similarity index 98% rename from feature/src/main/java/com/terning/feature/main/MainTab.kt rename to feature/main/src/main/java/com/terning/feature/main/MainTab.kt index fe0ebf4a2..5d0868749 100644 --- a/feature/src/main/java/com/terning/feature/main/MainTab.kt +++ b/feature/main/src/main/java/com/terning/feature/main/MainTab.kt @@ -5,7 +5,6 @@ import androidx.annotation.StringRes import androidx.compose.runtime.Composable import com.terning.core.navigation.MainTabRoute import com.terning.core.navigation.Route -import com.terning.feature.R import com.terning.feature.calendar.calendar.navigation.Calendar import com.terning.feature.home.navigation.Home import com.terning.feature.mypage.mypage.navigation.MyPage diff --git a/feature/main/src/main/res/drawable/ic_nav_calendar.xml b/feature/main/src/main/res/drawable/ic_nav_calendar.xml new file mode 100644 index 000000000..18d8a7c30 --- /dev/null +++ b/feature/main/src/main/res/drawable/ic_nav_calendar.xml @@ -0,0 +1,9 @@ + + + diff --git a/feature/main/src/main/res/drawable/ic_nav_home.xml b/feature/main/src/main/res/drawable/ic_nav_home.xml new file mode 100644 index 000000000..9b5f41b94 --- /dev/null +++ b/feature/main/src/main/res/drawable/ic_nav_home.xml @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/feature/main/src/main/res/drawable/ic_nav_my_page.xml b/feature/main/src/main/res/drawable/ic_nav_my_page.xml new file mode 100644 index 000000000..9265715c0 --- /dev/null +++ b/feature/main/src/main/res/drawable/ic_nav_my_page.xml @@ -0,0 +1,9 @@ + + + diff --git a/feature/main/src/main/res/drawable/ic_nav_search.xml b/feature/main/src/main/res/drawable/ic_nav_search.xml new file mode 100644 index 000000000..ce3fd2fbd --- /dev/null +++ b/feature/main/src/main/res/drawable/ic_nav_search.xml @@ -0,0 +1,20 @@ + + + + diff --git a/feature/main/src/main/res/mipmap-anydpi-v26/ic_terning_launcher.xml b/feature/main/src/main/res/mipmap-anydpi-v26/ic_terning_launcher.xml new file mode 100644 index 000000000..ee8b7e363 --- /dev/null +++ b/feature/main/src/main/res/mipmap-anydpi-v26/ic_terning_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/feature/main/src/main/res/mipmap-anydpi-v26/ic_terning_launcher_round.xml b/feature/main/src/main/res/mipmap-anydpi-v26/ic_terning_launcher_round.xml new file mode 100644 index 000000000..ee8b7e363 --- /dev/null +++ b/feature/main/src/main/res/mipmap-anydpi-v26/ic_terning_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/feature/main/src/main/res/mipmap-hdpi/ic_terning_launcher.webp b/feature/main/src/main/res/mipmap-hdpi/ic_terning_launcher.webp new file mode 100644 index 000000000..d25fb5e4f Binary files /dev/null and b/feature/main/src/main/res/mipmap-hdpi/ic_terning_launcher.webp differ diff --git a/feature/main/src/main/res/mipmap-hdpi/ic_terning_launcher_foreground.webp b/feature/main/src/main/res/mipmap-hdpi/ic_terning_launcher_foreground.webp new file mode 100644 index 000000000..7ea3ea9c8 Binary files /dev/null and b/feature/main/src/main/res/mipmap-hdpi/ic_terning_launcher_foreground.webp differ diff --git a/feature/main/src/main/res/mipmap-hdpi/ic_terning_launcher_round.webp b/feature/main/src/main/res/mipmap-hdpi/ic_terning_launcher_round.webp new file mode 100644 index 000000000..78dcb435d Binary files /dev/null and b/feature/main/src/main/res/mipmap-hdpi/ic_terning_launcher_round.webp differ diff --git a/feature/main/src/main/res/mipmap-mdpi/ic_terning_launcher.webp b/feature/main/src/main/res/mipmap-mdpi/ic_terning_launcher.webp new file mode 100644 index 000000000..98d4dac64 Binary files /dev/null and b/feature/main/src/main/res/mipmap-mdpi/ic_terning_launcher.webp differ diff --git a/feature/main/src/main/res/mipmap-mdpi/ic_terning_launcher_foreground.webp b/feature/main/src/main/res/mipmap-mdpi/ic_terning_launcher_foreground.webp new file mode 100644 index 000000000..3b8a25353 Binary files /dev/null and b/feature/main/src/main/res/mipmap-mdpi/ic_terning_launcher_foreground.webp differ diff --git a/feature/main/src/main/res/mipmap-mdpi/ic_terning_launcher_round.webp b/feature/main/src/main/res/mipmap-mdpi/ic_terning_launcher_round.webp new file mode 100644 index 000000000..8b24ed168 Binary files /dev/null and b/feature/main/src/main/res/mipmap-mdpi/ic_terning_launcher_round.webp differ diff --git a/feature/main/src/main/res/mipmap-xhdpi/ic_terning_launcher.webp b/feature/main/src/main/res/mipmap-xhdpi/ic_terning_launcher.webp new file mode 100644 index 000000000..92e791122 Binary files /dev/null and b/feature/main/src/main/res/mipmap-xhdpi/ic_terning_launcher.webp differ diff --git a/feature/main/src/main/res/mipmap-xhdpi/ic_terning_launcher_foreground.webp b/feature/main/src/main/res/mipmap-xhdpi/ic_terning_launcher_foreground.webp new file mode 100644 index 000000000..269a4f060 Binary files /dev/null and b/feature/main/src/main/res/mipmap-xhdpi/ic_terning_launcher_foreground.webp differ diff --git a/feature/main/src/main/res/mipmap-xhdpi/ic_terning_launcher_round.webp b/feature/main/src/main/res/mipmap-xhdpi/ic_terning_launcher_round.webp new file mode 100644 index 000000000..7e72542f1 Binary files /dev/null and b/feature/main/src/main/res/mipmap-xhdpi/ic_terning_launcher_round.webp differ diff --git a/feature/main/src/main/res/mipmap-xxhdpi/ic_terning_launcher.webp b/feature/main/src/main/res/mipmap-xxhdpi/ic_terning_launcher.webp new file mode 100644 index 000000000..082e008df Binary files /dev/null and b/feature/main/src/main/res/mipmap-xxhdpi/ic_terning_launcher.webp differ diff --git a/feature/main/src/main/res/mipmap-xxhdpi/ic_terning_launcher_foreground.webp b/feature/main/src/main/res/mipmap-xxhdpi/ic_terning_launcher_foreground.webp new file mode 100644 index 000000000..85e61f3ba Binary files /dev/null and b/feature/main/src/main/res/mipmap-xxhdpi/ic_terning_launcher_foreground.webp differ diff --git a/feature/main/src/main/res/mipmap-xxhdpi/ic_terning_launcher_round.webp b/feature/main/src/main/res/mipmap-xxhdpi/ic_terning_launcher_round.webp new file mode 100644 index 000000000..172498a96 Binary files /dev/null and b/feature/main/src/main/res/mipmap-xxhdpi/ic_terning_launcher_round.webp differ diff --git a/feature/main/src/main/res/mipmap-xxxhdpi/ic_terning_launcher.webp b/feature/main/src/main/res/mipmap-xxxhdpi/ic_terning_launcher.webp new file mode 100644 index 000000000..2960f176f Binary files /dev/null and b/feature/main/src/main/res/mipmap-xxxhdpi/ic_terning_launcher.webp differ diff --git a/feature/main/src/main/res/mipmap-xxxhdpi/ic_terning_launcher_foreground.webp b/feature/main/src/main/res/mipmap-xxxhdpi/ic_terning_launcher_foreground.webp new file mode 100644 index 000000000..58ba405c9 Binary files /dev/null and b/feature/main/src/main/res/mipmap-xxxhdpi/ic_terning_launcher_foreground.webp differ diff --git a/feature/main/src/main/res/mipmap-xxxhdpi/ic_terning_launcher_round.webp b/feature/main/src/main/res/mipmap-xxxhdpi/ic_terning_launcher_round.webp new file mode 100644 index 000000000..58fe9aff8 Binary files /dev/null and b/feature/main/src/main/res/mipmap-xxxhdpi/ic_terning_launcher_round.webp differ diff --git a/feature/main/src/main/res/values/strings.xml b/feature/main/src/main/res/values/strings.xml new file mode 100644 index 000000000..7c269044a --- /dev/null +++ b/feature/main/src/main/res/values/strings.xml @@ -0,0 +1,11 @@ + + + terning + + + + 캘린더 + 탐색 + 마이페이지 + + diff --git a/feature/main/src/main/res/values/themes.xml b/feature/main/src/main/res/values/themes.xml new file mode 100644 index 000000000..9e25abbdf --- /dev/null +++ b/feature/main/src/main/res/values/themes.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/feature/mypage/.gitignore b/feature/mypage/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/feature/mypage/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/feature/mypage/build.gradle.kts b/feature/mypage/build.gradle.kts new file mode 100644 index 000000000..4a18307fb --- /dev/null +++ b/feature/mypage/build.gradle.kts @@ -0,0 +1,24 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.feature) +} + +android { + setNamespace("feature.mypage") + + defaultConfig { + buildConfigField("String", "VERSION_NAME", "\"${libs.versions.versionName.get()}\"") + } + buildFeatures { + buildConfig = true + } +} + +dependencies { + // domain + implementation(project(":domain:mypage")) + implementation(project(":domain:token")) + + implementation(libs.kakao.user) +} \ No newline at end of file diff --git a/feature/mypage/src/main/AndroidManifest.xml b/feature/mypage/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/feature/mypage/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/mypage/mypage/MyPageRoute.kt b/feature/mypage/src/main/java/com/terning/feature/mypage/mypage/MyPageRoute.kt similarity index 94% rename from feature/src/main/java/com/terning/feature/mypage/mypage/MyPageRoute.kt rename to feature/mypage/src/main/java/com/terning/feature/mypage/mypage/MyPageRoute.kt index 69eb6be81..e5184c8fd 100644 --- a/feature/src/main/java/com/terning/feature/mypage/mypage/MyPageRoute.kt +++ b/feature/mypage/src/main/java/com/terning/feature/mypage/mypage/MyPageRoute.kt @@ -1,7 +1,6 @@ package com.terning.feature.mypage.mypage import android.content.Context -import android.content.Intent import androidx.browser.customtabs.CustomTabsIntent import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -35,10 +34,12 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.flowWithLifecycle import com.google.accompanist.systemuicontroller.rememberSystemUiController import com.terning.core.analytics.EventType -import com.terning.core.analytics.LocalTracker import com.terning.core.designsystem.component.bottomsheet.MyPageLogoutBottomSheet import com.terning.core.designsystem.component.bottomsheet.MyPageQuitBottomSheet import com.terning.core.designsystem.component.image.TerningImage +import com.terning.core.designsystem.extension.noRippleClickable +import com.terning.core.designsystem.extension.toast +import com.terning.core.designsystem.state.UiState import com.terning.core.designsystem.theme.Back import com.terning.core.designsystem.theme.Grey150 import com.terning.core.designsystem.theme.Grey350 @@ -46,14 +47,10 @@ import com.terning.core.designsystem.theme.Grey400 import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.extension.noRippleClickable -import com.terning.core.extension.toast -import com.terning.core.state.UiState -import com.terning.feature.BuildConfig -import com.terning.feature.R -import com.terning.feature.main.MainActivity -import com.terning.feature.mypage.component.MyPageProfile +import com.terning.feature.mypage.BuildConfig.VERSION_NAME +import com.terning.feature.mypage.R import com.terning.feature.mypage.mypage.component.MyPageItem +import com.terning.feature.mypage.mypage.component.MyPageProfile import com.terning.feature.mypage.mypage.util.MyPageDefaults.NOTICE_URL import com.terning.feature.mypage.mypage.util.MyPageDefaults.OPINION_URL import com.terning.feature.mypage.mypage.util.MyPageDefaults.PERSONAL_URL @@ -64,6 +61,7 @@ fun MyPageRoute( paddingValues: PaddingValues, navigateToProfileEdit: (String, String, String) -> Unit, viewModel: MyPageViewModel = hiltViewModel(), + restartApp: () -> Unit ) { val state by viewModel.state.collectAsStateWithLifecycle() val context = LocalContext.current @@ -71,7 +69,7 @@ fun MyPageRoute( val systemUiController = rememberSystemUiController() - val amplitudeTracker = LocalTracker.current + val amplitudeTracker = com.terning.core.analytics.LocalTracker.current SideEffect { systemUiController.setStatusBarColor( @@ -109,7 +107,7 @@ fun MyPageRoute( context ) - is MyPageSideEffect.RestartApp -> restartApp(context) + is MyPageSideEffect.RestartApp -> restartApp() } } } @@ -174,8 +172,8 @@ fun MyPageRoute( ) } - is UiState.Loading -> {} - is UiState.Empty -> {} + UiState.Loading -> {} + UiState.Empty -> {} is UiState.Failure -> { MyPageScreen( paddingValues = paddingValues, @@ -416,7 +414,7 @@ fun ServiceInfo( ) MyPageItem( text = stringResource(id = R.string.my_page_version), - version = BuildConfig.VERSION_NAME, + version = VERSION_NAME, icon = R.drawable.ic_my_page_version ) } @@ -439,14 +437,6 @@ private fun navigateToPersonalWebView(context: Context) { CustomTabsIntent.Builder().build().launchUrl(context, PERSONAL_URL.toUri()) } -private fun restartApp(context: Context) { - Intent(context, MainActivity::class.java).apply { - addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK) - addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - context.startActivity(this) - } -} - @Preview(showBackground = true) @Composable fun MyPageScreenPreview() { diff --git a/feature/src/main/java/com/terning/feature/mypage/mypage/MyPageSideEffect.kt b/feature/mypage/src/main/java/com/terning/feature/mypage/mypage/MyPageSideEffect.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/mypage/mypage/MyPageSideEffect.kt rename to feature/mypage/src/main/java/com/terning/feature/mypage/mypage/MyPageSideEffect.kt diff --git a/feature/src/main/java/com/terning/feature/mypage/mypage/MyPageState.kt b/feature/mypage/src/main/java/com/terning/feature/mypage/mypage/MyPageState.kt similarity index 90% rename from feature/src/main/java/com/terning/feature/mypage/mypage/MyPageState.kt rename to feature/mypage/src/main/java/com/terning/feature/mypage/mypage/MyPageState.kt index e53a43dd3..d6a9722fa 100644 --- a/feature/src/main/java/com/terning/feature/mypage/mypage/MyPageState.kt +++ b/feature/mypage/src/main/java/com/terning/feature/mypage/mypage/MyPageState.kt @@ -1,6 +1,6 @@ package com.terning.feature.mypage.mypage -import com.terning.core.state.UiState +import com.terning.core.designsystem.state.UiState data class MyPageState( val isGetSuccess: UiState = UiState.Loading, diff --git a/feature/src/main/java/com/terning/feature/mypage/mypage/MyPageViewModel.kt b/feature/mypage/src/main/java/com/terning/feature/mypage/mypage/MyPageViewModel.kt similarity index 95% rename from feature/src/main/java/com/terning/feature/mypage/mypage/MyPageViewModel.kt rename to feature/mypage/src/main/java/com/terning/feature/mypage/mypage/MyPageViewModel.kt index d26ec9575..8ddb2416f 100644 --- a/feature/src/main/java/com/terning/feature/mypage/mypage/MyPageViewModel.kt +++ b/feature/mypage/src/main/java/com/terning/feature/mypage/mypage/MyPageViewModel.kt @@ -3,10 +3,10 @@ package com.terning.feature.mypage.mypage import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.kakao.sdk.user.UserApiClient -import com.terning.core.state.UiState -import com.terning.domain.repository.MyPageRepository -import com.terning.domain.repository.TokenRepository -import com.terning.feature.R +import com.terning.core.designsystem.state.UiState +import com.terning.domain.mypage.repository.MyPageRepository +import com.terning.domain.token.repository.TokenRepository +import com.terning.feature.mypage.R import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow diff --git a/feature/src/main/java/com/terning/feature/mypage/mypage/component/MyPageItem.kt b/feature/mypage/src/main/java/com/terning/feature/mypage/mypage/component/MyPageItem.kt similarity index 95% rename from feature/src/main/java/com/terning/feature/mypage/mypage/component/MyPageItem.kt rename to feature/mypage/src/main/java/com/terning/feature/mypage/mypage/component/MyPageItem.kt index 6867459f0..cdfbd27e2 100644 --- a/feature/src/main/java/com/terning/feature/mypage/mypage/component/MyPageItem.kt +++ b/feature/mypage/src/main/java/com/terning/feature/mypage/mypage/component/MyPageItem.kt @@ -14,11 +14,11 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.terning.core.designsystem.component.image.TerningImage +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.Grey350 import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme -import com.terning.core.extension.noRippleClickable -import com.terning.feature.R +import com.terning.feature.mypage.R @Composable fun MyPageItem( diff --git a/feature/src/main/java/com/terning/feature/mypage/mypage/component/MyPageProfile.kt b/feature/mypage/src/main/java/com/terning/feature/mypage/mypage/component/MyPageProfile.kt similarity index 87% rename from feature/src/main/java/com/terning/feature/mypage/mypage/component/MyPageProfile.kt rename to feature/mypage/src/main/java/com/terning/feature/mypage/mypage/component/MyPageProfile.kt index a0d985004..7fba8c117 100644 --- a/feature/src/main/java/com/terning/feature/mypage/mypage/component/MyPageProfile.kt +++ b/feature/mypage/src/main/java/com/terning/feature/mypage/mypage/component/MyPageProfile.kt @@ -1,4 +1,4 @@ -package com.terning.feature.mypage.component +package com.terning.feature.mypage.mypage.component import androidx.compose.foundation.Image import androidx.compose.foundation.layout.aspectRatio @@ -9,8 +9,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.res.painterResource import androidx.compose.ui.unit.dp -import com.terning.core.R -import com.terning.core.type.ProfileImage +import com.terning.core.designsystem.type.ProfileImage @Composable fun MyPageProfile( diff --git a/feature/src/main/java/com/terning/feature/mypage/mypage/navigation/MyPageNavigation.kt b/feature/mypage/src/main/java/com/terning/feature/mypage/mypage/navigation/MyPageNavigation.kt similarity index 93% rename from feature/src/main/java/com/terning/feature/mypage/mypage/navigation/MyPageNavigation.kt rename to feature/mypage/src/main/java/com/terning/feature/mypage/mypage/navigation/MyPageNavigation.kt index 30d7de08b..75eee3c71 100644 --- a/feature/src/main/java/com/terning/feature/mypage/mypage/navigation/MyPageNavigation.kt +++ b/feature/mypage/src/main/java/com/terning/feature/mypage/mypage/navigation/MyPageNavigation.kt @@ -21,6 +21,7 @@ fun NavController.navigateMyPage(navOptions: NavOptions? = null) { fun NavGraphBuilder.myPageNavGraph( paddingValues: PaddingValues, navHostController: NavHostController, + restartApp: () -> Unit ) { composable { MyPageRoute( @@ -31,7 +32,8 @@ fun NavGraphBuilder.myPageNavGraph( profileImage, authType ) - } + }, + restartApp = restartApp ) } } diff --git a/feature/src/main/java/com/terning/feature/mypage/mypage/util/MyPageDefaults.kt b/feature/mypage/src/main/java/com/terning/feature/mypage/mypage/util/MyPageDefaults.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/mypage/mypage/util/MyPageDefaults.kt rename to feature/mypage/src/main/java/com/terning/feature/mypage/mypage/util/MyPageDefaults.kt diff --git a/feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditRoute.kt b/feature/mypage/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditRoute.kt similarity index 97% rename from feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditRoute.kt rename to feature/mypage/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditRoute.kt index 3c05b18cd..e3fae490b 100644 --- a/feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditRoute.kt +++ b/feature/mypage/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditRoute.kt @@ -30,14 +30,14 @@ import com.terning.core.designsystem.component.button.RectangleButton import com.terning.core.designsystem.component.item.ProfileWithPlusButton import com.terning.core.designsystem.component.textfield.NameTextField import com.terning.core.designsystem.component.topappbar.BackButtonTopAppBar +import com.terning.core.designsystem.extension.addFocusCleaner +import com.terning.core.designsystem.extension.noRippleClickable +import com.terning.core.designsystem.extension.toast import com.terning.core.designsystem.theme.Grey500 import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.extension.addFocusCleaner -import com.terning.core.extension.noRippleClickable -import com.terning.core.extension.toast -import com.terning.feature.R +import com.terning.feature.mypage.R @Composable fun ProfileEditRoute( diff --git a/feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditSideEffect.kt b/feature/mypage/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditSideEffect.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditSideEffect.kt rename to feature/mypage/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditSideEffect.kt diff --git a/feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditState.kt b/feature/mypage/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditState.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditState.kt rename to feature/mypage/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditState.kt diff --git a/feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditViewModel.kt b/feature/mypage/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditViewModel.kt similarity index 93% rename from feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditViewModel.kt rename to feature/mypage/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditViewModel.kt index 340677618..20f8cb784 100644 --- a/feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditViewModel.kt +++ b/feature/mypage/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditViewModel.kt @@ -2,9 +2,8 @@ package com.terning.feature.mypage.profileedit import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.terning.domain.entity.mypage.MyPageProfileEdit -import com.terning.domain.repository.MyPageRepository -import com.terning.feature.R +import com.terning.domain.mypage.entity.MyPageProfileEdit +import com.terning.feature.mypage.R import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow @@ -17,7 +16,7 @@ import javax.inject.Inject @HiltViewModel class ProfileEditViewModel @Inject constructor( - private val myPageRepository: MyPageRepository, + private val myPageRepository: com.terning.domain.mypage.repository.MyPageRepository, ) : ViewModel() { private val _state: MutableStateFlow = MutableStateFlow(ProfileEditState()) diff --git a/feature/src/main/java/com/terning/feature/mypage/profileedit/navigation/ProfileEditNavigation.kt b/feature/mypage/src/main/java/com/terning/feature/mypage/profileedit/navigation/ProfileEditNavigation.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/mypage/profileedit/navigation/ProfileEditNavigation.kt rename to feature/mypage/src/main/java/com/terning/feature/mypage/profileedit/navigation/ProfileEditNavigation.kt diff --git a/feature/mypage/src/main/res/drawable/ic_my_page_divider.xml b/feature/mypage/src/main/res/drawable/ic_my_page_divider.xml new file mode 100644 index 000000000..b23370790 --- /dev/null +++ b/feature/mypage/src/main/res/drawable/ic_my_page_divider.xml @@ -0,0 +1,9 @@ + + + diff --git a/feature/mypage/src/main/res/drawable/ic_my_page_go_detail.xml b/feature/mypage/src/main/res/drawable/ic_my_page_go_detail.xml new file mode 100644 index 000000000..fae79708c --- /dev/null +++ b/feature/mypage/src/main/res/drawable/ic_my_page_go_detail.xml @@ -0,0 +1,13 @@ + + + diff --git a/feature/mypage/src/main/res/drawable/ic_my_page_go_edit.xml b/feature/mypage/src/main/res/drawable/ic_my_page_go_edit.xml new file mode 100644 index 000000000..35d152e62 --- /dev/null +++ b/feature/mypage/src/main/res/drawable/ic_my_page_go_edit.xml @@ -0,0 +1,9 @@ + + + diff --git a/feature/mypage/src/main/res/drawable/ic_my_page_line.xml b/feature/mypage/src/main/res/drawable/ic_my_page_line.xml new file mode 100644 index 000000000..1874485b5 --- /dev/null +++ b/feature/mypage/src/main/res/drawable/ic_my_page_line.xml @@ -0,0 +1,12 @@ + + + diff --git a/feature/mypage/src/main/res/drawable/ic_my_page_notice.xml b/feature/mypage/src/main/res/drawable/ic_my_page_notice.xml new file mode 100644 index 000000000..3e56590a0 --- /dev/null +++ b/feature/mypage/src/main/res/drawable/ic_my_page_notice.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/feature/mypage/src/main/res/drawable/ic_my_page_opinion.xml b/feature/mypage/src/main/res/drawable/ic_my_page_opinion.xml new file mode 100644 index 000000000..848db9d9a --- /dev/null +++ b/feature/mypage/src/main/res/drawable/ic_my_page_opinion.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/feature/mypage/src/main/res/drawable/ic_my_page_personal.xml b/feature/mypage/src/main/res/drawable/ic_my_page_personal.xml new file mode 100644 index 000000000..62f540bf0 --- /dev/null +++ b/feature/mypage/src/main/res/drawable/ic_my_page_personal.xml @@ -0,0 +1,27 @@ + + + + + + + + + diff --git a/feature/mypage/src/main/res/drawable/ic_my_page_service.xml b/feature/mypage/src/main/res/drawable/ic_my_page_service.xml new file mode 100644 index 000000000..ea3583ef0 --- /dev/null +++ b/feature/mypage/src/main/res/drawable/ic_my_page_service.xml @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/feature/mypage/src/main/res/drawable/ic_my_page_version.xml b/feature/mypage/src/main/res/drawable/ic_my_page_version.xml new file mode 100644 index 000000000..1d70ec4c2 --- /dev/null +++ b/feature/mypage/src/main/res/drawable/ic_my_page_version.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/feature/mypage/src/main/res/drawable/ic_terning_launcher_background.xml b/feature/mypage/src/main/res/drawable/ic_terning_launcher_background.xml new file mode 100644 index 000000000..ca3826a46 --- /dev/null +++ b/feature/mypage/src/main/res/drawable/ic_terning_launcher_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/feature/mypage/src/main/res/values/strings.xml b/feature/mypage/src/main/res/values/strings.xml new file mode 100644 index 000000000..3b3d55e96 --- /dev/null +++ b/feature/mypage/src/main/res/values/strings.xml @@ -0,0 +1,31 @@ + + + 서버통신에 성공했어요 + 서버통신에 실패했어요 + + + 프로필 이미지 + 프로필 버튼 + 닉네임 + 닉네임을 입력해 주세요 + 다음으로 + + + 로그아웃 + 탈퇴하기 + 프로필 수정 + 터닝 커뮤니티 + 공지사항 + 의견보내기 + 서비스 정보 + 서비스 이용약관 + 개인정보 처리방침 + 버전정보 + + + 프로필 수정 + 저장하기 + 연동 계정 + 카카오 로그인 + + diff --git a/feature/mypage/src/main/res/values/themes.xml b/feature/mypage/src/main/res/values/themes.xml new file mode 100644 index 000000000..9e25abbdf --- /dev/null +++ b/feature/mypage/src/main/res/values/themes.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/feature/onboarding/.gitignore b/feature/onboarding/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/feature/onboarding/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/feature/onboarding/build.gradle.kts b/feature/onboarding/build.gradle.kts new file mode 100644 index 000000000..3eb365d1f --- /dev/null +++ b/feature/onboarding/build.gradle.kts @@ -0,0 +1,17 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.feature) +} + +android { + setNamespace("feature.onboarding") +} + +dependencies { + // domain + implementation(project(":domain:auth")) + implementation(project(":domain:token")) + + implementation(libs.kakao.user) +} \ No newline at end of file diff --git a/feature/onboarding/src/main/AndroidManifest.xml b/feature/onboarding/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/feature/onboarding/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/onboarding/signin/SignInRoute.kt b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signin/SignInRoute.kt similarity index 95% rename from feature/src/main/java/com/terning/feature/onboarding/signin/SignInRoute.kt rename to feature/onboarding/src/main/java/com/terning/feature/onboarding/signin/SignInRoute.kt index d4ce53fbf..26a3fbe33 100644 --- a/feature/src/main/java/com/terning/feature/onboarding/signin/SignInRoute.kt +++ b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signin/SignInRoute.kt @@ -30,10 +30,10 @@ import com.airbnb.lottie.compose.rememberLottieComposition import com.google.accompanist.systemuicontroller.rememberSystemUiController import com.kakao.sdk.auth.model.OAuthToken import com.kakao.sdk.user.UserApiClient +import com.terning.core.designsystem.extension.toast import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.White -import com.terning.core.extension.toast -import com.terning.feature.R +import com.terning.feature.onboarding.R import com.terning.feature.onboarding.signin.component.KakaoButton @Composable @@ -64,7 +64,7 @@ fun SignInRoute( is SignInSideEffect.ShowToast -> context.toast(sideEffect.message) is SignInSideEffect.NavigateToHome -> navigateToHome() is SignInSideEffect.NavigateSignUp -> navigateToSignUp(sideEffect.authId) - is SignInSideEffect.StartKakaoTalkLogin -> startKakoTalkLogIn(context = context) { token, error -> + is SignInSideEffect.StartKakaoTalkLogin -> startKakaoTalkLogIn(context = context) { token, error -> viewModel.signInResult(token = token, error = error) } @@ -124,7 +124,9 @@ fun SignInScreen( @Composable private fun SignInLottie() { - val lottieComposition by rememberLottieComposition(LottieCompositionSpec.Asset("terning_sign_in.json")) + val lottieComposition by rememberLottieComposition( + LottieCompositionSpec.RawRes(R.raw.terning_sign_in) + ) LottieAnimation( modifier = Modifier .fillMaxWidth() @@ -138,7 +140,7 @@ private fun SignInLottie() { ) } -private fun startKakoTalkLogIn( +private fun startKakaoTalkLogIn( context: Context, signInResult: (OAuthToken?, Throwable?) -> Unit, ) { diff --git a/feature/src/main/java/com/terning/feature/onboarding/signin/SignInSideEffect.kt b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signin/SignInSideEffect.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/onboarding/signin/SignInSideEffect.kt rename to feature/onboarding/src/main/java/com/terning/feature/onboarding/signin/SignInSideEffect.kt diff --git a/feature/src/main/java/com/terning/feature/onboarding/signin/SignInViewModel.kt b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signin/SignInViewModel.kt similarity index 92% rename from feature/src/main/java/com/terning/feature/onboarding/signin/SignInViewModel.kt rename to feature/onboarding/src/main/java/com/terning/feature/onboarding/signin/SignInViewModel.kt index 7fb686355..1a33a4b71 100644 --- a/feature/src/main/java/com/terning/feature/onboarding/signin/SignInViewModel.kt +++ b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signin/SignInViewModel.kt @@ -5,10 +5,10 @@ import androidx.lifecycle.viewModelScope import com.kakao.sdk.auth.model.OAuthToken import com.kakao.sdk.common.model.ClientError import com.kakao.sdk.common.model.ClientErrorCause -import com.terning.domain.entity.onboarding.SignInRequest -import com.terning.domain.repository.AuthRepository -import com.terning.domain.repository.TokenRepository -import com.terning.feature.R +import com.terning.domain.auth.entity.SignInRequest +import com.terning.domain.auth.repository.AuthRepository +import com.terning.domain.token.repository.TokenRepository +import com.terning.feature.onboarding.R import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.SharedFlow @@ -63,7 +63,7 @@ class SignInViewModel @Inject constructor( ) { authRepository.postSignIn( accessToken, - SignInRequest(authType = authType) + SignInRequest(authType = authType) ).onSuccess { response -> when { response.accessToken == null -> _signInSideEffects.emit( diff --git a/feature/src/main/java/com/terning/feature/onboarding/signin/component/KakaoButton.kt b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signin/component/KakaoButton.kt similarity index 94% rename from feature/src/main/java/com/terning/feature/onboarding/signin/component/KakaoButton.kt rename to feature/onboarding/src/main/java/com/terning/feature/onboarding/signin/component/KakaoButton.kt index 243169165..8877dab28 100644 --- a/feature/src/main/java/com/terning/feature/onboarding/signin/component/KakaoButton.kt +++ b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signin/component/KakaoButton.kt @@ -14,11 +14,11 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.painterResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.KakaoYellow import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme -import com.terning.core.extension.noRippleClickable -import com.terning.feature.R +import com.terning.feature.onboarding.R @Composable fun KakaoButton( diff --git a/feature/onboarding/src/main/java/com/terning/feature/onboarding/signin/navigation/SignInNavigation.kt b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signin/navigation/SignInNavigation.kt new file mode 100644 index 000000000..2b0fe00c5 --- /dev/null +++ b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signin/navigation/SignInNavigation.kt @@ -0,0 +1,31 @@ +package com.terning.feature.onboarding.signin.navigation + +import androidx.navigation.NavController +import androidx.navigation.NavGraphBuilder +import androidx.navigation.NavOptions +import androidx.navigation.compose.composable +import com.terning.core.navigation.Route +import com.terning.feature.onboarding.signin.SignInRoute +import kotlinx.serialization.Serializable + +fun NavController.navigateSignIn(navOptions: NavOptions? = null) { + navigate( + route = SignIn, + navOptions = navOptions + ) +} + +fun NavGraphBuilder.signInNavGraph( + navigateHome: () -> Unit, + navigateSignUp: (String) -> Unit +) { + composable { + SignInRoute( + navigateToHome = navigateHome, + navigateToSignUp = navigateSignUp + ) + } +} + +@Serializable +data object SignIn : Route \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpRoute.kt b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signup/SignUpRoute.kt similarity index 95% rename from feature/src/main/java/com/terning/feature/onboarding/signup/SignUpRoute.kt rename to feature/onboarding/src/main/java/com/terning/feature/onboarding/signup/SignUpRoute.kt index ef6b52828..352df7786 100644 --- a/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpRoute.kt +++ b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signup/SignUpRoute.kt @@ -24,19 +24,18 @@ import androidx.lifecycle.compose.LocalLifecycleOwner import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.flowWithLifecycle import com.terning.core.analytics.EventType -import com.terning.core.analytics.LocalTracker import com.terning.core.designsystem.component.bottomsheet.ProfileBottomSheet import com.terning.core.designsystem.component.button.RectangleButton import com.terning.core.designsystem.component.item.ProfileWithPlusButton import com.terning.core.designsystem.component.textfield.NameTextField +import com.terning.core.designsystem.extension.addFocusCleaner +import com.terning.core.designsystem.extension.noRippleClickable +import com.terning.core.designsystem.extension.toast import com.terning.core.designsystem.theme.Grey500 import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.extension.addFocusCleaner -import com.terning.core.extension.noRippleClickable -import com.terning.core.extension.toast -import com.terning.feature.R +import com.terning.feature.onboarding.R @Composable fun SignUpRoute( @@ -49,7 +48,7 @@ fun SignUpRoute( val context = LocalContext.current val lifecycleOwner = LocalLifecycleOwner.current - val amplitudeTracker = LocalTracker.current + val amplitudeTracker = com.terning.core.analytics.LocalTracker.current LaunchedEffect(key1 = true) { viewModel.updateAuthId(authId) diff --git a/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpSideEffect.kt b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signup/SignUpSideEffect.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/onboarding/signup/SignUpSideEffect.kt rename to feature/onboarding/src/main/java/com/terning/feature/onboarding/signup/SignUpSideEffect.kt diff --git a/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpState.kt b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signup/SignUpState.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/onboarding/signup/SignUpState.kt rename to feature/onboarding/src/main/java/com/terning/feature/onboarding/signup/SignUpState.kt diff --git a/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpViewModel.kt b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signup/SignUpViewModel.kt similarity index 89% rename from feature/src/main/java/com/terning/feature/onboarding/signup/SignUpViewModel.kt rename to feature/onboarding/src/main/java/com/terning/feature/onboarding/signup/SignUpViewModel.kt index 6493c627b..be9607f3c 100644 --- a/feature/src/main/java/com/terning/feature/onboarding/signup/SignUpViewModel.kt +++ b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signup/SignUpViewModel.kt @@ -2,10 +2,8 @@ package com.terning.feature.onboarding.signup import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.terning.domain.entity.onboarding.SignUpRequest -import com.terning.domain.repository.AuthRepository -import com.terning.domain.repository.TokenRepository -import com.terning.feature.R +import com.terning.domain.auth.entity.SignUpRequest +import com.terning.feature.onboarding.R import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow @@ -18,8 +16,8 @@ import javax.inject.Inject @HiltViewModel class SignUpViewModel @Inject constructor( - private val authRepository: AuthRepository, - private val tokenRepository: TokenRepository + private val authRepository: com.terning.domain.auth.repository.AuthRepository, + private val tokenRepository: com.terning.domain.token.repository.TokenRepository ) : ViewModel() { private val _state: MutableStateFlow = MutableStateFlow(SignUpState()) diff --git a/feature/src/main/java/com/terning/feature/onboarding/signup/navigation/SignUpNavigation.kt b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signup/navigation/SignUpNavigation.kt similarity index 59% rename from feature/src/main/java/com/terning/feature/onboarding/signup/navigation/SignUpNavigation.kt rename to feature/onboarding/src/main/java/com/terning/feature/onboarding/signup/navigation/SignUpNavigation.kt index a85c99f4a..8f6068733 100644 --- a/feature/src/main/java/com/terning/feature/onboarding/signup/navigation/SignUpNavigation.kt +++ b/feature/onboarding/src/main/java/com/terning/feature/onboarding/signup/navigation/SignUpNavigation.kt @@ -2,13 +2,10 @@ package com.terning.feature.onboarding.signup.navigation import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder -import androidx.navigation.NavHostController import androidx.navigation.NavOptions import androidx.navigation.compose.composable -import androidx.navigation.navOptions import androidx.navigation.toRoute import com.terning.core.navigation.Route -import com.terning.feature.filtering.startfiltering.navigation.navigateStartFiltering import com.terning.feature.onboarding.signup.SignUpRoute import kotlinx.serialization.Serializable @@ -23,23 +20,13 @@ fun NavController.navigateSignUp( } fun NavGraphBuilder.signUpNavGraph( - navHostController: NavHostController + navigateStartFiltering: (String) -> Unit ) { composable { val args = it.toRoute() - val navOptions = navOptions { - popUpTo(id = navHostController.graph.id) { - inclusive = true - } - } SignUpRoute( authId = args.authId, - navigateToStartFiltering = { name -> - navHostController.navigateStartFiltering( - name = name, - navOptions = navOptions - ) - } + navigateToStartFiltering = navigateStartFiltering ) } } diff --git a/feature/src/main/java/com/terning/feature/onboarding/splash/SplashRoute.kt b/feature/onboarding/src/main/java/com/terning/feature/onboarding/splash/SplashRoute.kt similarity index 98% rename from feature/src/main/java/com/terning/feature/onboarding/splash/SplashRoute.kt rename to feature/onboarding/src/main/java/com/terning/feature/onboarding/splash/SplashRoute.kt index 6026f6787..95f12484a 100644 --- a/feature/src/main/java/com/terning/feature/onboarding/splash/SplashRoute.kt +++ b/feature/onboarding/src/main/java/com/terning/feature/onboarding/splash/SplashRoute.kt @@ -18,7 +18,7 @@ import androidx.lifecycle.flowWithLifecycle import com.google.accompanist.systemuicontroller.rememberSystemUiController import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningPointTheme -import com.terning.feature.R +import com.terning.feature.onboarding.R @Composable fun SplashRoute( diff --git a/feature/src/main/java/com/terning/feature/onboarding/splash/SplashState.kt b/feature/onboarding/src/main/java/com/terning/feature/onboarding/splash/SplashState.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/onboarding/splash/SplashState.kt rename to feature/onboarding/src/main/java/com/terning/feature/onboarding/splash/SplashState.kt diff --git a/feature/src/main/java/com/terning/feature/onboarding/splash/SplashViewModel.kt b/feature/onboarding/src/main/java/com/terning/feature/onboarding/splash/SplashViewModel.kt similarity index 94% rename from feature/src/main/java/com/terning/feature/onboarding/splash/SplashViewModel.kt rename to feature/onboarding/src/main/java/com/terning/feature/onboarding/splash/SplashViewModel.kt index 37c9db467..7dd63d48e 100644 --- a/feature/src/main/java/com/terning/feature/onboarding/splash/SplashViewModel.kt +++ b/feature/onboarding/src/main/java/com/terning/feature/onboarding/splash/SplashViewModel.kt @@ -3,7 +3,7 @@ package com.terning.feature.onboarding.splash import androidx.lifecycle.LifecycleOwner import androidx.lifecycle.ViewModel import androidx.lifecycle.lifecycleScope -import com.terning.domain.repository.TokenRepository +import com.terning.domain.token.repository.TokenRepository import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.delay import kotlinx.coroutines.flow.MutableSharedFlow diff --git a/feature/onboarding/src/main/java/com/terning/feature/onboarding/splash/navigation/SplashNavigation.kt b/feature/onboarding/src/main/java/com/terning/feature/onboarding/splash/navigation/SplashNavigation.kt new file mode 100644 index 000000000..d9d8ef5ef --- /dev/null +++ b/feature/onboarding/src/main/java/com/terning/feature/onboarding/splash/navigation/SplashNavigation.kt @@ -0,0 +1,31 @@ +package com.terning.feature.onboarding.splash.navigation + +import androidx.navigation.NavController +import androidx.navigation.NavGraphBuilder +import androidx.navigation.NavOptions +import androidx.navigation.compose.composable +import com.terning.core.navigation.Route +import com.terning.feature.onboarding.splash.SplashRoute +import kotlinx.serialization.Serializable + +fun NavController.navigateSplash(navOptions: NavOptions? = null) { + navigate( + route = Splash, + navOptions = navOptions + ) +} + +fun NavGraphBuilder.splashNavGraph( + navigateHome: () -> Unit, + navigateSignIn: () -> Unit +) { + composable { + SplashRoute( + navigateToHome = navigateHome, + navigateToSignIn = navigateSignIn + ) + } +} + +@Serializable +data object Splash : Route \ No newline at end of file diff --git a/feature/onboarding/src/main/res/drawable/ic_sign_up_profile.xml b/feature/onboarding/src/main/res/drawable/ic_sign_up_profile.xml new file mode 100644 index 000000000..e7a473ec6 --- /dev/null +++ b/feature/onboarding/src/main/res/drawable/ic_sign_up_profile.xml @@ -0,0 +1,9 @@ + + + diff --git a/feature/onboarding/src/main/res/drawable/ic_signin_kakao.xml b/feature/onboarding/src/main/res/drawable/ic_signin_kakao.xml new file mode 100644 index 000000000..cbe75d056 --- /dev/null +++ b/feature/onboarding/src/main/res/drawable/ic_signin_kakao.xml @@ -0,0 +1,14 @@ + + + + + + diff --git a/feature/onboarding/src/main/res/drawable/ic_splash.xml b/feature/onboarding/src/main/res/drawable/ic_splash.xml new file mode 100644 index 000000000..760fb9b10 --- /dev/null +++ b/feature/onboarding/src/main/res/drawable/ic_splash.xml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/feature/onboarding/src/main/res/drawable/ic_terning_launcher_background.xml b/feature/onboarding/src/main/res/drawable/ic_terning_launcher_background.xml new file mode 100644 index 000000000..ca3826a46 --- /dev/null +++ b/feature/onboarding/src/main/res/drawable/ic_terning_launcher_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/feature/src/main/assets/terning_sign_in.json b/feature/onboarding/src/main/res/raw/terning_sign_in.json similarity index 100% rename from feature/src/main/assets/terning_sign_in.json rename to feature/onboarding/src/main/res/raw/terning_sign_in.json diff --git a/feature/onboarding/src/main/res/values/strings.xml b/feature/onboarding/src/main/res/values/strings.xml new file mode 100644 index 000000000..130e17bc0 --- /dev/null +++ b/feature/onboarding/src/main/res/values/strings.xml @@ -0,0 +1,21 @@ + + + terning + + 서버통신에 성공했어요 + 서버통신에 실패했어요 + + + 카카오로 로그인하기 + 카카오톡 로그인에 실패했습니다 + 로그인을 취소하였습니다 + + + 반가워요!\n닉네임을 알려주세요 + 프로필 이미지 + 프로필 버튼 + 닉네임 + 닉네임을 입력해 주세요 + 다음으로 + + diff --git a/feature/onboarding/src/main/res/values/themes.xml b/feature/onboarding/src/main/res/values/themes.xml new file mode 100644 index 000000000..9e25abbdf --- /dev/null +++ b/feature/onboarding/src/main/res/values/themes.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/feature/proguard-rules.pro b/feature/proguard-rules.pro deleted file mode 100644 index 481bb4348..000000000 --- a/feature/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# 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/feature/search/.gitignore b/feature/search/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/feature/search/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/feature/search/build.gradle.kts b/feature/search/build.gradle.kts new file mode 100644 index 000000000..55953c6ae --- /dev/null +++ b/feature/search/build.gradle.kts @@ -0,0 +1,16 @@ +import com.terning.build_logic.extension.setNamespace + +plugins { + alias(libs.plugins.terning.feature) +} +android { + setNamespace("feature.search") +} + +dependencies { + // domain + implementation(project(":domain:search")) + + // feature + implementation(project(":feature:dialog")) +} \ No newline at end of file diff --git a/feature/search/src/main/AndroidManifest.xml b/feature/search/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/feature/search/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/search/search/SearchRoute.kt b/feature/search/src/main/java/com/terning/feature/search/search/SearchRoute.kt similarity index 88% rename from feature/src/main/java/com/terning/feature/search/search/SearchRoute.kt rename to feature/search/src/main/java/com/terning/feature/search/search/SearchRoute.kt index 7b4303d61..f52c33d8a 100644 --- a/feature/src/main/java/com/terning/feature/search/search/SearchRoute.kt +++ b/feature/search/src/main/java/com/terning/feature/search/search/SearchRoute.kt @@ -23,17 +23,14 @@ import androidx.lifecycle.compose.LocalLifecycleOwner import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.flowWithLifecycle import com.terning.core.analytics.EventType -import com.terning.core.analytics.LocalTracker import com.terning.core.designsystem.component.image.TerningImage import com.terning.core.designsystem.component.textfield.SearchTextField +import com.terning.core.designsystem.extension.noRippleClickable +import com.terning.core.designsystem.state.UiState import com.terning.core.designsystem.theme.Black import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.extension.noRippleClickable -import com.terning.core.state.UiState -import com.terning.domain.entity.search.SearchBanner -import com.terning.domain.entity.search.SearchPopularAnnouncement -import com.terning.feature.R +import com.terning.feature.search.R import com.terning.feature.search.search.component.ImageSlider import com.terning.feature.search.search.component.InternListType import com.terning.feature.search.search.component.SearchInternList @@ -52,7 +49,7 @@ fun SearchRoute( val viewState by viewModel.viewState.collectAsStateWithLifecycle(lifecycleOwner = lifecycleOwner) val scrapState by viewModel.scrapState.collectAsStateWithLifecycle(lifecycleOwner = lifecycleOwner) - val amplitudeTracker = LocalTracker.current + val amplitudeTracker = com.terning.core.analytics.LocalTracker.current LaunchedEffect(key1 = true) { viewModel.getSearchViews() @@ -71,12 +68,12 @@ fun SearchRoute( } val searchViewsList = when (viewState.searchViewsList) { - is UiState.Success -> (viewState.searchViewsList as UiState.Success>).data.toImmutableList() + is UiState.Success -> (viewState.searchViewsList as UiState.Success>).data.toImmutableList() else -> emptyList() } val searchScrapsList = when (scrapState.searchScrapsList) { - is UiState.Success -> (scrapState.searchScrapsList as UiState.Success>).data.toImmutableList() + is UiState.Success -> (scrapState.searchScrapsList as UiState.Success>).data.toImmutableList() else -> emptyList() } @@ -107,9 +104,9 @@ fun SearchRoute( @Composable fun SearchScreen( modifier: Modifier = Modifier, - bannerList: List, - searchViewsList: List, - searchScrapsList: List, + bannerList: List, + searchViewsList: List, + searchScrapsList: List, navigateToSearchProcess: () -> Unit, navigateToIntern: (Long) -> Unit, onAdvertisementClick: (Int) -> Unit, @@ -120,7 +117,7 @@ fun SearchScreen( .background(White) ) { TerningImage( - painter = com.terning.core.R.drawable.ic_terning_logo_typo, + painter = R.drawable.ic_terning_logo_typo, modifier = Modifier .padding(start = 24.dp, top = 16.dp) ) diff --git a/feature/src/main/java/com/terning/feature/search/search/SearchSideEffect.kt b/feature/search/src/main/java/com/terning/feature/search/search/SearchSideEffect.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/search/search/SearchSideEffect.kt rename to feature/search/src/main/java/com/terning/feature/search/search/SearchSideEffect.kt diff --git a/feature/src/main/java/com/terning/feature/search/search/SearchViewModel.kt b/feature/search/src/main/java/com/terning/feature/search/search/SearchViewModel.kt similarity index 85% rename from feature/src/main/java/com/terning/feature/search/search/SearchViewModel.kt rename to feature/search/src/main/java/com/terning/feature/search/search/SearchViewModel.kt index 37c677783..d741c9479 100644 --- a/feature/src/main/java/com/terning/feature/search/search/SearchViewModel.kt +++ b/feature/search/src/main/java/com/terning/feature/search/search/SearchViewModel.kt @@ -2,10 +2,8 @@ package com.terning.feature.search.search import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.terning.core.state.UiState -import com.terning.domain.entity.search.SearchBanner -import com.terning.domain.repository.SearchRepository -import com.terning.feature.R +import com.terning.core.designsystem.state.UiState +import com.terning.feature.search.R import com.terning.feature.search.search.model.SearchScrapsListState import com.terning.feature.search.search.model.SearchViewsListState import dagger.hilt.android.lifecycle.HiltViewModel @@ -19,7 +17,7 @@ import javax.inject.Inject @HiltViewModel class SearchViewModel @Inject constructor( - private val searchRepository: SearchRepository, + private val searchRepository: com.terning.domain.search.repository.SearchRepository, ) : ViewModel() { private val _viewState: MutableStateFlow = MutableStateFlow(SearchViewsListState()) @@ -64,16 +62,16 @@ class SearchViewModel @Inject constructor( } companion object { - val bannerList: List = listOf( - SearchBanner( + val bannerList: List = listOf( + com.terning.domain.search.entity.SearchBanner( imageRes = R.drawable.img_ad_1, url = "https://www.instagram.com/p/DBWCO97TRds/?igsh=bDhjMGxlMGliNDc2" ), - SearchBanner( + com.terning.domain.search.entity.SearchBanner( imageRes = R.drawable.img_ad_2, url = "https://www.instagram.com/terning_official/" ), - SearchBanner( + com.terning.domain.search.entity.SearchBanner( imageRes = R.drawable.img_ad_3, url = "https://forms.gle/4btEwEbUQ3JSjTKP7" ) diff --git a/feature/src/main/java/com/terning/feature/search/search/component/DotsIndicator.kt b/feature/search/src/main/java/com/terning/feature/search/search/component/DotsIndicator.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/search/search/component/DotsIndicator.kt rename to feature/search/src/main/java/com/terning/feature/search/search/component/DotsIndicator.kt diff --git a/feature/src/main/java/com/terning/feature/search/search/component/ImageSlider.kt b/feature/search/src/main/java/com/terning/feature/search/search/component/ImageSlider.kt similarity index 95% rename from feature/src/main/java/com/terning/feature/search/search/component/ImageSlider.kt rename to feature/search/src/main/java/com/terning/feature/search/search/component/ImageSlider.kt index fb004d3ba..1e7a6ed48 100644 --- a/feature/src/main/java/com/terning/feature/search/search/component/ImageSlider.kt +++ b/feature/search/src/main/java/com/terning/feature/search/search/component/ImageSlider.kt @@ -17,15 +17,14 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.res.painterResource import androidx.compose.ui.unit.dp +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.Grey200 -import com.terning.core.extension.noRippleClickable -import com.terning.domain.entity.search.SearchBanner import kotlinx.coroutines.delay @Composable fun ImageSlider( modifier: Modifier = Modifier, - images: List, + images: List, onAdvertisementClick: (Int) -> Unit, ) { val pagerState = rememberPagerState( diff --git a/feature/src/main/java/com/terning/feature/search/search/component/IndicatorDots.kt b/feature/search/src/main/java/com/terning/feature/search/search/component/IndicatorDots.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/search/search/component/IndicatorDots.kt rename to feature/search/src/main/java/com/terning/feature/search/search/component/IndicatorDots.kt diff --git a/feature/src/main/java/com/terning/feature/search/search/component/InternListType.kt b/feature/search/src/main/java/com/terning/feature/search/search/component/InternListType.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/search/search/component/InternListType.kt rename to feature/search/src/main/java/com/terning/feature/search/search/component/InternListType.kt diff --git a/feature/src/main/java/com/terning/feature/search/search/component/SearchIntern.kt b/feature/search/src/main/java/com/terning/feature/search/search/component/SearchIntern.kt similarity index 97% rename from feature/src/main/java/com/terning/feature/search/search/component/SearchIntern.kt rename to feature/search/src/main/java/com/terning/feature/search/search/component/SearchIntern.kt index 63400bfc6..ac7856105 100644 --- a/feature/src/main/java/com/terning/feature/search/search/component/SearchIntern.kt +++ b/feature/search/src/main/java/com/terning/feature/search/search/component/SearchIntern.kt @@ -27,13 +27,13 @@ import androidx.compose.ui.unit.dp import coil3.compose.AsyncImage import coil3.request.ImageRequest import coil3.request.crossfade +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.Black import com.terning.core.designsystem.theme.Grey100 import com.terning.core.designsystem.theme.Grey150 import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.extension.noRippleClickable -import com.terning.feature.R +import com.terning.feature.search.R @Composable fun SearchIntern( diff --git a/feature/src/main/java/com/terning/feature/search/search/component/SearchInternList.kt b/feature/search/src/main/java/com/terning/feature/search/search/component/SearchInternList.kt similarity index 96% rename from feature/src/main/java/com/terning/feature/search/search/component/SearchInternList.kt rename to feature/search/src/main/java/com/terning/feature/search/search/component/SearchInternList.kt index 8c489336c..f9e86d535 100644 --- a/feature/src/main/java/com/terning/feature/search/search/component/SearchInternList.kt +++ b/feature/search/src/main/java/com/terning/feature/search/search/component/SearchInternList.kt @@ -12,8 +12,8 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.terning.core.designsystem.theme.Grey400 import com.terning.core.designsystem.theme.TerningTheme -import com.terning.domain.entity.search.SearchPopularAnnouncement -import com.terning.feature.R +import com.terning.domain.search.entity.SearchPopularAnnouncement +import com.terning.feature.search.R @Composable fun SearchInternList( diff --git a/feature/src/main/java/com/terning/feature/search/search/model/SearchScrapsListState.kt b/feature/search/src/main/java/com/terning/feature/search/search/model/SearchScrapsListState.kt similarity index 60% rename from feature/src/main/java/com/terning/feature/search/search/model/SearchScrapsListState.kt rename to feature/search/src/main/java/com/terning/feature/search/search/model/SearchScrapsListState.kt index d52f3c17e..4e405724f 100644 --- a/feature/src/main/java/com/terning/feature/search/search/model/SearchScrapsListState.kt +++ b/feature/search/src/main/java/com/terning/feature/search/search/model/SearchScrapsListState.kt @@ -1,7 +1,7 @@ package com.terning.feature.search.search.model -import com.terning.domain.entity.search.SearchPopularAnnouncement -import com.terning.core.state.UiState +import com.terning.core.designsystem.state.UiState +import com.terning.domain.search.entity.SearchPopularAnnouncement data class SearchScrapsListState( var searchScrapsList: UiState> = UiState.Loading, diff --git a/feature/src/main/java/com/terning/feature/search/search/model/SearchViewsListState.kt b/feature/search/src/main/java/com/terning/feature/search/search/model/SearchViewsListState.kt similarity index 59% rename from feature/src/main/java/com/terning/feature/search/search/model/SearchViewsListState.kt rename to feature/search/src/main/java/com/terning/feature/search/search/model/SearchViewsListState.kt index 5550e1e3c..175701cfc 100644 --- a/feature/src/main/java/com/terning/feature/search/search/model/SearchViewsListState.kt +++ b/feature/search/src/main/java/com/terning/feature/search/search/model/SearchViewsListState.kt @@ -1,7 +1,7 @@ package com.terning.feature.search.search.model -import com.terning.domain.entity.search.SearchPopularAnnouncement -import com.terning.core.state.UiState +import com.terning.core.designsystem.state.UiState +import com.terning.domain.search.entity.SearchPopularAnnouncement data class SearchViewsListState( var searchViewsList: UiState> = UiState.Loading, diff --git a/feature/src/main/java/com/terning/feature/search/search/navigation/SearchNavigation.kt b/feature/search/src/main/java/com/terning/feature/search/search/navigation/SearchNavigation.kt similarity index 83% rename from feature/src/main/java/com/terning/feature/search/search/navigation/SearchNavigation.kt rename to feature/search/src/main/java/com/terning/feature/search/search/navigation/SearchNavigation.kt index 5d3c71809..caa41ce83 100644 --- a/feature/src/main/java/com/terning/feature/search/search/navigation/SearchNavigation.kt +++ b/feature/search/src/main/java/com/terning/feature/search/search/navigation/SearchNavigation.kt @@ -11,7 +11,6 @@ import androidx.navigation.NavHostController import androidx.navigation.NavOptions import androidx.navigation.compose.composable import com.terning.core.navigation.MainTabRoute -import com.terning.feature.intern.navigation.navigateIntern import com.terning.feature.search.search.SearchRoute import com.terning.feature.search.searchprocess.navigation.navigateSearchProcess import kotlinx.serialization.Serializable @@ -24,7 +23,8 @@ fun NavController.navigateSearch(navOptions: NavOptions? = null) { } fun NavGraphBuilder.searchNavGraph( - navHostController: NavHostController, + navigateSearchProcess: () -> Unit, + navigateIntern: (Long) -> Unit, paddingValues: PaddingValues, ) { composable( @@ -43,8 +43,8 @@ fun NavGraphBuilder.searchNavGraph( ) { SearchRoute( modifier = Modifier.padding(paddingValues), - navigateToSearchProcess = { navHostController.navigateSearchProcess() }, - navigateToIntern = { announcementId -> navHostController.navigateIntern(announcementId) } + navigateToSearchProcess = navigateSearchProcess, + navigateToIntern = navigateIntern ) } } diff --git a/feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessRoute.kt b/feature/search/src/main/java/com/terning/feature/search/searchprocess/SearchProcessRoute.kt similarity index 96% rename from feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessRoute.kt rename to feature/search/src/main/java/com/terning/feature/search/searchprocess/SearchProcessRoute.kt index 2f87b1f03..c06b16dac 100644 --- a/feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessRoute.kt +++ b/feature/search/src/main/java/com/terning/feature/search/searchprocess/SearchProcessRoute.kt @@ -34,33 +34,31 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.flowWithLifecycle import androidx.navigation.NavHostController import com.terning.core.analytics.EventType -import com.terning.core.analytics.LocalTracker import com.terning.core.designsystem.component.bottomsheet.SortingBottomSheet import com.terning.core.designsystem.component.button.SortingButton import com.terning.core.designsystem.component.item.InternItemWithShadow import com.terning.core.designsystem.component.textfield.SearchTextField import com.terning.core.designsystem.component.topappbar.BackButtonTopAppBar +import com.terning.core.designsystem.extension.addFocusCleaner +import com.terning.core.designsystem.extension.noRippleClickable +import com.terning.core.designsystem.extension.toast import com.terning.core.designsystem.theme.CalRed import com.terning.core.designsystem.theme.Grey400 import com.terning.core.designsystem.theme.Grey500 import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White -import com.terning.core.extension.addFocusCleaner -import com.terning.core.extension.noRippleClickable -import com.terning.core.extension.toast -import com.terning.domain.entity.search.SearchResult -import com.terning.feature.R +import com.terning.domain.search.entity.SearchResult import com.terning.feature.dialog.cancel.ScrapCancelDialog import com.terning.feature.dialog.detail.ScrapDialog -import com.terning.feature.intern.navigation.navigateIntern +import com.terning.feature.search.R import com.terning.feature.search.searchprocess.models.SearchProcessState - @Composable fun SearchProcessRoute( modifier: Modifier, navController: NavHostController, + navigateIntern: (Long) -> Unit, viewModel: SearchProcessViewModel = hiltViewModel(), ) { val state by viewModel.state.collectAsStateWithLifecycle() @@ -86,13 +84,17 @@ fun SearchProcessRoute( is SearchProcessSideEffect.ScrapUpdate -> { sideEffect.keyword } + + is SearchProcessSideEffect.NavigateIntern -> { + navigateIntern(sideEffect.internshipAnnouncementId) + } } } } SearchProcessScreen( modifier = modifier, - navigateToIntern = { navController.navigateIntern(it) }, + navigateToIntern = { viewModel.navigateIntern(it) }, navigateToBack = { navController.navigateUp() }, state = state, internSearchResultData = internSearchResultData, @@ -170,7 +172,7 @@ fun SearchProcessScreen( val focusManager = LocalFocusManager.current val currentSortBy = remember { mutableIntStateOf(state.currentSortBy) } - val amplitudeTracker = LocalTracker.current + val amplitudeTracker = com.terning.core.analytics.LocalTracker.current LaunchedEffect(Unit) { focusRequester.requestFocus() diff --git a/feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessSideEffect.kt b/feature/search/src/main/java/com/terning/feature/search/searchprocess/SearchProcessSideEffect.kt similarity index 75% rename from feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessSideEffect.kt rename to feature/search/src/main/java/com/terning/feature/search/searchprocess/SearchProcessSideEffect.kt index 8e2f00ec5..dcbc4a4a3 100644 --- a/feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessSideEffect.kt +++ b/feature/search/src/main/java/com/terning/feature/search/searchprocess/SearchProcessSideEffect.kt @@ -5,4 +5,5 @@ import androidx.annotation.StringRes sealed class SearchProcessSideEffect { data class Toast(@StringRes val message: Int) : SearchProcessSideEffect() data class ScrapUpdate(val keyword: String) : SearchProcessSideEffect() + data class NavigateIntern(val internshipAnnouncementId: Long) : SearchProcessSideEffect() } \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessViewModel.kt b/feature/search/src/main/java/com/terning/feature/search/searchprocess/SearchProcessViewModel.kt similarity index 90% rename from feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessViewModel.kt rename to feature/search/src/main/java/com/terning/feature/search/searchprocess/SearchProcessViewModel.kt index c2aeb5d59..7e7508ceb 100644 --- a/feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessViewModel.kt +++ b/feature/search/src/main/java/com/terning/feature/search/searchprocess/SearchProcessViewModel.kt @@ -2,10 +2,9 @@ package com.terning.feature.search.searchprocess import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.terning.core.type.SortBy -import com.terning.domain.entity.search.SearchResult -import com.terning.domain.repository.SearchRepository -import com.terning.feature.R +import com.terning.core.designsystem.type.SortBy +import com.terning.domain.search.entity.SearchResult +import com.terning.feature.search.R import com.terning.feature.search.searchprocess.models.SearchProcessState import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow @@ -20,7 +19,7 @@ import javax.inject.Inject @HiltViewModel class SearchProcessViewModel @Inject constructor( - private val searchRepository: SearchRepository, + private val searchRepository: com.terning.domain.search.repository.SearchRepository, ) : ViewModel() { private val _state = MutableStateFlow(SearchProcessState()) @@ -121,4 +120,10 @@ class SearchProcessViewModel @Inject constructor( } } } + + fun navigateIntern(internshipAnnouncementId: Long) { + viewModelScope.launch { + _sideEffect.emit(SearchProcessSideEffect.NavigateIntern(internshipAnnouncementId)) + } + } } diff --git a/feature/src/main/java/com/terning/feature/search/searchprocess/models/SearchDialogState.kt b/feature/search/src/main/java/com/terning/feature/search/searchprocess/models/SearchDialogState.kt similarity index 100% rename from feature/src/main/java/com/terning/feature/search/searchprocess/models/SearchDialogState.kt rename to feature/search/src/main/java/com/terning/feature/search/searchprocess/models/SearchDialogState.kt diff --git a/feature/src/main/java/com/terning/feature/search/searchprocess/models/SearchProcessState.kt b/feature/search/src/main/java/com/terning/feature/search/searchprocess/models/SearchProcessState.kt similarity index 76% rename from feature/src/main/java/com/terning/feature/search/searchprocess/models/SearchProcessState.kt rename to feature/search/src/main/java/com/terning/feature/search/searchprocess/models/SearchProcessState.kt index a397cd2c8..8c87e3fc8 100644 --- a/feature/src/main/java/com/terning/feature/search/searchprocess/models/SearchProcessState.kt +++ b/feature/search/src/main/java/com/terning/feature/search/searchprocess/models/SearchProcessState.kt @@ -1,8 +1,8 @@ package com.terning.feature.search.searchprocess.models -import com.terning.core.state.UiState -import com.terning.core.type.SortBy -import com.terning.domain.entity.search.SearchResult +import com.terning.core.designsystem.state.UiState +import com.terning.core.designsystem.type.SortBy +import com.terning.domain.search.entity.SearchResult data class SearchProcessState( val loadState: UiState = UiState.Loading, @@ -19,7 +19,7 @@ data class SearchProcessState( val selectedInternIndex: Int = 0, val sheetState: Boolean = false, val changeFilterState: Boolean = false, - val searchResult: SearchResult = SearchResult( + val searchResult: com.terning.domain.search.entity.SearchResult = com.terning.domain.search.entity.SearchResult( internshipAnnouncementId = 0, title = "", companyImage = "", diff --git a/feature/src/main/java/com/terning/feature/search/searchprocess/models/SearchResultState.kt b/feature/search/src/main/java/com/terning/feature/search/searchprocess/models/SearchResultState.kt similarity index 60% rename from feature/src/main/java/com/terning/feature/search/searchprocess/models/SearchResultState.kt rename to feature/search/src/main/java/com/terning/feature/search/searchprocess/models/SearchResultState.kt index 8cb4b6856..c3c961dd2 100644 --- a/feature/src/main/java/com/terning/feature/search/searchprocess/models/SearchResultState.kt +++ b/feature/search/src/main/java/com/terning/feature/search/searchprocess/models/SearchResultState.kt @@ -1,7 +1,7 @@ package com.terning.feature.search.searchprocess.models -import com.terning.core.state.UiState -import com.terning.domain.entity.search.SearchResult +import com.terning.core.designsystem.state.UiState +import com.terning.domain.search.entity.SearchResult data class SearchResultState( var searchListState: UiState> = UiState.Loading, diff --git a/feature/src/main/java/com/terning/feature/search/searchprocess/navigation/SearchProcessNavigation.kt b/feature/search/src/main/java/com/terning/feature/search/searchprocess/navigation/SearchProcessNavigation.kt similarity index 89% rename from feature/src/main/java/com/terning/feature/search/searchprocess/navigation/SearchProcessNavigation.kt rename to feature/search/src/main/java/com/terning/feature/search/searchprocess/navigation/SearchProcessNavigation.kt index e2dda0732..b302fe19a 100644 --- a/feature/src/main/java/com/terning/feature/search/searchprocess/navigation/SearchProcessNavigation.kt +++ b/feature/search/src/main/java/com/terning/feature/search/searchprocess/navigation/SearchProcessNavigation.kt @@ -23,6 +23,7 @@ fun NavController.navigateSearchProcess(navOptions: NavOptions? = null) { fun NavGraphBuilder.searchProcessNavGraph( navHostController: NavHostController, + navigateIntern: (Long) -> Unit, paddingValues: PaddingValues ) { composable( @@ -42,6 +43,9 @@ fun NavGraphBuilder.searchProcessNavGraph( SearchProcessRoute( modifier = Modifier.padding(paddingValues), navController = navHostController, + navigateIntern = { internshipAnnouncementId -> + navigateIntern(internshipAnnouncementId) + } ) } } diff --git a/feature/search/src/main/res/drawable/ic_home_empty_filtering.xml b/feature/search/src/main/res/drawable/ic_home_empty_filtering.xml new file mode 100644 index 000000000..9c6c313b3 --- /dev/null +++ b/feature/search/src/main/res/drawable/ic_home_empty_filtering.xml @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/feature/search/src/main/res/drawable/ic_nav_search.xml b/feature/search/src/main/res/drawable/ic_nav_search.xml new file mode 100644 index 000000000..ce3fd2fbd --- /dev/null +++ b/feature/search/src/main/res/drawable/ic_nav_search.xml @@ -0,0 +1,20 @@ + + + + diff --git a/feature/search/src/main/res/drawable/ic_search_18.xml b/feature/search/src/main/res/drawable/ic_search_18.xml new file mode 100644 index 000000000..9700e7a17 --- /dev/null +++ b/feature/search/src/main/res/drawable/ic_search_18.xml @@ -0,0 +1,13 @@ + + + diff --git a/feature/search/src/main/res/drawable/ic_search_empty.xml b/feature/search/src/main/res/drawable/ic_search_empty.xml new file mode 100644 index 000000000..32218db54 --- /dev/null +++ b/feature/search/src/main/res/drawable/ic_search_empty.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + diff --git a/feature/search/src/main/res/drawable/ic_terning_launcher_background.xml b/feature/search/src/main/res/drawable/ic_terning_launcher_background.xml new file mode 100644 index 000000000..ca3826a46 --- /dev/null +++ b/feature/search/src/main/res/drawable/ic_terning_launcher_background.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/feature/search/src/main/res/drawable/ic_terning_logo_typo.xml b/feature/search/src/main/res/drawable/ic_terning_logo_typo.xml new file mode 100644 index 000000000..4e7d72284 --- /dev/null +++ b/feature/search/src/main/res/drawable/ic_terning_logo_typo.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + diff --git a/feature/search/src/main/res/drawable/img_ad_1.png b/feature/search/src/main/res/drawable/img_ad_1.png new file mode 100644 index 000000000..c20454111 Binary files /dev/null and b/feature/search/src/main/res/drawable/img_ad_1.png differ diff --git a/feature/search/src/main/res/drawable/img_ad_2.png b/feature/search/src/main/res/drawable/img_ad_2.png new file mode 100644 index 000000000..643ce85ad Binary files /dev/null and b/feature/search/src/main/res/drawable/img_ad_2.png differ diff --git a/feature/search/src/main/res/drawable/img_ad_3.png b/feature/search/src/main/res/drawable/img_ad_3.png new file mode 100644 index 000000000..7dd64d6fe Binary files /dev/null and b/feature/search/src/main/res/drawable/img_ad_3.png differ diff --git a/feature/search/src/main/res/values/strings.xml b/feature/search/src/main/res/values/strings.xml new file mode 100644 index 000000000..29a4790c0 --- /dev/null +++ b/feature/search/src/main/res/values/strings.xml @@ -0,0 +1,22 @@ + + + 서버통신에 성공했어요 + 서버통신에 실패했어요 + + + 관심있는 인턴 공고 키워드를 검색해 보세요 + 요즘 대학생들에게 인기 있는 공고 + 이번 주 가장 많이 조회한 공고예요 + 공고 이미지 + 이번 주 가장 많이 스크랩 한 공고예요 + + + 검색 + 어떤 공고를\n찾고 계시나요? + 검색 결과 + 검색 결과 없을 때 아이콘 + + 해당하는 검색 결과가 없어요 + + 개의 공고가 있어요 + diff --git a/feature/search/src/main/res/values/themes.xml b/feature/search/src/main/res/values/themes.xml new file mode 100644 index 000000000..9e25abbdf --- /dev/null +++ b/feature/search/src/main/res/values/themes.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/feature/search/src/main/res/xml/backup_rules.xml b/feature/search/src/main/res/xml/backup_rules.xml new file mode 100644 index 000000000..fa0f996d2 --- /dev/null +++ b/feature/search/src/main/res/xml/backup_rules.xml @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/feature/search/src/main/res/xml/data_extraction_rules.xml b/feature/search/src/main/res/xml/data_extraction_rules.xml new file mode 100644 index 000000000..9ee9997b0 --- /dev/null +++ b/feature/search/src/main/res/xml/data_extraction_rules.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/feature/src/androidTest/java/com/terning/feature/ExampleInstrumentedTest.kt b/feature/src/androidTest/java/com/terning/feature/ExampleInstrumentedTest.kt deleted file mode 100644 index 77b9600ed..000000000 --- a/feature/src/androidTest/java/com/terning/feature/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.terning.feature - -import androidx.test.platform.app.InstrumentationRegistry -import androidx.test.ext.junit.runners.AndroidJUnit4 - -import org.junit.Test -import org.junit.runner.RunWith - -import org.junit.Assert.* - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.terning.feature.test", appContext.packageName) - } -} \ No newline at end of file diff --git a/feature/src/main/AndroidManifest.xml b/feature/src/main/AndroidManifest.xml index b1e06be9c..a5918e68a 100644 --- a/feature/src/main/AndroidManifest.xml +++ b/feature/src/main/AndroidManifest.xml @@ -1,20 +1,4 @@ - - - - - - - - - - \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/onboarding/signin/navigation/SignInNavigation.kt b/feature/src/main/java/com/terning/feature/onboarding/signin/navigation/SignInNavigation.kt deleted file mode 100644 index c22cd447b..000000000 --- a/feature/src/main/java/com/terning/feature/onboarding/signin/navigation/SignInNavigation.kt +++ /dev/null @@ -1,43 +0,0 @@ -package com.terning.feature.onboarding.signin.navigation - -import androidx.navigation.NavController -import androidx.navigation.NavGraphBuilder -import androidx.navigation.NavHostController -import androidx.navigation.NavOptions -import androidx.navigation.compose.composable -import androidx.navigation.navOptions -import com.terning.core.navigation.Route -import com.terning.feature.home.navigation.navigateHome -import com.terning.feature.onboarding.signin.SignInRoute -import com.terning.feature.onboarding.signup.navigation.navigateSignUp -import kotlinx.serialization.Serializable - -fun NavController.navigateSignIn(navOptions: NavOptions? = null) { - navigate( - route = SignIn, - navOptions = navOptions - ) -} - -fun NavGraphBuilder.signInNavGraph( - navHostController: NavHostController, -) { - composable { - val navOptions = navOptions { - popUpTo(id = navHostController.graph.id) { - inclusive = true - } - } - SignInRoute( - navigateToHome = { - navHostController.navigateHome(navOptions = navOptions) - }, - navigateToSignUp = { authId -> - navHostController.navigateSignUp(authId = authId, navOptions = navOptions) - } - ) - } -} - -@Serializable -data object SignIn : Route \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/onboarding/splash/navigation/SplashNavigation.kt b/feature/src/main/java/com/terning/feature/onboarding/splash/navigation/SplashNavigation.kt deleted file mode 100644 index 3d959d0a5..000000000 --- a/feature/src/main/java/com/terning/feature/onboarding/splash/navigation/SplashNavigation.kt +++ /dev/null @@ -1,47 +0,0 @@ -package com.terning.feature.onboarding.splash.navigation - -import androidx.navigation.NavController -import androidx.navigation.NavGraphBuilder -import androidx.navigation.NavHostController -import androidx.navigation.NavOptions -import androidx.navigation.compose.composable -import com.terning.core.navigation.Route -import com.terning.feature.home.navigation.navigateHome -import com.terning.feature.onboarding.signin.navigation.navigateSignIn -import com.terning.feature.onboarding.splash.SplashRoute -import kotlinx.serialization.Serializable - -fun NavController.navigateSplash(navOptions: NavOptions? = null) { - navigate( - route = Splash, - navOptions = navOptions - ) -} - -fun NavGraphBuilder.splashNavGraph( - navHostController: NavHostController, -) { - composable { - SplashRoute( - navigateToHome = { - navHostController.navigateHome( - navOptions = NavOptions.Builder().setPopUpTo( - route = Splash, - inclusive = true - ).build() - ) - }, - navigateToSignIn = { - navHostController.navigateSignIn( - navOptions = NavOptions.Builder().setPopUpTo( - route = Splash, - inclusive = true - ).build() - ) - } - ) - } -} - -@Serializable -data object Splash : Route \ No newline at end of file diff --git a/feature/src/test/java/com/terning/feature/ExampleUnitTest.kt b/feature/src/test/java/com/terning/feature/ExampleUnitTest.kt deleted file mode 100644 index 511c25089..000000000 --- a/feature/src/test/java/com/terning/feature/ExampleUnitTest.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.terning.feature - -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/gradle/libs.versions.toml b/gradle/libs.versions.toml index 487382417..ba743bca2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,7 +4,7 @@ minSdk = "28" targetSdk = "34" versionName = "1.1.8" versionCode = "10108" -kotlinCompilerExtensionVersion = "1.5.0" +kotlinCompilerExtensionVersion = "1.5.2" jvmTarget = "1.8" ## Android gradle plugin @@ -94,6 +94,7 @@ dokka = "1.9.0" ## amplitude amplitude = "1.17.3" + [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidxCore" } androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidxAppCompat" } @@ -117,7 +118,7 @@ androidx-compose-ui-testManifest = { group = "androidx.compose.ui", name = "ui-t androidx-compose-navigation = { group = "androidx.navigation", name = "navigation-compose", version.ref = "composeNavigation" } androidx-compose-navigation-test = { group = "androidx.navigation", name = "navigation-testing", version.ref = "composeNavigation" } androidx-compose-saveable = { group = "androidx.compose.runtime", name = "runtime-saveable", version.ref = "composeSavable" } -compose-compiler-gradle-plugin = { module = "org.jetbrains.kotlin:compose-compiler-gradle-plugin", version.ref = "kotlin" } +compose-compiler-gradle-plugin = { group = "androidx.compose.compiler", name = "compiler", version.ref = "kotlinCompilerExtensionVersion" } androidx-ui = { group = "androidx.compose.ui", name = "ui" } androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" } @@ -185,4 +186,12 @@ hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } android-test = { id = "com.android.test", version.ref = "androidGradlePlugin" } ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlinParcelize" } -dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } \ No newline at end of file +dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } +kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version = "kotlinCompilerExtensionVersion" } + +terning-application = { id = "terning.android.application", version = "unspecified" } +terning-compose = { id = "terning.android.compose", version = "unspecified" } +terning-feature = { id = "terning.android.feature", version = "unspecified" } +terning-data = { id = "terning.android.data", version = "unspecified" } +terning-library = { id = "terning.android.library", version = "unspecified" } +terning-kotlin = { id = "terning.kotlin.library", version = "unspecified" } \ No newline at end of file diff --git a/gradle/projectDependencyGraph.gradle b/gradle/projectDependencyGraph.gradle index e8de4991d..033f0d7b2 100644 --- a/gradle/projectDependencyGraph.gradle +++ b/gradle/projectDependencyGraph.gradle @@ -1,6 +1,6 @@ task projectDependencyGraph { doLast { - def dot = new File(rootProject.rootDir, 'project.dot') + def dot = new File(rootProject.buildDir, 'reports/dependency-graph/project.dot') dot.parentFile.mkdirs() dot.delete() @@ -36,8 +36,7 @@ task projectDependencyGraph { if (project.plugins.hasPlugin('kotlin2js')) { jsProjects.add(project) } - if (project.plugins.hasPlugin('com.android.library') || - project.plugins.hasPlugin('com.android.application')) { + if (project.plugins.hasPlugin('com.android.library') || project.plugins.hasPlugin('com.android.application')) { androidProjects.add(project) } if (project.plugins.hasPlugin('com.android.dynamic-feature')) { @@ -113,9 +112,7 @@ task projectDependencyGraph { dot << '}\n' - def dotPath = "C:/Program Files/Graphviz/bin/dot" - def p = "${dotPath} -Tpng -O project.dot".execute([], dot.parentFile) - + def p = 'dot -Tpng -O project.dot'.execute([], dot.parentFile) p.waitFor() if (p.exitValue() != 0) { throw new RuntimeException(p.errorStream.text) @@ -124,4 +121,4 @@ task projectDependencyGraph { println("Project module dependency graph created at ${dot.absolutePath}.png") } -} \ No newline at end of file +} diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/project.dot.png b/project.dot.png index 0f06e042b..3d28c740b 100644 Binary files a/project.dot.png and b/project.dot.png differ diff --git a/settings.gradle.kts b/settings.gradle.kts index bd88f3f5d..a0ebff66f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,4 +1,7 @@ +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") + pluginManagement { + includeBuild("build-logic") repositories { google { content { @@ -23,8 +26,55 @@ dependencyResolutionManagement { } rootProject.name = "Terning-Android" + include(":app") -include(":feature") -include(":data") -include(":domain") -include(":core") + +// core +include( + ":core:analytics", + ":core:designsystem", + ":core:navigation", + ":core:network", + ":core:local" +) + +// data +include( + ":data:auth", + ":data:calendar", + ":data:filtering", + ":data:home", + ":data:intern", + ":data:mypage", + ":data:search", + ":data:tokenreissue", + ":data:token", + ":data:scrap" +) + +// domain +include( + ":domain:auth", + ":domain:calendar", + ":domain:filtering", + ":domain:home", + ":domain:intern", + ":domain:mypage", + ":domain:search", + ":domain:tokenreissue", + ":domain:token", + ":domain:scrap" +) + +// feature +include( + ":feature:calendar", + ":feature:dialog", + ":feature:filtering", + ":feature:home", + ":feature:intern", + ":feature:main", + ":feature:mypage", + ":feature:onboarding", + ":feature:search" +) \ No newline at end of file