Erro Dagger: "Prefer to run the dagger processor over that class instead" em Kotlin
Olá a todos! Estou migrando um projeto de Java para Kotlin e me deparei com um problema ao usar Dagger 2. Tenho um módulo simples que fornece uma dependência:
```kotlin
@Module
class NetworkModule {
@Provides
@Singleton
fun provideRetrofit(): Retrofit {
return Retrofit.Builder()
.baseUrl("https://api.example.com")
.build()
}
}
@Component(modules = [NetworkModule::class])
@Singleton
interface AppComponent {
fun inject(activity: MainActivity)
}
```
Mas quando executo a build, o Gradle exibe o erro:
`error: [Dagger/DependencyCycle] Prefer to run the dagger processor over that class instead`
Pesquisei no Google, mas todas as soluções são para Java ou não funcionam. Estou usando Kotlin 1.8, Dagger 2.48, kapt. Tentei limpar