Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Apr 2, 2023

This PR contains the following updates:

Package Change Age Confidence
com.squareup.anvil 2.4.82.7.0 age confidence
com.squareup.anvil:gradle-plugin 2.4.82.7.0 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

square/anvil (com.squareup.anvil)

v2.7.0

Changed
  • Upgrade Kotlin to 2.2.20
  • Upgrade Dagger to 2.57.2
  • Constructors for generated Factorys and MembersInjectors are now private to match changes in Dagger 2.57. This is a breaking change if you relied on the generated constructors and can instead call their static create methods.
Deprecated
  • AndroidVariantFilter.androidVariant is now nullable and deprecated. We're no longer guaranteed that the variant will be available when creating the filter, and the base type is slated to be removed in a future release of AGP.

v2.6.1

Changed
  • Upgrade Kotlin to 2.2.0
  • Update README and ROADMAP docs to note Anvil's deprecation

v2.6.0

Changed
  • Upgrade Kotlin to 2.1.21
  • Upgrade kotlin-metadata to 2.1.21. This will remain in sync with the Kotlin version for all future releases.
  • Upgrade KotlinPoet to 2.2.0
  • Upgrade Dagger to 2.56.2
    • This includes updating Anvil's Dagger factory generation code to match changes in Dagger 2.54+ for using the dagger.internal.Provider type, which helps prepare for jakarta support. This applies if you use Anvil's generateDaggerFactories or generateDaggerFactoriesOnly options and is expected to be a breaking change if you have any @Components built using older Dagger versions.
  • Development snapshots are now published to the Central Portal Snapshots repository.

v2.5.1

Added
  • Documented Anvil's roadmap, see here.
Changed
  • Improved incremental compilation support is now enabled by default (#​1076). You can still opt-out or temporarily disable this by setting com.squareup.anvil.trackSourceFiles=false in your gradle.properties file. Note that this property will be removed in a future version.
Dependencies
  • Upgrade Kotlin to 2.0.21 (#​1059). Note that while this release targets Kotlin 2.0, the K2 compiler is not yet supported (see the roadmap for more details).

v2.5.0

Anvil now experimentally supports incremental compilation and Gradle's build caching,
as of v2.5.0.

This feature is disabled by default.
It can be enabled via a Gradle property or the Gradle DSL:

Gradle Properties
# gradle.properties
com.squareup.anvil.trackSourceFiles=true # default is false
Gradle DSL
// build.gradle
anvil {
  trackSourceFiles = true // default is false
}
Added
  • Incremental compilation and build caching fixes (#​836)
  • Configuration options can now be set via Gradle properties (#​851)
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)
  • Interface merging is now done in the IR backend, improving performance and future compatibility with K2.
  • @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.
Deprecated
  • ClassReference.functions has been deprecated in favor of ClassReference.memberFunctions and ClassReference.declaredMemberFunctions
  • ClassReference.properties has been deprecated in favor of ClassReference.memberProperties and ClassReference.declaredMemberProperties
  • ClassName.generateClassName() and ClassReference.generateClassName() have been renamed to __.joinSimpleNames() for the sake of clarity. The ClassName version has also moved packages, so its new fully qualified name is com.squareup.anvil.compiler.internal.joinSimpleNames.
  • ClassName.generateClassNameString() has been renamed/moved to com.squareup.anvil.compiler.internal.generateHintFileName().
  • ContributesBinding.priority has been deprecated in favor of the int-value-based ContributesBinding.rank. This allows for more granular prioritization, rather than just the three enum entries that ContributesBinding.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
  • Drop Kotlin 1.8 support (#​841)
Fixed
  • don't leak Anvil's annotation artifacts to the target project's compile classpath (#​822)
  • Gradle configuration caching will no longer be invalidated by changes to ir-merges.txt (#​1045)
  • The Anvil plugin will no longer cause KaptGenerateStubsTask tasks to be configured eagerly (#​1043)
  • resolve inherited field-injected generic properties to their substituted type (#​1040)
  • Resolve generic types when checking Subcomponent factory return types (#​1041)
  • consider ignoreQualifier arguments when checking for duplicate bindings (#​1033)
  • incremental compilation is automatically disabled for source sets that perform interface or module merging (#​1024)
  • include inherited functions in Subcomponent Factory checks (#​1038)
  • 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.
  • cache generated file paths relative to the build directory (changed from project directory) (#​979)
  • pass files with only top-level function/property declarations to CodeGenerator implementations (#​956)
  • rename the new int-based priority to rank, restore the enum to priority (#​957)
  • Fix private targets API use (#​961)
  • 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)
  • 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.
  • Don't fail the build when a @Binds-annotated function binds a generic type (#​885)
    • This is a revert of the changes in (#​833).
  • Binding supertype which is narrower than return type is wrongly allowed by @​IlyaGulya in (#​833)
  • Don't cache the projectDir or binaryFile as part of GeneratedFileCache (#​883)
  • Add restored-from-cache, previously-generated files to analysis results after code generation (#​882)
Dependencies
  • Update dependency gradle to v8.11.1 (#​1072)
  • Update dagger to v2.51.1 (#​944)
  • Upgrade Kotlin to 1.9.24 (#​891)
Custom Code Generator
  • The GeneratedFile result type has been deprecated in favor of GeneratedFileWithSources. This new type allows for precise tracking of the generated files, which in turn drastically improves incremental compilation performance (#​693).
Other Notes & Contributions

Full Changelog: square/anvil@v2.4.9...v2.5.0

v2.4.9

Changed
  • Upgrade Kotlin to 1.9.20
Fixed
  • Fix a configuration error related to version catalogs when building on Windows (#​744)
Other Notes & Contributions
  • Use Anvil version 2.4.9-1-8 if your project is using Kotlin 1.8.x. This is also the last planned release with Kotlin 1.8.x support.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot changed the title fix(deps): update dependency com.squareup.anvil:gradle-plugin to v2.4.4 fix(deps): update dependency com.squareup.anvil:gradle-plugin to v2.4.4 - autoclosed Apr 2, 2023
@renovate renovate bot closed this Apr 2, 2023
@renovate renovate bot deleted the renovate/anvil branch April 2, 2023 05:41
@renovate renovate bot changed the title fix(deps): update dependency com.squareup.anvil:gradle-plugin to v2.4.4 - autoclosed fix(deps): update dependency com.squareup.anvil:gradle-plugin to v2.4.4 Apr 7, 2023
@renovate renovate bot reopened this Apr 7, 2023
@renovate renovate bot restored the renovate/anvil branch April 7, 2023 04:19
@renovate renovate bot force-pushed the renovate/anvil branch from 0ed253b to 0eb7ee1 Compare April 7, 2023 09:43
@renovate renovate bot changed the title fix(deps): update dependency com.squareup.anvil:gradle-plugin to v2.4.4 fix(deps): update dependency com.squareup.anvil:gradle-plugin to v2.4.5 Apr 7, 2023
@renovate renovate bot changed the title fix(deps): update dependency com.squareup.anvil:gradle-plugin to v2.4.5 fix(deps): update dependency com.squareup.anvil:gradle-plugin to v2.4.6 May 26, 2023
@renovate renovate bot force-pushed the renovate/anvil branch from 0eb7ee1 to 09cd2e3 Compare May 26, 2023 01:50
@renovate renovate bot changed the title fix(deps): update dependency com.squareup.anvil:gradle-plugin to v2.4.6 fix(deps): update dependency com.squareup.anvil:gradle-plugin to v2.4.7-1-8 Jul 29, 2023
@renovate renovate bot force-pushed the renovate/anvil branch 9 times, most recently from 5b92d77 to 9e5856f Compare July 30, 2023 03:49
@renovate renovate bot changed the title fix(deps): update dependency com.squareup.anvil:gradle-plugin to v2.4.7-1-8 fix(deps): update dependency com.squareup.anvil:gradle-plugin to v2.4.8-1-8 Sep 8, 2023
@renovate renovate bot changed the title fix(deps): update dependency com.squareup.anvil:gradle-plugin to v2.4.8-1-8 chore(deps): update anvil to v2.4.8-1-8 Oct 27, 2023
@renovate renovate bot force-pushed the renovate/anvil branch from 9a93a21 to b7f85e3 Compare January 6, 2024 04:37
@renovate renovate bot changed the title chore(deps): update anvil to v2.4.8-1-8 chore(deps): update anvil to v2.4.9-1-8 Jan 6, 2024
@renovate renovate bot force-pushed the renovate/anvil branch 2 times, most recently from c0ce745 to 5c98f0d Compare January 18, 2024 08:28
@renovate renovate bot force-pushed the renovate/anvil branch from 5c98f0d to 559ad73 Compare April 22, 2024 06:33
@renovate renovate bot changed the title chore(deps): update anvil to v2.4.9-1-8 chore(deps): update anvil to v2.5.0 Dec 4, 2024
@renovate renovate bot changed the title chore(deps): update anvil to v2.5.0 fix(deps): update anvil to v2.5.0 Dec 10, 2024
@renovate renovate bot changed the title fix(deps): update anvil to v2.5.0 fix(deps): update anvil to v2.5.1 Jan 26, 2025
@renovate renovate bot force-pushed the renovate/anvil branch from 03bc6d9 to 790ee05 Compare July 11, 2025 03:09
@renovate renovate bot changed the title fix(deps): update anvil to v2.5.1 fix(deps): update anvil to v2.6.0 Jul 11, 2025
@renovate renovate bot force-pushed the renovate/anvil branch from 790ee05 to 8a264fb Compare July 18, 2025 21:40
@renovate renovate bot changed the title fix(deps): update anvil to v2.6.0 fix(deps): update anvil to v2.6.1 Jul 18, 2025
@renovate renovate bot force-pushed the renovate/anvil branch from 8a264fb to b32bc0f Compare October 3, 2025 02:25
@renovate renovate bot changed the title fix(deps): update anvil to v2.6.1 fix(deps): update anvil to v2.7.0 Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant