square / anvil

A Kotlin compiler plugin to make dependency injection with Dagger 2 easier.
Apache License 2.0
1.29k stars 75 forks source link

The following Android dependencies are set to compileOnly which is not supported #968

Open lawonga opened 2 months ago

lawonga commented 2 months ago

On the newest beta, I get this error when trying to compile. However I'm not using anything that's compileOnly and there's no direct reference to com.squareup.anvil:annotations (I'm just pulling it implicitly using the setup instructions)

The following Android dependencies are set to compileOnly which is not supported:
-> com.squareup.anvil:annotations:2.5.0-beta07

Edit: https://github.com/square/anvil/commit/e6a8d35c9f31fe3b511c9e3756767b56802997b8#diff-96f123065134ce8c42eb48a194b9192d209908528cd943b6f966576a736d1423R145 this looks like a change from the beta 🤔

(FWIW I'm trying to update from Dagger 2.4.9 to 2.5.0 beta 7)

RBusarow commented 2 months ago

Thank you for the report.

Can you give details about your project? What versions are you using for Kotlin, Gradle, and AGP? A reproducer project would be helpful if you can manage it.