Thank you for sharing this tutorial. It is very helpful. Sharing the following feedback in case you want to update the article for future readers.
With latest Hilt update, @InstallIn(ApplicationComponent::class) doesn’t work. We need @InstallIn(SingletonComponent::class) instead.
Also, I wasn’t able to run after all the changes. I was getting java.lang.invoke.LambdaMetafactory’ appears in /apex/com.android.art/javalib/core-oj.jar)… error.
This was fixed by adding