Skip to content

Commit

Permalink
[refactor] #11: hilt plugin 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
MinseoSONG committed Dec 18, 2024
1 parent 6aee8ee commit bf5c9f9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
4 changes: 0 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ plugins {
id("org.jetbrains.kotlin.kapt")
}

hilt{
enableAggregatingTask = false
}

val properties = Properties().apply{
load(project.rootProject.file("local.properties").inputStream())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class SignInViewModel @Inject constructor(
setState { copy(isLoading = true) }
viewModelScope.launch {
val state = uiState.value
val result = loginUseCase.invoke(state.userId, state.userPassWord)
val result = loginUseCase(state.userId, state.userPassWord)
result.onSuccess { response ->
saveToken(response.token)
setState { copy(isLoading = false) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class SignUpViewModel @Inject constructor(
setState { copy(isLoading = true) }
val currentState = uiState.value
viewModelScope.launch {
val result = signUpUseCase.invoke(currentState.userId, currentState.userPassWord, currentState.userHobby)
val result = signUpUseCase(currentState.userId, currentState.userPassWord, currentState.userHobby)
result.onSuccess { response ->
setState { copy(isLoading = false) }
setSideEffect { SignUpSideEffect.ShowToast("회원가입 성공! 유저 ID: ${response.userNumber}") }
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.compose) apply false
alias(libs.plugins.dagger.hilt) apply false
}

0 comments on commit bf5c9f9

Please sign in to comment.