Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand resolve api #1225

Merged
merged 14 commits into from
Jan 11, 2022

Conversation

marcellogalhardo
Copy link
Contributor

@marcellogalhardo marcellogalhardo commented Nov 19, 2021

Following up on the Pull Request of constructor resolution and @arnaudgiuliani suggestion as improvement, the following PR adds new methods for resolve factory, single and viewModel - including support for qualifier or not.

That is how it looks like:

module {
    singleOf(::UserRepository)
    factoryOf(named("a"), ::UserProperty)
    viewModelOf(::UserViewModel)
}

// For comparison, before and after:
module {  
    viewModel(named("a")) { MyViewModel(get(), get(), get()) }
    viewModelOf(named("a"), ::MyViewModel)
}

The Pull Request includes:

  • viewModelOf
  • singleOf
  • factoryOf
  • scopedOf

Original Pull Request (with discussion): #1206

Fixes #1029

@qwert2603
Copy link
Contributor

Hello!
Great changes!
It can resolve this issue, too

@arnaudgiuliani arnaudgiuliani added this to the 3.2.0 milestone Nov 22, 2021
@arnaudgiuliani arnaudgiuliani changed the base branch from main to 3.2.x December 7, 2021 17:42
@arnaudgiuliani
Copy link
Member

Great work @marcellogalhardo. check the remaining conflict.

I can help to setup some doc around

@marcellogalhardo
Copy link
Contributor Author

Hey @arnaudgiuliani - I believe all conflicts are solved now. Let me know if anything is missing.

@arnaudgiuliani
Copy link
Member

Great. Seems ready to go to 3.2.x

@arnaudgiuliani arnaudgiuliani added the status:accepted accepted to be developed label Jan 10, 2022
@arnaudgiuliani arnaudgiuliani merged commit 9e3bdce into InsertKoinIO:3.2.x Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplified beans definition
3 participants