Skip to content

Commit

Permalink
Merge pull request #11 from depromeet/fix/#10-hilt-annotation-fix
Browse files Browse the repository at this point in the history
[#10/FIX] Hilt 모듈 어노테이션 변경작업
  • Loading branch information
SsongSik authored Jul 9, 2024
2 parents 4e7d859 + bd9d2ca commit 0cabf3e
Show file tree
Hide file tree
Showing 3 changed files with 197 additions and 21 deletions.
197 changes: 185 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,188 @@
# Created by https://www.toptal.com/developers/gitignore/api/android,androidstudio,kotlin
# Edit at https://www.toptal.com/developers/gitignore?templates=android,androidstudio,kotlin

### Android ###
# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Log/OS Files
*.log

# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.apk
output.json

# IntelliJ
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml

# Keystore files
*.jks
*.keystore

# Google Services (e.g. APIs or Firebase)
google-services.json

# Android Profiling
*.hprof

### Android Patch ###
gen-external-apklibs

# Replacement of .externalNativeBuild directories introduced
# with Android Studio 3.5.

### Kotlin ###
# Compiled class file
*.class

# Log file

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

### AndroidStudio ###
# Covers files to be ignored for android development using Android Studio.

# Built application files
*.ap_
*.aab

# Files for the ART/Dalvik VM
*.dex

# Java class files

# Generated files
.DS_Store
/build
/captures
bin/
gen/
out/

# Gradle files
.gradle

# Signing files
.signing/

# Local configuration file (sdk path, etc)

# Proguard folder generated by Eclipse
proguard/

# Log Files

# Android Studio
/*/build/
/*/local.properties
/*/out
/*/*/build
/*/*/production
.navigation/
*.ipr
*~
*.swp

# Keystore files

# Google Services (e.g. APIs or Firebase)
# google-services.json

# Android Patch

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx
local.properties

# NDK
obj/

# IntelliJ IDEA
*.iws
/out/

# User-specific configurations
.idea/caches/
.idea/libraries/
.idea/shelf/
.idea/workspace.xml
.idea/tasks.xml
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
.idea/assetWizardSettings.xml
.idea/gradle.xml
.idea/jarRepositories.xml
.idea/navEditor.xml

# Legacy Eclipse project files
.classpath
.project
.cproject
.settings/

# Mobile Tools for Java (J2ME)

# Package Files #

# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)

## Plugin-specific files:

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Mongo Explorer plugin
.idea/mongoSettings.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### AndroidStudio Patch ###

!/gradle/wrapper/gradle-wrapper.jar

# End of https://www.toptal.com/developers/gitignore/api/android,androidstudio,kotlin
11 changes: 6 additions & 5 deletions app/src/main/java/com/depromeet/spot/di/DataSourceModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ package com.depromeet.spot.di

import com.depromeet.data.datasource.ExampleDataSource
import com.depromeet.data.datasource.remote.ExampleDataSourcelmpl
import dagger.Binds
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object DataSourceModule {
abstract class DataSourceModule {

@Provides
@Binds
@Singleton
fun provideMockDataSource(mockDataSourceImpl: ExampleDataSourcelmpl): ExampleDataSource =
mockDataSourceImpl
abstract fun bindExampleDataSource(
exampleDataSourcelmpl: ExampleDataSourcelmpl
): ExampleDataSource
}
10 changes: 6 additions & 4 deletions app/src/main/java/com/depromeet/spot/di/RepositoryModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.depromeet.spot.di

import com.depromeet.data.repository.ExampleRepositoryImpl
import com.depromeet.domain.repository.ExampleRepository
import dagger.Binds
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand All @@ -10,10 +11,11 @@ import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object RepositoryModule {
abstract class RepositoryModule {

@Provides
@Binds
@Singleton
fun provideMockRepository(mockRepositoryImpl: ExampleRepositoryImpl): ExampleRepository =
mockRepositoryImpl
abstract fun bindExampleRepository(
exampleRepositoryImpl: ExampleRepositoryImpl
): ExampleRepository
}

0 comments on commit 0cabf3e

Please sign in to comment.