Releases: square/anvil
Releases · square/anvil
v2.5.0-beta11
v2.5.0-beta10
Deprecated
ClassReference.functions
has been deprecated in favor ofClassReference.memberFunctions
andClassReference.declaredMemberFunctions
ClassReference.properties
has been deprecated in favor ofClassReference.memberProperties
andClassReference.declaredMemberProperties
Fixed
v2.5.0-beta09
Deprecated
ClassName.generateClassName()
andClassReference.generateClassName()
have been renamed to__.joinSimpleNames()
for the sake of clarity. TheClassName
version has also moved packages, so its new fully qualified name iscom.squareup.anvil.compiler.internal.joinSimpleNames
.ClassName.generateClassNameString()
has been renamed/moved tocom.squareup.anvil.compiler.internal.generateHintFileName()
.
Fixed
- Anvil will now attempt to shorten the names of hint files, generated "merged" subcomponents, and contributed binding modules so that all file names derived from them will have 255 characters or fewer.
v2.5.0-beta08
Changed
- Anvil's generated hints are now all generated to the same
anvil.hint
package, which simplifies hint lookups and better future-proofs future KSP work. Note that this is a user-invisible change, but it will require a one-time recompilation of any Anvil-generated hints. (#975)
Fixed
v2.5.0-beta07
Fixed
- Another mangled name workaround in KSP (#966)
v2.5.0-beta06
Deprecated
ContributesBinding.priority
has been deprecated in favor of the int-value-basedContributesBinding.rank
. This allows for more granular prioritization, rather than just the three enum entries thatContributesBinding.Priority
offered.
Important
IDE auto-replace can auto-replace the enum entry with the corresponding integer, but not the named argument. Automatically-migrated code may wind up with something like priority = RANK_NORMAL
. This is an IntelliJ limitation.
Removed
Fixed
v2.5.0-beta05
Added
- Support KSP in BindsMethodValidator by @IlyaGulya (#831)
Fixed
- fix interface based @ContributesSubcomponent.Factory in KSP by @gabrielittner (#931)
- Fix KSP resolution of Priority (#933)
- Gracefully handle module name resolution in KSP (#947)
- Always generate provider factories for binding modules (#951)
- use the resolved value of
const
arguments in propagated annotation arguments (#940) - re-run analysis between an incremental sync and code generation (#943)
- delay
@ContributesSubcomponent
generation until the last analysis rounds (#946)
Dependencies
v2.5.0-beta04
Changed
- Interface merging is now done in the IR backend, improving performance and future compatibility with K2.
- Update Dagger to
2.51
. @ContributesBinding
and@ContributesMultibinding
have been completely reworked to a new implementation that generates one binding dagger module for each contributed binding. While not an ABI-breaking change, this does change the generated code and requires users to re-run Anvil's code gen over any projects contributing bindings in order to be merged with the new implementation.
Fixed
- Code generated because of a
@Contributes___
annotation in a dependency module is now correctly deleted when there is a relevant change in the dependency module. - Nested interfaces and modules can now be contributed to enclosing classes.
v2.5.0-beta03
v2.5.0-beta02
Fixed
- Binding supertype which is narrower than return type is wrongly allowed by @IlyaGulya in (#833)
- Don't cache the
projectDir
orbinaryFile
as part ofGeneratedFileCache
by @RBusarow in (#883) - Add restored-from-cache, previously-generated files to analysis results after code generation by @RBusarow in (#882)
Other Notes & Contributions
- @IlyaGulya made their first contribution in (#833)