Android Hilt setup with androidx.hilt

Viewed 498

I am able to setup and run project with Android HILT following the documentation about the HILT

How am I supposed to upgrade it to androidx.hilt version?
Do I need to add or remove any classpath or plugin?

I have tried removing both classpath and plugin for com.google.dagger but I get compilation error that Hilt is not found!

Not working

implementation 'androidx.hilt:hilt-*:1.0.0'
kapt 'androidx.hilt:hilt-compiler:1.0.0'

Working

classpath 'com.google.dagger:hilt-android-gradle-plugin:2.38.1'
...
apply plugin: 'dagger.hilt.android.plugin'
...
implementation 'com.google.dagger:hilt-android:2.38.1'
kapt 'com.google.dagger:hilt-android-compiler:2.38.1'
implementation 'androidx.hilt:hilt-navigation-fragment:1.0.0'
kapt 'androidx.hilt:hilt-compiler:1.0.0'

Do I still need to use plugins and classpath?

0 Answers
Related