Releases: ansman/auto-dagger
0.4.0
New Features
Auto binding objects
Auto Dagger now supports binding Kotlin objects directly without manually providing them to the Graph. This is useful if you have non DI code that use a Singleton but you'd like to start injecting it.
It's also useful for testing when you might want to replace a real implementation with a dummy object.
See the documentation for @AutoBind
or @Replaces
for more info and examples.
Bug fixes
Handle providers in a companion objects
Due to a bug, annotating providers in a companion object with @AutoInitialize
would log an error. This has been fixed.
Details
- Change the resource test package names by @ansman in #19
- Handle providers and bindings in companion objects by @ansman in #20
- Allow auto binding Kotlin objects by @ansman in #21
Full Changelog: 0.3.0...0.4.0
0.3.0
@Replaces
A new annotation, @Replaces
, has been added which can be used to replace bindings during tests.
See the documentation for more info.
What's Changed
Full Changelog: 0.2.0...0.3.0
0.2.0
Features
Project Rename
The project has been renamed from "Deager" to "Auto Dagger" to better reflect what the goal is with the library.
The code has also moved:
Deager | Auto Dagger |
---|---|
se.ansman.deager.Eager |
se.ansman.dagger.auto.AutoInitialize |
se.ansman.deager.EagerInitializer |
se.ansman.dagger.auto.AutoDaggerInitializer |
se.ansman.deager.Initializable |
se.ansman.dagger.auto.Initializable |
se.ansman.deager.android.DeagerInitializer |
se.ansman.dagger.auto.android.AutoDaggerStartupInitializer |
Support for automatic binding of objects
A suite of new annotations (@AutoBind
, @AutoBindIntoSet
and @AutoBindIntoMap
) has been added that
lets you automatically bind objects.
Update Dagger
Dagger has been updated to 2.45
Fixes
Priority for initializable objects
A bug has been fixed that caused the specified priority to be ignored when annotating an Initializable
object was annotated with @AutoInitialize
.
Java version warning fix
A warning about incompatible java versions has been fixed.
Relevant pull requests
- Support all java versions by @ansman in #1
- Update to the latest dagger by @ansman in #2
- Rename project to auto-dagger by @ansman in #4
- Make the module constructor a primary constructor by @ansman in #5
- Implement a feature to binding objects automatically by @ansman in #11
- Fix a bug that ignored the priority if the target was initializable by @ansman in #12
Full Changelog: 0.1.0...0.2.0