Guice annotatedWith() binding doesn't work when using a Kotlin annotation

Hello,
I have a strange problem. I am trying to follow an example at BindingAnnotations · google/guice Wiki · GitHub - more specifically the @PayPal equivalent (not the @Named one).

So the binding in Kotlin looks like this:
bind(CreditCardProcessor::class.java).annotatedWith(PayPal::class.java).to(PayPalCreditCardProcessor::class.java)

The problem I’m facing is that if the @PayPal annotation comes from Java, it works just fine. But I’m not able to make it work with a PayPal annotation created in Kotlin.
Do you have any thoughts about what’s wrong and how to make the Kotlin annotations work with guice .annotatedWith() API?
Thanks.

If you want to use annotation processing in Kotlin you will have to enable kapt (there is a plugin for that in gradle) and make sure to make your processor a dependency of the kapt configuration.