Skip to content

Update Kotlin, Hilt, and all the dependencies. Fix upgrading issues#51

Merged
hrodrick merged 2 commits into
rootstrap:masterfrom
hrodrick:feature/update-project
Nov 11, 2021
Merged

Update Kotlin, Hilt, and all the dependencies. Fix upgrading issues#51
hrodrick merged 2 commits into
rootstrap:masterfrom
hrodrick:feature/update-project

Conversation

@hrodrick
Copy link
Copy Markdown
Contributor

@hrodrick hrodrick commented Oct 21, 2021

ISSUE[#50]

  • Update project dependencies

Description

  • Updated Kotlin to 1.5.31
  • Project dependencies updated to current versions.
  • Migrated Kotlin synthetics (deprecated) to android viewBinding
  • Migrated deprecated & removed Hilt annotations to their equivalent in the new Hilt version. (3.29.1)
  • Updated viewBinding and dataBinding configurations in app's build.gradle
  • Replaced deprecated android.arch Room with AndroidX Room.
  • Added "export=true" property on the manifest's launchable Activity because it is needed when targetting Android 12.
  • Applied kapt : correctErrorTypes as it is required by new Hilt versions to correctly inject depedencies

@hrodrick
Copy link
Copy Markdown
Contributor Author

hrodrick commented Oct 26, 2021

Detected some compiling errors that only happen in AppCenter because of outdated libraries that I didn't see.
I'm going to update them soon in this same PR.

Note : Fastlane build was successful

Update

  • Dependencies updated and working.

@hrodrick hrodrick self-assigned this Nov 3, 2021
Comment thread app/build.gradle
Comment on lines -7 to -8
apply plugin: 'kotlin-android-extensions'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why you remove this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that Kotlin extensions are deprecated and replaced with ViewBinding. @hrodrick I'm right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Kotlin extension are deprecated. We should use view binding and @parcelize. Good update!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, Kotlin extensions are deprecated and kotlin synthetics is replaced by View & Data binding

Copy link
Copy Markdown
Collaborator

@amaury901130 amaury901130 left a comment

Choose a reason for hiding this comment

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

Good, just a couple of questions.


@Module
@InstallIn(ApplicationComponent::class)
@InstallIn(SingletonComponent::class)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

could you please explain this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ApplicationComponent was renamed to SingletonComponent to allow the usage of Hilt in non-Android modules. You can check this release notes for further information : https://github.com/google/dagger/releases/tag/dagger-2.28.2


@Module
@InstallIn(ApplicationComponent::class)
@InstallIn(SingletonComponent::class)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same as above

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ApplicationComponent was renamed to SingletonComponent to allow the usage of Hilt in non-Android modules. You can check this release notes for further information : https://github.com/google/dagger/releases/tag/dagger-2.28.2

Copy link
Copy Markdown
Contributor

@marcossalto marcossalto left a comment

Choose a reason for hiding this comment

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

Great work!

Comment thread .idea/gradle.xml
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this file should be ignore from git. Perhaps we need clear git cache to apply changes

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes you are right, I made the issue #52 to solve that problem.

@hrodrick hrodrick merged commit afd21b7 into rootstrap:master Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants