-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v5.1.2 릴리즈
- Loading branch information
Showing
663 changed files
with
30,856 additions
and
10,959 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
android/app/src/main/java/com/ddangddangddang/android/di/Annotations.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.ddangddangddang.android.di | ||
|
||
import javax.inject.Qualifier | ||
|
||
@Qualifier | ||
@Retention(AnnotationRetention.BINARY) | ||
annotation class AuthRetrofitQualifier | ||
|
||
@Qualifier | ||
@Retention(AnnotationRetention.BINARY) | ||
annotation class AuctionRetrofitQualifier | ||
|
||
@Qualifier | ||
@Retention(AnnotationRetention.BINARY) | ||
annotation class DateFormatter | ||
|
||
@Qualifier | ||
@Retention(AnnotationRetention.BINARY) | ||
annotation class TimeFormatter |
25 changes: 25 additions & 0 deletions
25
android/app/src/main/java/com/ddangddangddang/android/di/ApiServiceModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.ddangddangddang.android.di | ||
|
||
import com.ddangddangddang.data.remote.AuctionService | ||
import com.ddangddangddang.data.remote.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 ApiServiceModule { | ||
|
||
@Singleton | ||
@Provides | ||
fun provideAuthService(@AuthRetrofitQualifier retrofit: Retrofit): AuthService = | ||
retrofit.create(AuthService::class.java) | ||
|
||
@Singleton | ||
@Provides | ||
fun provideAuctionService(@AuctionRetrofitQualifier retrofit: Retrofit): AuctionService = | ||
retrofit.create(AuctionService::class.java) | ||
} |
36 changes: 36 additions & 0 deletions
36
android/app/src/main/java/com/ddangddangddang/android/di/FormatterModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.ddangddangddang.android.di | ||
|
||
import android.content.Context | ||
import com.ddangddangddang.android.R | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.android.qualifiers.ApplicationContext | ||
import dagger.hilt.components.SingletonComponent | ||
import java.time.format.DateTimeFormatter | ||
import java.util.Locale | ||
import javax.inject.Singleton | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
object FormatterModule { | ||
@DateFormatter | ||
@Singleton | ||
@Provides | ||
fun provideDateFormatter(@ApplicationContext context: Context): DateTimeFormatter { | ||
return DateTimeFormatter.ofPattern( | ||
context.getString(R.string.all_date_format), | ||
Locale.KOREAN, | ||
) | ||
} | ||
|
||
@TimeFormatter | ||
@Singleton | ||
@Provides | ||
fun provideTimeFormatter(@ApplicationContext context: Context): DateTimeFormatter { | ||
return DateTimeFormatter.ofPattern( | ||
context.getString(R.string.all_time_format), | ||
Locale.KOREAN, | ||
) | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
android/app/src/main/java/com/ddangddangddang/android/di/RepositoryModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.ddangddangddang.android.di | ||
|
||
import com.ddangddangddang.data.repository.AuctionRepository | ||
import com.ddangddangddang.data.repository.AuctionRepositoryImpl | ||
import com.ddangddangddang.data.repository.AuthRepository | ||
import com.ddangddangddang.data.repository.AuthRepositoryImpl | ||
import com.ddangddangddang.data.repository.CategoryRepository | ||
import com.ddangddangddang.data.repository.CategoryRepositoryImpl | ||
import com.ddangddangddang.data.repository.ChatRepository | ||
import com.ddangddangddang.data.repository.ChatRepositoryImpl | ||
import com.ddangddangddang.data.repository.RegionRepository | ||
import com.ddangddangddang.data.repository.RegionRepositoryImpl | ||
import com.ddangddangddang.data.repository.ReviewRepository | ||
import com.ddangddangddang.data.repository.ReviewRepositoryImpl | ||
import com.ddangddangddang.data.repository.UserRepository | ||
import com.ddangddangddang.data.repository.UserRepositoryImpl | ||
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 { | ||
@Singleton | ||
@Binds | ||
abstract fun bindAuctionRepository(auctionRepository: AuctionRepositoryImpl): AuctionRepository | ||
|
||
@Singleton | ||
@Binds | ||
abstract fun bindAuthRepository(authRepository: AuthRepositoryImpl): AuthRepository | ||
|
||
@Singleton | ||
@Binds | ||
abstract fun bindCategoryRepository(categoryRepository: CategoryRepositoryImpl): CategoryRepository | ||
|
||
@Singleton | ||
@Binds | ||
abstract fun bindChatRepository(chatRepository: ChatRepositoryImpl): ChatRepository | ||
|
||
@Singleton | ||
@Binds | ||
abstract fun bindRegionRepository(regionRepository: RegionRepositoryImpl): RegionRepository | ||
|
||
@Singleton | ||
@Binds | ||
abstract fun bindUserRepository(userRepository: UserRepositoryImpl): UserRepository | ||
|
||
@Singleton | ||
@Binds | ||
abstract fun bindReviewRepository(reviewRepository: ReviewRepositoryImpl): ReviewRepository | ||
} |
Oops, something went wrong.