Skip to content

Commit

Permalink
Fix Default file generation in multiple projects
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudgiuliani committed Jul 15, 2024
1 parent 3ce524a commit fb872a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

// getKoin().declare(ProvidedComponent())
getKoin().declare(MyProvidedComponent())

setContentView(R.layout.main_activity)
title = "Android Coffee Maker"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ import org.koin.core.annotation.Provided
import org.koin.sample.androidx.MainActivity
import org.koin.sample.androidx.data.ProvidedComponent

class MyProvidedComponent

@Factory
class MyPresenter(@InjectedParam val mainActivity: MainActivity, val context: Context)
class MyPresenter(@InjectedParam val mainActivity: MainActivity, val context: Context, @Provided val provided : MyProvidedComponent)
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class KoinGenerator(
generateDefaultModule: Boolean
) {
logger.logging("generate default file ...")
val defaultModuleFile = codeGenerator.getFile(fileName = "Default")
val defaultModuleFile = codeGenerator.getFile(fileName = "Default${defaultModule.hashCode()}")
defaultModuleFile.generateDefaultModuleHeader(defaultModule.definitions)
generateAllExternalDefinitions(defaultModule, defaultModuleFile)

Expand Down

0 comments on commit fb872a6

Please sign in to comment.