Releases: ansman/auto-dagger
1.5.0
Changes
Support for Kotlin 2.1.0
The biggest change in this release is support for Kotlin 2.1.0. As of Hilt 1.2.0, Kotlin 2.1.0 is not supported (see issue) so to upgrade set the language version to 2.1.
Details
- Rename gradle-plugin to build-logic by @ansman in #230
- Move KSP/KAPT specific things from compiler-common to compiler by @ansman in #231
- Bump shadow from 8.3.2 to 8.3.3 by @dependabot in #234
- Bump com.android.tools.build:gradle from 8.6.1 to 8.7.0 by @dependabot in #235
- Bump org.junit.jupiter:junit-jupiter from 5.11.0 to 5.11.2 by @dependabot in #236
- Change the test fixtures package name by @ansman in #232
- Bump ksp from 2.0.20-1.0.25 to 2.0.21-1.0.25 by @dependabot in #238
- Update to Gradle 8.10.2 by @ansman in #243
- Bump com.android.tools.build:gradle from 8.7.0 to 8.7.2 by @dependabot in #246
- Bump shadow from 8.3.3 to 8.3.5 by @dependabot in #247
- Bump androidx.lifecycle:lifecycle-viewmodel from 2.8.6 to 2.8.7 by @dependabot in #245
- Bump org.junit.jupiter:junit-jupiter from 5.11.2 to 5.11.3 by @dependabot in #240
- Bump kotlin from 2.0.20 to 2.0.21 by @dependabot in #237
- Bump projectAccessors from 1.1.0 to 1.2.0 by @dependabot in #250
- Update Gradle Wrapper from 8.10.2 to 8.11 by @ansman-gradle-wrapper-update in #252
- Bump org.robolectric:robolectric from 4.13 to 4.14 by @dependabot in #253
- Bump ksp from 2.0.21-1.0.25 to 2.0.21-1.0.27 by @dependabot in #248
- Enable parallel configuration caching by @ansman in #254
- Bump kotlinpoet from 1.18.1 to 2.0.0 by @dependabot in #241
- Bump ktorfit from 2.1.0 to 2.2.0 by @dependabot in #249
- Bump ksp from 2.0.21-1.0.27 to 2.0.21-1.0.28 by @dependabot in #255
- Bump compileTesting from 0.5.1 to 0.6.0 by @dependabot in #251
- Bump de.jensklingenberg.ktorfit:ktorfit-ksp from 2.2.0-1.0.27 to 2.2.0-1.0.28 by @dependabot in #256
- Update Gradle Wrapper from 8.11 to 8.11.1 by @ansman-gradle-wrapper-update in #257
- Bump org.robolectric:robolectric from 4.14 to 4.14.1 by @dependabot in #258
- Bump kotlin from 2.0.21 to 2.1.0 by @dependabot in #259
Full Changelog: 1.4.0...1.5.0
1.4.0
New features
Kotlin 2.0
auto-dagger now uses 2.0.20 and KSP 2.0.20-1.0.25.
K2/KSP2 is however not supported yet due to Dagger not supporting K2/KSP2.
Min SDK 21
The AndroidX libraries now require a minimum SDK version of 21. This matches what AndroidX now requires.
@Generated
annotation
All generated types now add the @Generated
annotation. This means that you must target Java 9 or higher to use auto-dagger.
Bug fixes
Fix a bug with room processing
If your Room database class contained anything except Daos, auto-dagger would incorrectly generate providers for them and if the return type was generic, then the class would fail to process. This has been fixed and only Daos will be provided.
Details
- Bump androidx.lifecycle:lifecycle-viewmodel from 2.8.4 to 2.8.5 by @dependabot in #216
- Bump com.android.tools.build:gradle from 8.5.2 to 8.6.0 by @dependabot in #214
- Update Gradle Wrapper from 8.10 to 8.10.1 by @ansman-gradle-wrapper-update in #218
- Bump com.squareup.okio:okio from 3.9.0 to 3.9.1 by @dependabot in #219
- Bump com.android.tools.build:gradle from 8.6.0 to 8.6.1 by @dependabot in #220
- Bump androidx.lifecycle:lifecycle-viewmodel from 2.8.5 to 2.8.6 by @dependabot in #222
- Downgrade to Gradle 8.10 by @ansman in #226
- Update android min SDK to 21 by @ansman in #228
- Bump androidx.startup:startup-runtime from 1.1.1 to 1.2.0 by @dependabot in #223
- Update to Kotlin 2.0.20 by @ansman in #227
- Add
@Generated
to all generated classes by @ansman in #225 - Fix processing RoomDatabases with non dao functions and properties by @ansman in #229
Full Changelog: 1.3.0...1.4.0
1.3.0
What's Changed
OptionallyProvided
A new annotation, @OptionallyProvided
, has been added. This new annotation generated @BindsOptionalOf
bindings.
See the docs for more info.
Details
- Bump androidx.lifecycle:lifecycle-viewmodel from 2.7.0 to 2.8.0 by @dependabot in #165
- Bump org.robolectric:robolectric from 4.12.1 to 4.12.2 by @dependabot in #166
- Bump com.android.tools.build:gradle from 8.4.0 to 8.4.1 by @dependabot in #167
- Bump kotlinpoet from 1.16.0 to 1.17.0 by @dependabot in #170
- Bump androidx.lifecycle:lifecycle-viewmodel from 2.8.0 to 2.8.1 by @dependabot in #172
- Update Gradle Wrapper from 8.7 to 8.8 by @ansman-gradle-wrapper-update in #173
- Bump com.android.tools.build:gradle from 8.4.1 to 8.4.2 by @dependabot in #176
- Bump androidx.lifecycle:lifecycle-viewmodel from 2.8.1 to 2.8.2 by @dependabot in #177
- Bump com.android.tools.build:gradle from 8.4.2 to 8.5.0 by @dependabot in #178
- Bump androidx.test:runner from 1.5.2 to 1.6.0 by @dependabot in #180
- Bump androidx-test from 1.5.0 to 1.6.0 by @dependabot in #179
- Bump androidx-test from 1.6.0 to 1.6.1 by @dependabot in #182
- Unify the androidx-test versions by @ansman in #183
- Bump org.junit.jupiter:junit-jupiter from 5.10.2 to 5.10.3 by @dependabot in #184
- Bump androidx.lifecycle:lifecycle-viewmodel from 2.8.2 to 2.8.3 by @dependabot in #186
- Bump kotlinpoet from 1.17.0 to 1.18.0 by @dependabot in #187
- Update Gradle Wrapper from 8.8 to 8.9 by @ansman-gradle-wrapper-update in #191
- Bump kotlinpoet from 1.18.0 to 1.18.1 by @dependabot in #194
- Bump com.android.tools.build:gradle from 8.5.0 to 8.5.1 by @dependabot in #192
- Bump org.robolectric:robolectric from 4.12.2 to 4.13 by @dependabot in #189
- Bump org.jetbrains.kotlinx.binary-compatibility-validator from 0.14.0 to 0.16.0 by @dependabot in #195
- Use a fixed license url when publishing to Maven by @simonlebras in #198
- Bump dagger from 2.51.1 to 2.52 by @dependabot in #202
- Bump androidx.lifecycle:lifecycle-viewmodel from 2.8.3 to 2.8.4 by @dependabot in #197
- Bump com.android.tools.build:gradle from 8.5.1 to 8.5.2 by @dependabot in #205
- Update Gradle Wrapper from 8.9 to 8.10 by @ansman-gradle-wrapper-update in #208
- Bump org.junit.jupiter:junit-jupiter from 5.10.3 to 5.11.0 by @dependabot in #206
- Fail if a resource test is unexpectedly empty by @ansman in #210
- Add an annotation for adding optional bindings by @ansman in #209
New Contributors
- @simonlebras made their first contribution in #198
Full Changelog: 1.2.1...1.3.0
1.2.1
1.2.0
Changes
Kotlin 1.9.24
The library has now been tested with Kotlin 1.9.24
Adding the android-api
artifact
The android
artifact pulls in AndroidX startup which can cause issues for android tests in feature modules. A new artifact, android-api
, has been introduced that can be added to Android library modules.
Details
- Bump de.jensklingenberg.ktorfit:ktorfit-lib from 1.12.0 to 1.13.0 by @dependabot in #155
- Bump com.willowtreeapps.assertk:assertk-jvm from 0.28.0 to 0.28.1 by @dependabot in #157
- Bump com.android.tools.build:gradle from 8.3.2 to 8.4.0 by @dependabot in #158
- Bump ru.vyarus.mkdocs from 3.0.0 to 4.0.1 by @dependabot in #154
- Bump de.jensklingenberg.ktorfit:ktorfit-lib from 1.13.0 to 1.14.0 by @dependabot in #156
- Split the Android module into api and impl by @ansman in #163
- Update to Kotlin 1.9.24 by @ansman in #162
Full Changelog: 1.1.0...1.2.0
1.1.0
What's new
Ktorfit support
Ktorfit, a multiplatform version of Retrofit, is now supported.
Check out the docs for info on how to get started.
Min SDK 19
Just like AndroidX, the min SDK required is now 19.
Dagger 2.51 support
auto-dagger has now been tested with Dagger 2.51.
Kotlin 1.9.23
Using auto-dagger now requires Kotlin 1.9.23 or later.
Details
- Bump ksp from 1.9.22-1.0.16 to 1.9.22-1.0.17 by @dependabot in #125
- Bump kotlinpoet from 1.15.3 to 1.16.0 by @dependabot in #124
- Bump org.jetbrains.kotlinx:kotlinx-metadata-jvm from 0.8.0 to 0.9.0 by @dependabot in #123
- Bump the minSdk to 19 by @ansman in #126
- Bump com.android.tools.build:gradle from 8.2.0 to 8.2.1 by @dependabot in #121
- Bump androidx.lifecycle:lifecycle-viewmodel from 2.6.2 to 2.7.0 by @dependabot in #122
- Bump org.jetbrains.kotlinx.binary-compatibility-validator from 0.13.2 to 0.14.0 by @dependabot in #128
- Bump org.junit.jupiter:junit-jupiter from 5.10.1 to 5.10.2 by @dependabot in #129
- Bump com.android.tools.build:gradle from 8.2.1 to 8.2.2 by @dependabot in #127
- Bump com.squareup.okio:okio from 3.7.0 to 3.8.0 by @dependabot in #130
- Bump dagger from 2.50 to 2.51 by @dependabot in #131
- Bump com.android.tools.build:gradle from 8.2.2 to 8.3.0 by @dependabot in #133
- Bump dokka from 1.9.10 to 1.9.20 by @dependabot in #134
- Bump kotlin from 1.9.22 to 1.9.23 by @dependabot in #135
- Bump ksp from 1.9.22-1.0.17 to 1.9.23-1.0.19 by @dependabot in #136
- Bump com.squareup.okio:okio from 3.8.0 to 3.9.0 by @dependabot in #137
- Bump retrofit from 2.9.0 to 2.10.0 by @dependabot in #138
- Update Gradle Wrapper from 8.5 to 8.7 by @ansman-gradle-wrapper-update in #142
- Switch to the patched version of kotlin-compile-testing by @ansman in #143
- Remove the shadowjar archive classifier by @ansman in #144
- Bump com.android.tools.build:gradle from 8.3.0 to 8.3.1 by @dependabot in #139
- Bump compileTesting from 0.4.0 to 0.4.1 by @dependabot in #145
- Bump retrofit from 2.10.0 to 2.11.0 by @dependabot in #146
- Start using the project accessors plugin by @ansman in #147
- Bump org.robolectric:robolectric from 4.11.1 to 4.12 by @dependabot in #149
- Bump org.robolectric:robolectric from 4.12 to 4.12.1 by @dependabot in #150
- Bump dagger from 2.51 to 2.51.1 by @dependabot in #148
- Bump com.android.tools.build:gradle from 8.3.1 to 8.3.2 by @dependabot in #152
- Bump ksp from 1.9.23-1.0.19 to 1.9.23-1.0.20 by @dependabot in #151
- Add support for ktorfit by @ansman in #153
New Contributors
- @ansman-gradle-wrapper-update made their first contribution in #142
Full Changelog: 1.0.0...1.1.0
1.0.0
This is the first API stable release of auto dagger 🎉
Changes since 0.11.0
Kotlin 1.9.22
Auto dagger has now been compiled and tested with Kotlin 1.9.22 and KSP 1.9.22-1.0.16
Dagger 2.50
Auto dagger has now been tested with 2.50
Details
- Bump com.android.tools.build:gradle from 8.1.2 to 8.1.3 by @dependabot in #103
- Bump com.android.tools.build:gradle from 8.1.3 to 8.1.4 by @dependabot in #104
- Bump ksp from 1.9.20-1.0.14 to 1.9.21-1.0.15 by @dependabot in #107
- Bump dagger from 2.48.1 to 2.49 by @dependabot in #111
- Bump kotlinpoet from 1.14.2 to 1.15.3 by @dependabot in #112
- Bump room from 2.6.0 to 2.6.1 by @dependabot in #108
- Bump kotlin from 1.9.20 to 1.9.22 by @dependabot in #118
- Bump ksp from 1.9.21-1.0.15 to 1.9.22-1.0.16 by @dependabot in #119
- Bump com.squareup.okio:okio from 3.6.0 to 3.7.0 by @dependabot in #116
- Update to Gradle 8.5 by @ansman in #120
- Bump com.android.tools.build:gradle from 8.1.4 to 8.2.0 by @dependabot in #110
- Bump org.jetbrains.kotlinx:kotlinx-metadata-jvm from 0.7.0 to 0.8.0 by @dependabot in #114
- Bump dagger from 2.49 to 2.50 by @dependabot in #117
- Bump com.willowtreeapps.assertk:assertk-jvm from 0.27.0 to 0.28.0 by @dependabot in #113
Full Changelog: 0.11.0...1.0.0
0.11.0
Changes
Kotlin 1.9.20
Kotlin has been bumped to 1.9.20
and KSP to 1.9.20-1.0.14
.
Compile SDK 34
The project is now compiled against Android 34
Dagger 2.48.1
Dagger has been bumped to 2.48.1
Details
- Bump org.robolectric:robolectric from 4.10.3 to 4.11.1 by @dependabot in #99
- Bump com.squareup.okio:okio from 3.5.0 to 3.6.0 by @dependabot in #91
- Bump dagger from 2.48 to 2.48.1 by @dependabot in #92
- Bump com.adarshr:gradle-test-logger-plugin from 3.2.0 to 4.0.0 by @dependabot in #93
- Bump kotlin from 1.9.10 to 1.9.20 by @dependabot in #97
- Update to compile SDK 34 by @ansman in #100
- Bump ksp from 1.9.10-1.0.13 to 1.9.20-1.0.13 by @dependabot in #98
- Bump dokka from 1.9.0 to 1.9.10 by @dependabot in #94
- Bump room from 2.5.2 to 2.6.0 by @dependabot in #95
- Bump ksp from 1.9.20-1.0.13 to 1.9.20-1.0.14 by @dependabot in #101
- Bump org.junit.jupiter:junit-jupiter from 5.10.0 to 5.10.1 by @dependabot in #102
Full Changelog: 0.10.0...0.11.0
0.10.0
Changes
⚠️ Breaking: Rename of BindGenericAs
entries ⚠️
BindGenericAs.Type
has been renamed to BindGenericAs.ExactType
and BindGenericAs.TypeAndWildcard
has been renamed to BindGenericAs.ExactTypeAndWildcard
.
These names are much clearer as Type
wasn't really indicative of what it did.
BindGenericAs.Default
There is now a new annotation called @BindGenericAs.Default
which can be placed on the target type to set the default value for BindGenericAs
.
As a quick example:
@BindGenericAs.Default(BindGenericAs.Wildcard)
interface Resource<T>
// This will be bound as Resource<*> since the default has been set to wildcard for Resource.
@AutoBindIntoSet
class SomeResource @Inject constructor() : Resource<Something>
See the documentation for more information.
Details
- Remove the deprecated typealiases by @ansman in #85
- Bump androidx.lifecycle:lifecycle-viewmodel from 2.6.1 to 2.6.2 by @dependabot in #87
- Add a way to change the default
BindGenericAs
. by @ansman in #90
Full Changelog: 0.9.1...0.10.0
0.9.1
Changes
Change of an invalid package name
The code for the AndroidX ViewModel and Room extensions had accidentally been added to the co.ansman
namespace instead of se.ansman
. These files have been moved and new deprecated type aliases have been added. These type aliases will be removed in the next release.
Details
- Bump dokka from 1.8.20 to 1.9.0 by @dependabot in #83
- Fix the package name of AutoProvideDaos and the ViewModel code by @ansman in #84
Full Changelog: 0.9.0...0.9.1