Skip to content

Conversation

@aitorvs
Copy link
Collaborator

@aitorvs aitorvs commented Mar 31, 2021

Task/Issue URL: https://app.asana.com/0/414730916066338/1200105747936521/f
Tech Design URL:
CC:

Description:
This PR updates anvil to version 2.2.0. Anvil now provides a new handy annotation ContributesMultibinding that allow us to contribute dependencies into sets, like we do for eg. workers or view model factories.
Using that annotation allow us to remove a bunch of boilerplate code.

In this PR we:

  • Bumped anvil to 2.2.0 and upgrade dagger to 2.32
  • Get VM factories to contribute multibinding
  • Get Worker factories to contribute multibindings

Steps to test this PR:

  1. app builds
  2. install/upgrade app
  3. verify bookmarks work
  4. verify fireproof sites work
  5. verify search/navigation works
  6. verify fire button works

Internal references:

Software Engineering Expectations
Technical Design Template

Comment on lines -44 to -47
implementation AndroidX.room.rxJava2
kapt AndroidX.room.compiler
testImplementation AndroidX.room.testing
androidTestImplementation AndroidX.room.testing
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have room entities here but we don't need to have the room annotation processor here. We just need access to the annotations. The app module will take care of the code generation.

This should also improve build times a bit

version.com.nhaarman.mockitokotlin2..mockito-kotlin=2.1.0
version.google.android.material=1.2.1
version.google.dagger=2.27
version.google.dagger=2.32
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated dagger to have the same version than anvil 2.2.0.

id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'com.squareup.anvil'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kapt is not needed here. it should improve a bit build times

Copy link
Contributor

@malmstein malmstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updates and fresh installs working as expected, 💯 for removing code. Great stuff @aitorvs

@aitorvs aitorvs merged commit ce97801 into develop Apr 1, 2021
@aitorvs aitorvs deleted the feature/aitor/anvil_update branch April 1, 2021 10:04
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.

3 participants