diff --git a/.gitignore b/.gitignore index bfabf4d2..747b908f 100644 --- a/.gitignore +++ b/.gitignore @@ -114,6 +114,7 @@ obj/ .idea/assetWizardSettings.xml .idea/.gitignore .idea/gradle.xml +.idea/codeStyles/ deploymentTargetDropDown.xml diff --git a/app/.gitignore b/app/.gitignore index f9e0c6a6..7ddf34f0 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -1,4 +1,5 @@ /build +/release .kotlin/ # Created by https://www.gitignore.io/api/kotlin,androidstudio diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 463c8a04..3f1d9021 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -2,24 +2,18 @@ import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { - alias(libs.plugins.android.application) - alias(libs.plugins.jetbrains.kotlin.android) - alias(libs.plugins.hilt.android) - alias(libs.plugins.kotlin.ksp) + id("missionmate.android.application") } android { namespace = "com.goalpanzi.mission_mate" - compileSdk = 34 defaultConfig { applicationId = "com.goalpanzi.mission_mate" - minSdk = 26 targetSdk = 34 versionCode = 5 versionName = "1.0.2" - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { useSupportLibrary = true } @@ -46,23 +40,6 @@ android { isDebuggable = false } } - buildFeatures { - buildConfig = true - } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - kotlin { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_17) - } - } - packaging { - resources { - excludes += "/META-INF/{AL2.0,LGPL2.1}" - } - } } dependencies { diff --git a/build-logic/.gitignore b/build-logic/.gitignore new file mode 100644 index 00000000..42afabfd --- /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 00000000..087b57da --- /dev/null +++ b/build-logic/build.gradle.kts @@ -0,0 +1,27 @@ +plugins { + `kotlin-dsl` +} + +dependencies { + implementation(libs.android.gradle.plugin) + implementation(libs.kotlin.gradle.plugin) + compileOnly(libs.ksp.gradle.plugin) + compileOnly(libs.compose.compiler.gradle.plugin) +} + +gradlePlugin { + plugins { + register("androidApplication") { + id = "missionmate.android.application" + implementationClass = "MissionmateAndroidApplicationPlugin" + } + register("androidLibrary") { + id = "missionmate.android.library" + implementationClass = "MissionmateAndroidLibrary" + } + register("androidHilt") { + id = "missionmate.android.hilt" + implementationClass = "com.goalpanzi.mission_mate.convention.HiltAndroidPlugin" + } + } +} \ 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 00000000..24909824 --- /dev/null +++ b/build-logic/settings.gradle.kts @@ -0,0 +1,14 @@ +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") +@Suppress("UnstableApiUsage") +dependencyResolutionManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} \ No newline at end of file diff --git a/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/AppNameExtension.kt b/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/AppNameExtension.kt new file mode 100644 index 00000000..c9f1c957 --- /dev/null +++ b/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/AppNameExtension.kt @@ -0,0 +1,9 @@ +package com.goalpanzi.mission_mate.convention + +import org.gradle.api.Project + +fun Project.setNamespace(name: String) { + androidExtension.apply { + namespace = "com.goalpanzi.mission_mate.$name" + } +} \ No newline at end of file diff --git a/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/ComposeAndroid.kt b/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/ComposeAndroid.kt new file mode 100644 index 00000000..3e365d81 --- /dev/null +++ b/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/ComposeAndroid.kt @@ -0,0 +1,41 @@ +package com.goalpanzi.mission_mate.convention + +import org.gradle.api.Project +import org.gradle.kotlin.dsl.dependencies +import org.gradle.kotlin.dsl.getByType +import org.jetbrains.kotlin.compose.compiler.gradle.ComposeCompilerGradlePluginExtension + +internal fun Project.configureComposeAndroid() { + with(plugins) { + apply("org.jetbrains.kotlin.plugin.compose") + } + + val libs = extensions.libs + androidExtension.apply { + buildFeatures { + compose = true + } + + dependencies { + val bom = libs.findLibrary("androidx-compose-bom").get() + implementation(platform(bom)) + implementation(libs.findLibrary("androidx.ui").get()) + implementation(libs.findLibrary("androidx.ui.graphics").get()) + implementation(libs.findLibrary("androidx.ui.tooling.preview").get()) + implementation(libs.findLibrary("androidx.material3").get()) + implementation(libs.findLibrary("androidx.material").get()) + implementation(libs.findLibrary("androidx.navigation.compose").get()) + implementation(libs.findLibrary("androidx.hilt.navigation.compose").get()) + + debugImplementation(libs.findLibrary("androidx.ui.tooling").get()) + debugImplementation(libs.findLibrary("androidx.ui.test.manifest").get()) + + androidTestImplementation(platform(bom)) + androidTestImplementation(libs.findLibrary("androidx.ui.test.junit4").get()) + } + } + + extensions.getByType().apply { + enableStrongSkippingMode.set(true) + } +} \ No newline at end of file diff --git a/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/CoroutineAndroid.kt b/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/CoroutineAndroid.kt new file mode 100644 index 00000000..1549ebc6 --- /dev/null +++ b/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/CoroutineAndroid.kt @@ -0,0 +1,20 @@ +package com.goalpanzi.mission_mate.convention + +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/kotlin/com/goalpanzi/mission_mate/convention/Extension.kt b/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/Extension.kt new file mode 100644 index 00000000..811bcd0b --- /dev/null +++ b/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/Extension.kt @@ -0,0 +1,46 @@ +package com.goalpanzi.mission_mate.convention + +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.artifacts.dsl.DependencyHandler +import org.gradle.api.plugins.ExtensionContainer +import org.gradle.kotlin.dsl.getByType + +internal val ExtensionContainer.libs: VersionCatalog + get() = getByType().named("libs") + +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 Project.applicationExtension: CommonExtension<*, *, *, *, *, *> + get() = extensions.getByType() + +internal val Project.libraryExtension: CommonExtension<*, *, *, *, *, *> + get() = extensions.getByType() + +internal fun DependencyHandler.implementation(dependencyNotation: Any) { + add("implementation", dependencyNotation) +} + +internal fun DependencyHandler.testImplementation(dependencyNotation: Any) { + add("testImplementation", dependencyNotation) +} + +internal fun DependencyHandler.androidTestImplementation(dependencyNotation: Any) { + add("androidTestImplementation", dependencyNotation) +} + +internal fun DependencyHandler.debugImplementation(dependencyNotation: Any) { + add("debugImplementation", dependencyNotation) +} + +internal fun DependencyHandler.ksp(dependencyNotation: Any) { + add("ksp", dependencyNotation) +} diff --git a/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/HiltAndroid.kt b/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/HiltAndroid.kt new file mode 100644 index 00000000..6fae6d10 --- /dev/null +++ b/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/HiltAndroid.kt @@ -0,0 +1,26 @@ +package com.goalpanzi.mission_mate.convention + +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.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/kotlin/com/goalpanzi/mission_mate/convention/KotlinAndroid.kt b/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/KotlinAndroid.kt new file mode 100644 index 00000000..8bc202db --- /dev/null +++ b/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/KotlinAndroid.kt @@ -0,0 +1,51 @@ +package com.goalpanzi.mission_mate.convention + +import org.gradle.api.JavaVersion +import org.gradle.api.Project +import org.gradle.kotlin.dsl.withType +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +internal fun Project.configureKotlinAndroid() { + + pluginManager.apply("org.jetbrains.kotlin.android") + + androidExtension.apply { + compileSdk = 34 + + defaultConfig { + minSdk = 26 + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + getByName("release") { + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + + buildFeatures { + buildConfig = true + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_17) + } + } + + packaging { + resources { + excludes += "/META-INF/{AL2.0,LGPL2.1}" + } + } + } +} \ No newline at end of file diff --git a/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/NetworkAndroid.kt b/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/NetworkAndroid.kt new file mode 100644 index 00000000..09250390 --- /dev/null +++ b/build-logic/src/main/kotlin/com/goalpanzi/mission_mate/convention/NetworkAndroid.kt @@ -0,0 +1,15 @@ +package com.goalpanzi.mission_mate.convention + +import org.gradle.api.Project +import org.gradle.kotlin.dsl.dependencies + +internal fun Project.configureNetworkAndroid() { + val libs = extensions.libs + + dependencies { + implementation(libs.findLibrary("retrofit").get()) + implementation(libs.findLibrary("retrofit.kotlinx.serialization").get()) + implementation(libs.findLibrary("okhttp3").get()) + implementation(libs.findLibrary("okhttp3.logging.interceptor").get()) + } +} \ No newline at end of file diff --git a/build-logic/src/main/kotlin/missionmate.android.application.gradle.kts b/build-logic/src/main/kotlin/missionmate.android.application.gradle.kts new file mode 100644 index 00000000..e412c43b --- /dev/null +++ b/build-logic/src/main/kotlin/missionmate.android.application.gradle.kts @@ -0,0 +1,9 @@ +import com.goalpanzi.mission_mate.convention.configureHiltAndroid +import com.goalpanzi.mission_mate.convention.configureKotlinAndroid + +plugins { + id("com.android.application") +} + +configureKotlinAndroid() +configureHiltAndroid() diff --git a/build-logic/src/main/kotlin/missionmate.android.compose.gradle.kts b/build-logic/src/main/kotlin/missionmate.android.compose.gradle.kts new file mode 100644 index 00000000..4505dd59 --- /dev/null +++ b/build-logic/src/main/kotlin/missionmate.android.compose.gradle.kts @@ -0,0 +1,3 @@ +import com.goalpanzi.mission_mate.convention.configureComposeAndroid + +configureComposeAndroid() \ No newline at end of file diff --git a/build-logic/src/main/kotlin/missionmate.android.feature.gradle.kts b/build-logic/src/main/kotlin/missionmate.android.feature.gradle.kts new file mode 100644 index 00000000..9f74ffe0 --- /dev/null +++ b/build-logic/src/main/kotlin/missionmate.android.feature.gradle.kts @@ -0,0 +1,33 @@ +import com.goalpanzi.mission_mate.convention.configureHiltAndroid +import com.goalpanzi.mission_mate.convention.libs + +plugins { + id("missionmate.android.library") + id("missionmate.android.compose") +} + +android { + packaging { + resources { + excludes.add("META-INF/**") + } + } + defaultConfig { + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + +} + +configureHiltAndroid() + +dependencies { + implementation(project(":core:designsystem")) + implementation(project(":core:navigation")) + implementation(project(":core:domain:user")) + implementation(project(":core:domain:setting")) + implementation(project(":core:domain:mission")) + implementation(project(":core:domain:common")) + implementation(project(":core:domain:auth")) + implementation(project(":core:ui")) + +} \ No newline at end of file diff --git a/build-logic/src/main/kotlin/missionmate.android.library.gradle.kts b/build-logic/src/main/kotlin/missionmate.android.library.gradle.kts new file mode 100644 index 00000000..14e2b79d --- /dev/null +++ b/build-logic/src/main/kotlin/missionmate.android.library.gradle.kts @@ -0,0 +1,11 @@ +import com.goalpanzi.mission_mate.convention.configureCoroutineAndroid +import com.goalpanzi.mission_mate.convention.configureHiltAndroid +import com.goalpanzi.mission_mate.convention.configureKotlinAndroid + +plugins { + id("com.android.library") +} + +configureKotlinAndroid() +configureCoroutineAndroid() +configureHiltAndroid() diff --git a/build.gradle.kts b/build.gradle.kts index 344707f2..ea0083a2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,12 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. +@file:Suppress("DSL_SCOPE_VIOLATION") + +buildscript { + repositories { + google() + mavenCentral() + } +} + plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.jetbrains.kotlin.android) apply false diff --git a/core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/board/di/MissionDataModule.kt b/core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/mission/di/MissionDataModule.kt similarity index 75% rename from core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/board/di/MissionDataModule.kt rename to core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/mission/di/MissionDataModule.kt index f84c0d61..9286ac0a 100644 --- a/core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/board/di/MissionDataModule.kt +++ b/core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/mission/di/MissionDataModule.kt @@ -1,7 +1,7 @@ -package com.goalpanzi.mission_mate.core.board.di +package com.goalpanzi.mission_mate.core.mission.di -import com.goalpanzi.mission_mate.core.board.repository.MissionRepositoryImpl import com.goalpanzi.mission_mate.core.domain.mission.repository.MissionRepository +import com.goalpanzi.mission_mate.core.mission.repository.MissionRepositoryImpl import dagger.Binds import dagger.Module import dagger.hilt.InstallIn diff --git a/core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/board/mapper/MissionMapper.kt b/core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/mission/mapper/MissionMapper.kt similarity index 98% rename from core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/board/mapper/MissionMapper.kt rename to core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/mission/mapper/MissionMapper.kt index 57477dfb..84a185bd 100644 --- a/core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/board/mapper/MissionMapper.kt +++ b/core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/mission/mapper/MissionMapper.kt @@ -1,4 +1,4 @@ -package com.goalpanzi.mission_mate.core.board.mapper +package com.goalpanzi.mission_mate.core.mission.mapper import com.goalpanzi.mission_mate.core.data.common.mapper.toModel import com.goalpanzi.mission_mate.core.domain.mission.model.BoardReward diff --git a/core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/board/repository/MissionRepositoryImpl.kt b/core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/mission/repository/MissionRepositoryImpl.kt similarity index 95% rename from core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/board/repository/MissionRepositoryImpl.kt rename to core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/mission/repository/MissionRepositoryImpl.kt index 35718d61..00ac2bb4 100644 --- a/core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/board/repository/MissionRepositoryImpl.kt +++ b/core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/mission/repository/MissionRepositoryImpl.kt @@ -1,8 +1,7 @@ -package com.goalpanzi.mission_mate.core.board.repository +package com.goalpanzi.mission_mate.core.mission.repository -import com.goalpanzi.mission_mate.core.board.mapper.toModel +import com.goalpanzi.mission_mate.core.mission.mapper.toModel import com.goalpanzi.mission_mate.core.data.common.handleResult -import com.goalpanzi.mission_mate.core.data.common.mapper.toModel import com.goalpanzi.mission_mate.core.datastore.datasource.MissionDataSource import com.goalpanzi.mission_mate.core.domain.common.DomainResult import com.goalpanzi.mission_mate.core.domain.common.convert diff --git a/core/data/onboarding/src/main/java/com/goalpanzi/mission_mate/core/data/onboarding/repository/OnboardingRepositoryImpl.kt b/core/data/onboarding/src/main/java/com/goalpanzi/mission_mate/core/data/onboarding/repository/OnboardingRepositoryImpl.kt index 97d097f0..bdd8a954 100644 --- a/core/data/onboarding/src/main/java/com/goalpanzi/mission_mate/core/data/onboarding/repository/OnboardingRepositoryImpl.kt +++ b/core/data/onboarding/src/main/java/com/goalpanzi/mission_mate/core/data/onboarding/repository/OnboardingRepositoryImpl.kt @@ -1,6 +1,6 @@ package com.goalpanzi.mission_mate.core.data.onboarding.repository -import com.goalpanzi.mission_mate.core.board.mapper.toModel +import com.goalpanzi.mission_mate.core.mission.mapper.toModel import com.goalpanzi.mission_mate.core.data.common.handleResult import com.goalpanzi.mission_mate.core.data.onboarding.mapper.toModel import com.goalpanzi.mission_mate.core.data.onboarding.mapper.toRequest diff --git a/core/designsystem/src/main/java/com/goalpanzi/mission_mate/core/designsystem/component/TextField.kt b/core/designsystem/src/main/java/com/goalpanzi/mission_mate/core/designsystem/component/TextField.kt index ea87518e..a0024c6b 100644 --- a/core/designsystem/src/main/java/com/goalpanzi/mission_mate/core/designsystem/component/TextField.kt +++ b/core/designsystem/src/main/java/com/goalpanzi/mission_mate/core/designsystem/component/TextField.kt @@ -34,7 +34,6 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.goalpanzi.mission_mate.core.designsystem.R import com.goalpanzi.mission_mate.core.designsystem.theme.ColorGray1_FF404249 -import com.goalpanzi.mission_mate.core.designsystem.theme.ColorGray2_FF4F505C import com.goalpanzi.mission_mate.core.designsystem.theme.ColorGray3_FF727484 import com.goalpanzi.mission_mate.core.designsystem.theme.ColorGray4_FFE5E5E5 import com.goalpanzi.mission_mate.core.designsystem.theme.ColorGray5_FFF5F6F9 diff --git a/core/domain/auth/src/main/java/com/goalpanzi/mission_mate/core/domain/auth/usecase/LoginUseCase.kt b/core/domain/auth/src/main/java/com/goalpanzi/mission_mate/core/domain/auth/usecase/LoginUseCase.kt index 42f40bc4..31208cd1 100644 --- a/core/domain/auth/src/main/java/com/goalpanzi/mission_mate/core/domain/auth/usecase/LoginUseCase.kt +++ b/core/domain/auth/src/main/java/com/goalpanzi/mission_mate/core/domain/auth/usecase/LoginUseCase.kt @@ -22,7 +22,7 @@ class LoginUseCase @Inject constructor( authRepository.setRefreshToken(it.refreshToken).first() userRepository.setMemberId(it.memberId).first() (it.nickname to it.characterType).let { (nickname, character) -> - if (nickname != null && character != null) { + if (nickname != null) { userRepository.setUserProfile( UserProfile(nickname, character) ).first() diff --git a/core/domain/mission/src/main/java/com/goalpanzi/mission_mate/core/domain/mission/usecase/VerifyMissionUseCase.kt b/core/domain/mission/src/main/java/com/goalpanzi/mission_mate/core/domain/mission/usecase/VerifyMissionUseCase.kt index 17c12fd3..4cb28491 100644 --- a/core/domain/mission/src/main/java/com/goalpanzi/mission_mate/core/domain/mission/usecase/VerifyMissionUseCase.kt +++ b/core/domain/mission/src/main/java/com/goalpanzi/mission_mate/core/domain/mission/usecase/VerifyMissionUseCase.kt @@ -10,7 +10,7 @@ import javax.inject.Inject class VerifyMissionUseCase @Inject constructor( private val missionRepository: MissionRepository ) { - suspend operator fun invoke(missionId: Long, image: File) : Flow> = flow { + operator fun invoke(missionId: Long, image: File) : Flow> = flow { emit(missionRepository.verifyMission(missionId, image)) } } diff --git a/feature/main/src/test/java/com/goalpanzi/mission_mate/core/main/ExampleUnitTest.kt b/core/network/src/test/java/com/goalpanzi/mission_mate/feature/network/ExampleUnitTest.kt similarity index 86% rename from feature/main/src/test/java/com/goalpanzi/mission_mate/core/main/ExampleUnitTest.kt rename to core/network/src/test/java/com/goalpanzi/mission_mate/feature/network/ExampleUnitTest.kt index 0babf065..d052bb4d 100644 --- a/feature/main/src/test/java/com/goalpanzi/mission_mate/core/main/ExampleUnitTest.kt +++ b/core/network/src/test/java/com/goalpanzi/mission_mate/feature/network/ExampleUnitTest.kt @@ -1,4 +1,4 @@ -package com.goalpanzi.mission_mate.core.main +package com.goalpanzi.mission_mate.feature.network import org.junit.Test diff --git a/core/ui/src/androidTest/java/com/goalpanzi/mission_mate/core/ui/ExampleInstrumentedTest.kt b/core/ui/src/androidTest/java/com/goalpanzi/mission_mate/feature/ui/ExampleInstrumentedTest.kt similarity index 93% rename from core/ui/src/androidTest/java/com/goalpanzi/mission_mate/core/ui/ExampleInstrumentedTest.kt rename to core/ui/src/androidTest/java/com/goalpanzi/mission_mate/feature/ui/ExampleInstrumentedTest.kt index 885813eb..e8c5ea84 100644 --- a/core/ui/src/androidTest/java/com/goalpanzi/mission_mate/core/ui/ExampleInstrumentedTest.kt +++ b/core/ui/src/androidTest/java/com/goalpanzi/mission_mate/feature/ui/ExampleInstrumentedTest.kt @@ -1,4 +1,4 @@ -package com.goalpanzi.mission_mate.core.ui +package com.goalpanzi.mission_mate.feature.ui import androidx.test.platform.app.InstrumentationRegistry import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/core/ui/src/test/java/com/goalpanzi/mission_mate/core/ui/ExampleUnitTest.kt b/core/ui/src/test/java/com/goalpanzi/mission_mate/feature/ui/ExampleUnitTest.kt similarity index 87% rename from core/ui/src/test/java/com/goalpanzi/mission_mate/core/ui/ExampleUnitTest.kt rename to core/ui/src/test/java/com/goalpanzi/mission_mate/feature/ui/ExampleUnitTest.kt index 923e3365..c317e760 100644 --- a/core/ui/src/test/java/com/goalpanzi/mission_mate/core/ui/ExampleUnitTest.kt +++ b/core/ui/src/test/java/com/goalpanzi/mission_mate/feature/ui/ExampleUnitTest.kt @@ -1,4 +1,4 @@ -package com.goalpanzi.mission_mate.core.ui +package com.goalpanzi.mission_mate.feature.ui import org.junit.Test diff --git a/feature/board/build.gradle.kts b/feature/board/build.gradle.kts index b930ed82..50f932da 100644 --- a/feature/board/build.gradle.kts +++ b/feature/board/build.gradle.kts @@ -1,76 +1,24 @@ -import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import com.goalpanzi.mission_mate.convention.setNamespace plugins { - alias(libs.plugins.android.library) - alias(libs.plugins.jetbrains.kotlin.android) - alias(libs.plugins.compose.compiler) - alias(libs.plugins.kotlin.ksp) - alias(libs.plugins.hilt.android) + id("missionmate.android.feature") } android { - namespace = "com.goalpanzi.mission_mate.feature.board" - compileSdk = 34 - - defaultConfig { - minSdk = 26 - - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) - } - } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - kotlin { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_17) - } - } - buildFeatures { - compose = true - } - composeCompiler { - enableStrongSkippingMode = true - } + setNamespace("feature.board") } dependencies { implementation(libs.androidx.core.ktx) implementation(libs.bundles.lifecycle) - implementation(platform(libs.androidx.compose.bom)) - implementation(libs.bundles.compose) implementation(libs.bundles.coroutines) - testImplementation(libs.bundles.test) androidTestImplementation(libs.bundles.android.test) - androidTestImplementation(platform(libs.androidx.compose.bom)) - debugImplementation(libs.androidx.ui.tooling) - debugImplementation(libs.androidx.ui.test.manifest) - - implementation(libs.androidx.hilt.navigation.compose) - implementation(libs.hilt.android) - ksp(libs.hilt.compiler) implementation(libs.balloon) implementation(libs.coil.compose) - implementation(project(":core:designsystem")) - implementation(project(":core:navigation")) - implementation(project(":core:domain:user")) - implementation(project(":core:domain:setting")) - implementation(project(":core:domain:mission")) - implementation(project(":core:domain:common")) - implementation(project(":core:ui")) implementation(project(":feature:onboarding")) } diff --git a/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/component/Board.kt b/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/component/Board.kt index acb3cf22..7c6e82bc 100644 --- a/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/component/Board.kt +++ b/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/component/Board.kt @@ -58,7 +58,7 @@ import com.goalpanzi.mission_mate.feature.board.util.BoardManager import com.goalpanzi.mission_mate.feature.board.util.BoardManager.getPositionScrollToMyIndex import kotlin.math.min -@OptIn(ExperimentalFoundationApi::class, ExperimentalMaterialApi::class) +@OptIn(ExperimentalMaterialApi::class, ExperimentalFoundationApi::class) @Composable fun Board( scrollState: ScrollState, @@ -304,7 +304,6 @@ fun ColumnScope.BoardContent( } } -@OptIn(ExperimentalFoundationApi::class) @SuppressLint("ModifierFactoryUnreferencedReceiver") fun Modifier.modifierWithClipRect( scrollState: ScrollState, diff --git a/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/component/BoardTopStory.kt b/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/component/BoardTopStory.kt index ac895a9d..92d65735 100644 --- a/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/component/BoardTopStory.kt +++ b/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/component/BoardTopStory.kt @@ -1,7 +1,6 @@ package com.goalpanzi.mission_mate.feature.board.component import android.annotation.SuppressLint -import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.clickable @@ -41,13 +40,11 @@ import com.goalpanzi.mission_mate.core.designsystem.theme.MissionMateTypography import com.goalpanzi.mission_mate.core.designsystem.theme.MissionmateTheme import com.goalpanzi.mission_mate.core.designsystem.theme.OrangeGradient_FFFF5F3C_FFFFAE50 import com.goalpanzi.mission_mate.feature.board.model.CharacterUiModel -import com.goalpanzi.mission_mate.feature.board.model.MissionState import com.goalpanzi.mission_mate.feature.board.model.UserStory @Composable fun BoardTopStory( userList: List, - missionState : MissionState, modifier: Modifier = Modifier, onClickStory: (UserStory) -> Unit, ) { diff --git a/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/component/BoardTopView.kt b/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/component/BoardTopView.kt index 5e78d3a9..da5f151c 100644 --- a/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/component/BoardTopView.kt +++ b/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/component/BoardTopView.kt @@ -78,7 +78,6 @@ fun BoardTopView( BoardTopStory( modifier = Modifier.padding(top = 56.dp), userList = userList, - missionState = missionState, onClickStory = onClickStory ) if(!viewedTooltip){ diff --git a/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/screen/BoardDetailViewModel.kt b/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/screen/BoardDetailViewModel.kt index c06c814d..75fe4228 100644 --- a/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/screen/BoardDetailViewModel.kt +++ b/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/screen/BoardDetailViewModel.kt @@ -36,7 +36,7 @@ class BoardDetailViewModel @Inject constructor( private val memberId : StateFlow = getCachedMemberIdUseCase().stateIn( viewModelScope, - started = SharingStarted.WhileSubscribed(500), + started = SharingStarted.WhileSubscribed(5000), initialValue = null ) diff --git a/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/screen/VerificationPreviewScreen.kt b/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/screen/VerificationPreviewScreen.kt index f87aea43..ee967cb3 100644 --- a/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/screen/VerificationPreviewScreen.kt +++ b/feature/board/src/main/java/com/goalpanzi/mission_mate/feature/board/screen/VerificationPreviewScreen.kt @@ -1,6 +1,5 @@ package com.goalpanzi.mission_mate.feature.board.screen -import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.layout.Box diff --git a/feature/login/build.gradle.kts b/feature/login/build.gradle.kts index a947d881..b5ef4620 100644 --- a/feature/login/build.gradle.kts +++ b/feature/login/build.gradle.kts @@ -1,58 +1,19 @@ import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties +import com.goalpanzi.mission_mate.convention.setNamespace import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { - alias(libs.plugins.android.library) - alias(libs.plugins.jetbrains.kotlin.android) - alias(libs.plugins.compose.compiler) - alias(libs.plugins.kotlin.ksp) - alias(libs.plugins.hilt.android) + id("missionmate.android.feature") } android { - namespace = "com.goalpanzi.mission_mate.feature.login" - compileSdk = 34 - - defaultConfig { - minSdk = 26 - - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - vectorDrawables { - useSupportLibrary = true - } - } - + setNamespace("feature.login") buildTypes { - debug { + getByName("debug") { buildConfigField("String", "CREDENTIAL_WEB_CLIENT_ID", getCredentialClientId()) } - release { + getByName("release") { buildConfigField("String", "CREDENTIAL_WEB_CLIENT_ID", getCredentialClientId()) - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) - } - } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - kotlin { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_17) - } - } - buildFeatures { - compose = true - buildConfig = true - } - composeCompiler { - enableStrongSkippingMode = true - } - packaging { - resources { - excludes += "/META-INF/{AL2.0,LGPL2.1}" } } } @@ -60,32 +21,12 @@ android { dependencies { implementation(libs.androidx.core.ktx) implementation(libs.bundles.lifecycle) - implementation(platform(libs.androidx.compose.bom)) - implementation(libs.bundles.compose) - implementation(libs.androidx.activity.compose) implementation(libs.bundles.coroutines) - - testImplementation(libs.bundles.test) - androidTestImplementation(libs.bundles.android.test) - androidTestImplementation(platform(libs.androidx.compose.bom)) - debugImplementation(libs.androidx.ui.tooling) - debugImplementation(libs.androidx.ui.test.manifest) - - implementation(libs.androidx.hilt.navigation.compose) - implementation(libs.hilt.android) - ksp(libs.hilt.compiler) - - implementation(project(":core:designsystem")) - implementation(project(":core:navigation")) - implementation(project(":core:domain:common")) - implementation(project(":core:domain:auth")) - implementation(project(":core:domain:user")) - implementation(project(":core:ui")) - - implementation(libs.credentials) implementation(libs.credentials.auth) implementation(libs.google.id) + + testImplementation(libs.bundles.test) } fun getCredentialClientId(): String { diff --git a/feature/login/src/main/java/com/goalpanzi/mission_mate/feature/login/LoginNavigation.kt b/feature/login/src/main/java/com/goalpanzi/mission_mate/feature/login/LoginNavigation.kt index 0cc67b6a..b70aaf51 100644 --- a/feature/login/src/main/java/com/goalpanzi/mission_mate/feature/login/LoginNavigation.kt +++ b/feature/login/src/main/java/com/goalpanzi/mission_mate/feature/login/LoginNavigation.kt @@ -3,7 +3,6 @@ package com.goalpanzi.mission_mate.feature.login import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder import androidx.navigation.compose.composable -import com.goalpanzi.mission_mate.core.navigation.RouteModel fun NavController.navigateToLogin() { this.navigate("RouteModel.Login") { diff --git a/feature/login/src/main/java/com/goalpanzi/mission_mate/feature/login/LoginScreen.kt b/feature/login/src/main/java/com/goalpanzi/mission_mate/feature/login/LoginScreen.kt index 9e41d0a0..547dfc3e 100644 --- a/feature/login/src/main/java/com/goalpanzi/mission_mate/feature/login/LoginScreen.kt +++ b/feature/login/src/main/java/com/goalpanzi/mission_mate/feature/login/LoginScreen.kt @@ -1,6 +1,5 @@ package com.goalpanzi.mission_mate.feature.login -import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Box @@ -25,7 +24,6 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview diff --git a/feature/login/src/main/java/com/goalpanzi/mission_mate/feature/login/LoginViewModel.kt b/feature/login/src/main/java/com/goalpanzi/mission_mate/feature/login/LoginViewModel.kt index 0ff81393..559cadd7 100644 --- a/feature/login/src/main/java/com/goalpanzi/mission_mate/feature/login/LoginViewModel.kt +++ b/feature/login/src/main/java/com/goalpanzi/mission_mate/feature/login/LoginViewModel.kt @@ -1,12 +1,10 @@ package com.goalpanzi.mission_mate.feature.login import androidx.lifecycle.ViewModel -import androidx.lifecycle.viewModelScope import com.goalpanzi.mission_mate.core.domain.auth.usecase.LoginUseCase import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.asSharedFlow -import kotlinx.coroutines.launch import javax.inject.Inject @HiltViewModel diff --git a/feature/main/build.gradle.kts b/feature/main/build.gradle.kts index c369b1d1..bf1dc338 100644 --- a/feature/main/build.gradle.kts +++ b/feature/main/build.gradle.kts @@ -1,76 +1,19 @@ -import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import com.goalpanzi.mission_mate.convention.setNamespace plugins { - alias(libs.plugins.android.library) - alias(libs.plugins.jetbrains.kotlin.android) - alias(libs.plugins.compose.compiler) - alias(libs.plugins.kotlin.ksp) - alias(libs.plugins.hilt.android) + id("missionmate.android.feature") } android { - namespace = "com.goalpanzi.mission_mate.core.main" - compileSdk = 34 - - defaultConfig { - minSdk = 26 - - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) - } - } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - kotlin { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_17) - } - } - buildFeatures { - compose = true - } - composeCompiler { - enableStrongSkippingMode = true - } - packaging { - resources { - excludes += "/META-INF/{AL2.0,LGPL2.1}" - } - } + setNamespace("feature.main") } dependencies { implementation(libs.androidx.core.ktx) implementation(libs.bundles.lifecycle) - implementation(platform(libs.androidx.compose.bom)) - implementation(libs.bundles.compose) - implementation(libs.androidx.activity.compose) - implementation(libs.bundles.coroutines) testImplementation(libs.bundles.test) androidTestImplementation(libs.bundles.android.test) - androidTestImplementation(platform(libs.androidx.compose.bom)) - debugImplementation(libs.androidx.ui.tooling) - debugImplementation(libs.androidx.ui.test.manifest) - - implementation(libs.androidx.hilt.navigation.compose) - implementation(libs.hilt.android) - ksp(libs.hilt.compiler) - - implementation(project(":core:designsystem")) - implementation(project(":core:navigation")) - implementation(project(":core:domain:common")) - implementation(project(":core:domain:auth")) - implementation(project(":core:ui")) implementation(project(":feature:login")) implementation(project(":feature:onboarding")) diff --git a/feature/main/src/androidTest/java/com/goalpanzi/mission_mate/core/main/ExampleInstrumentedTest.kt b/feature/main/src/androidTest/java/com/goalpanzi/mission_mate/feature/main/ExampleInstrumentedTest.kt similarity index 93% rename from feature/main/src/androidTest/java/com/goalpanzi/mission_mate/core/main/ExampleInstrumentedTest.kt rename to feature/main/src/androidTest/java/com/goalpanzi/mission_mate/feature/main/ExampleInstrumentedTest.kt index 74ee735c..42f7afc3 100644 --- a/feature/main/src/androidTest/java/com/goalpanzi/mission_mate/core/main/ExampleInstrumentedTest.kt +++ b/feature/main/src/androidTest/java/com/goalpanzi/mission_mate/feature/main/ExampleInstrumentedTest.kt @@ -1,4 +1,4 @@ -package com.goalpanzi.mission_mate.core.main +package com.goalpanzi.mission_mate.feature.main import androidx.test.platform.app.InstrumentationRegistry import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/feature/main/src/main/java/com/goalpanzi/mission_mate/core/main/MainActivity.kt b/feature/main/src/main/java/com/goalpanzi/mission_mate/feature/main/MainActivity.kt similarity index 88% rename from feature/main/src/main/java/com/goalpanzi/mission_mate/core/main/MainActivity.kt rename to feature/main/src/main/java/com/goalpanzi/mission_mate/feature/main/MainActivity.kt index b32a8178..07e6d389 100644 --- a/feature/main/src/main/java/com/goalpanzi/mission_mate/core/main/MainActivity.kt +++ b/feature/main/src/main/java/com/goalpanzi/mission_mate/feature/main/MainActivity.kt @@ -1,4 +1,4 @@ -package com.goalpanzi.mission_mate.core.main +package com.goalpanzi.mission_mate.feature.main import android.graphics.Color import android.os.Bundle @@ -8,8 +8,8 @@ import androidx.activity.compose.setContent import androidx.activity.enableEdgeToEdge import com.goalpanzi.mission_mate.core.designsystem.theme.MissionmateTheme import com.goalpanzi.mission_mate.core.domain.auth.usecase.LoginUseCase -import com.goalpanzi.mission_mate.core.main.component.MainNavigator -import com.goalpanzi.mission_mate.core.main.component.rememberMainNavigator +import com.goalpanzi.mission_mate.feature.main.component.MainNavigator +import com.goalpanzi.mission_mate.feature.main.component.rememberMainNavigator import dagger.hilt.android.AndroidEntryPoint import javax.inject.Inject diff --git a/feature/main/src/main/java/com/goalpanzi/mission_mate/core/main/MainScreen.kt b/feature/main/src/main/java/com/goalpanzi/mission_mate/feature/main/MainScreen.kt similarity index 84% rename from feature/main/src/main/java/com/goalpanzi/mission_mate/core/main/MainScreen.kt rename to feature/main/src/main/java/com/goalpanzi/mission_mate/feature/main/MainScreen.kt index 040437c8..0272ee44 100644 --- a/feature/main/src/main/java/com/goalpanzi/mission_mate/core/main/MainScreen.kt +++ b/feature/main/src/main/java/com/goalpanzi/mission_mate/feature/main/MainScreen.kt @@ -1,13 +1,13 @@ -package com.goalpanzi.mission_mate.core.main +package com.goalpanzi.mission_mate.feature.main import androidx.compose.material3.Scaffold import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.ui.Modifier import androidx.hilt.navigation.compose.hiltViewModel -import com.goalpanzi.mission_mate.core.main.component.MainNavHost -import com.goalpanzi.mission_mate.core.main.component.MainNavigator -import com.goalpanzi.mission_mate.core.main.component.rememberMainNavigator +import com.goalpanzi.mission_mate.feature.main.component.MainNavHost +import com.goalpanzi.mission_mate.feature.main.component.MainNavigator +import com.goalpanzi.mission_mate.feature.main.component.rememberMainNavigator import kotlinx.coroutines.FlowPreview import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.flow.debounce diff --git a/feature/main/src/main/java/com/goalpanzi/mission_mate/core/main/MainViewModel.kt b/feature/main/src/main/java/com/goalpanzi/mission_mate/feature/main/MainViewModel.kt similarity index 90% rename from feature/main/src/main/java/com/goalpanzi/mission_mate/core/main/MainViewModel.kt rename to feature/main/src/main/java/com/goalpanzi/mission_mate/feature/main/MainViewModel.kt index 6b1d7898..158b5f35 100644 --- a/feature/main/src/main/java/com/goalpanzi/mission_mate/core/main/MainViewModel.kt +++ b/feature/main/src/main/java/com/goalpanzi/mission_mate/feature/main/MainViewModel.kt @@ -1,4 +1,4 @@ -package com.goalpanzi.mission_mate.core.main +package com.goalpanzi.mission_mate.feature.main import androidx.lifecycle.ViewModel import com.goalpanzi.mission_mate.core.navigation.NavigationEventHandler diff --git a/feature/main/src/main/java/com/goalpanzi/mission_mate/core/main/component/MainNavHost.kt b/feature/main/src/main/java/com/goalpanzi/mission_mate/feature/main/component/MainNavHost.kt similarity index 99% rename from feature/main/src/main/java/com/goalpanzi/mission_mate/core/main/component/MainNavHost.kt rename to feature/main/src/main/java/com/goalpanzi/mission_mate/feature/main/component/MainNavHost.kt index 4a52ef9d..f5315ff4 100644 --- a/feature/main/src/main/java/com/goalpanzi/mission_mate/core/main/component/MainNavHost.kt +++ b/feature/main/src/main/java/com/goalpanzi/mission_mate/feature/main/component/MainNavHost.kt @@ -1,4 +1,4 @@ -package com.goalpanzi.mission_mate.core.main.component +package com.goalpanzi.mission_mate.feature.main.component import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box diff --git a/feature/main/src/main/java/com/goalpanzi/mission_mate/core/main/component/MainNavigator.kt b/feature/main/src/main/java/com/goalpanzi/mission_mate/feature/main/component/MainNavigator.kt similarity index 98% rename from feature/main/src/main/java/com/goalpanzi/mission_mate/core/main/component/MainNavigator.kt rename to feature/main/src/main/java/com/goalpanzi/mission_mate/feature/main/component/MainNavigator.kt index c3413fe0..66362011 100644 --- a/feature/main/src/main/java/com/goalpanzi/mission_mate/core/main/component/MainNavigator.kt +++ b/feature/main/src/main/java/com/goalpanzi/mission_mate/feature/main/component/MainNavigator.kt @@ -1,4 +1,4 @@ -package com.goalpanzi.mission_mate.core.main.component +package com.goalpanzi.mission_mate.feature.main.component import android.net.Uri import androidx.compose.runtime.Composable diff --git a/core/network/src/test/java/com/goalpanzi/mission_mate/core/network/ExampleUnitTest.kt b/feature/main/src/test/java/com/goalpanzi/mission_mate/feature/main/ExampleUnitTest.kt similarity index 86% rename from core/network/src/test/java/com/goalpanzi/mission_mate/core/network/ExampleUnitTest.kt rename to feature/main/src/test/java/com/goalpanzi/mission_mate/feature/main/ExampleUnitTest.kt index c104b3f2..27aaab6a 100644 --- a/core/network/src/test/java/com/goalpanzi/mission_mate/core/network/ExampleUnitTest.kt +++ b/feature/main/src/test/java/com/goalpanzi/mission_mate/feature/main/ExampleUnitTest.kt @@ -1,4 +1,4 @@ -package com.goalpanzi.mission_mate.core.network +package com.goalpanzi.mission_mate.feature.main import org.junit.Test diff --git a/feature/onboarding/build.gradle.kts b/feature/onboarding/build.gradle.kts index 25e537cb..3f77748b 100644 --- a/feature/onboarding/build.gradle.kts +++ b/feature/onboarding/build.gradle.kts @@ -1,76 +1,20 @@ -import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import com.goalpanzi.mission_mate.convention.setNamespace plugins { - alias(libs.plugins.android.library) - alias(libs.plugins.jetbrains.kotlin.android) - alias(libs.plugins.compose.compiler) - alias(libs.plugins.kotlin.ksp) - alias(libs.plugins.hilt.android) + id("missionmate.android.feature") } android { - namespace = "com.goalpanzi.mission_mate.feature.onboarding" - compileSdk = 34 - - defaultConfig { - minSdk = 26 - - 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_17 - targetCompatibility = JavaVersion.VERSION_17 - } - kotlin { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_17) - } - } - buildFeatures { - compose = true - } - composeCompiler { - enableStrongSkippingMode = true - } + setNamespace("feature.onboarding") } dependencies { implementation(libs.androidx.core.ktx) implementation(libs.bundles.lifecycle) - implementation(platform(libs.androidx.compose.bom)) - implementation(libs.bundles.compose) - implementation(libs.bundles.coroutines) - - testImplementation(libs.bundles.test) - androidTestImplementation(libs.bundles.android.test) - androidTestImplementation(platform(libs.androidx.compose.bom)) - debugImplementation(libs.androidx.ui.tooling) - debugImplementation(libs.androidx.ui.test.manifest) - - implementation(libs.androidx.hilt.navigation.compose) - implementation(libs.hilt.android) - ksp(libs.hilt.compiler) - implementation(libs.coil.compose) - - implementation(project(":core:designsystem")) - implementation(project(":core:navigation")) - implementation(project(":core:domain:common")) implementation(project(":core:domain:onboarding")) - implementation(project(":core:domain:mission")) - implementation(project(":core:domain:user")) - implementation(project(":core:ui")) + testImplementation(libs.bundles.test) + androidTestImplementation(libs.bundles.android.test) } diff --git a/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/OnboardingViewModel.kt b/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/OnboardingViewModel.kt index 80348043..0809d9dc 100644 --- a/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/OnboardingViewModel.kt +++ b/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/OnboardingViewModel.kt @@ -13,7 +13,6 @@ import com.goalpanzi.mission_mate.feature.onboarding.isAfterProfileCreateArg import com.goalpanzi.mission_mate.feature.onboarding.model.OnboardingResultEvent import com.goalpanzi.mission_mate.feature.onboarding.model.OnboardingUiModel import dagger.hilt.android.lifecycle.HiltViewModel -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharedFlow diff --git a/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupSchedule.kt b/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupSchedule.kt index d45369ae..024073dd 100644 --- a/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupSchedule.kt +++ b/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupSchedule.kt @@ -19,7 +19,6 @@ import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.alpha import androidx.compose.ui.graphics.Shape import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign diff --git a/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupScreen.kt b/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupScreen.kt index 9cc618d7..a0e0574c 100644 --- a/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupScreen.kt +++ b/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupScreen.kt @@ -52,7 +52,6 @@ import java.time.DayOfWeek import java.time.LocalDate @SuppressLint("UnrememberedMutableInteractionSource") -@OptIn(ExperimentalFoundationApi::class) @Composable fun BoardSetupRoute( onSuccess : () -> Unit, diff --git a/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupSuccessScreen.kt b/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupSuccessScreen.kt index fadeefce..b5685e5c 100644 --- a/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupSuccessScreen.kt +++ b/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupSuccessScreen.kt @@ -1,6 +1,5 @@ package com.goalpanzi.mission_mate.feature.onboarding.screen.boardsetup -import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box @@ -16,19 +15,18 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.layout.ContentScale -import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.goalpanzi.mission_mate.core.designsystem.component.MissionMateButtonType import com.goalpanzi.mission_mate.core.designsystem.component.MissionMateTextButton +import com.goalpanzi.mission_mate.core.designsystem.component.OutlinedTextChip +import com.goalpanzi.mission_mate.core.designsystem.component.StableImage import com.goalpanzi.mission_mate.core.designsystem.theme.ColorGray1_FF404249 import com.goalpanzi.mission_mate.core.designsystem.theme.ColorWhite_FFFFFFFF import com.goalpanzi.mission_mate.core.designsystem.theme.MissionMateTypography import com.goalpanzi.mission_mate.feature.onboarding.R -import com.goalpanzi.mission_mate.core.designsystem.component.OutlinedTextChip -import com.goalpanzi.mission_mate.core.designsystem.component.StableImage @Composable fun BoardSetupSuccessScreen( diff --git a/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupViewModel.kt b/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupViewModel.kt index ad25406c..1eadcb88 100644 --- a/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupViewModel.kt +++ b/feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupViewModel.kt @@ -8,6 +8,7 @@ import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.goalpanzi.mission_mate.core.domain.common.DomainResult import com.goalpanzi.mission_mate.core.domain.mission.usecase.SetMissionJoinedUseCase +import com.goalpanzi.mission_mate.core.domain.onboarding.model.CreateMissionBody import com.goalpanzi.mission_mate.core.domain.onboarding.usecase.CreateMissionUseCase import com.goalpanzi.mission_mate.feature.onboarding.model.BoardSetupResult import com.goalpanzi.mission_mate.feature.onboarding.model.VerificationTimeType @@ -179,7 +180,7 @@ class BoardSetupViewModel @Inject constructor( } createMissionUseCase( - com.goalpanzi.mission_mate.core.domain.onboarding.model.CreateMissionBody( + CreateMissionBody( description = missionTitle, missionStartDate = formatLocalDateToString(startDate), missionEndDate = formatLocalDateToString(endDate), diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e5992c2c..18b46df2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -60,6 +60,12 @@ lottie-compose = "6.5.0" balloon = "1.6.6" [libraries] +## build-logic +android-gradle-plugin = { group = "com.android.tools.build", name = "gradle", version.ref = "agp" } +kotlin-gradle-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" } +compose-compiler-gradle-plugin = { module = "org.jetbrains.kotlin:compose-compiler-gradle-plugin", version.ref = "kotlin" } +ksp-gradle-plugin = { group = "com.google.devtools.ksp", name = "com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" } + ## Koitln kotlin-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 60df1575..a77bdfa6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -#Sat Jul 20 15:16:45 KST 2024 +#Sun Oct 13 16:30:39 KST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip diff --git a/settings.gradle.kts b/settings.gradle.kts index 2bad556c..9e3acd1f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,4 +1,5 @@ pluginManagement { + includeBuild("build-logic") repositories { google { content {