dagger-reflect
dagger-reflect copied to clipboard
reflect-lint: Support Kotlin annotations with default retention
The default retention for annotations written in Kotlin is RUNTIME, but dagger-reflect-lint
currently flags any Kotlin annotation without an explicit @Retention(AnnotationRetention.RUNTIME)
as an error.
Based on the kdoc you linked to me it looks like you still must put @Retention()
so only annotation class X
doesn't seem to have RUNTIME retention. However your claim is correct in the end, but the relevant doc here is AnnotationRetention.RUNTIME and the annotation design doc
@TWiStErRob You're right, that's the wrong documentation link. It was late!
I found another issue with AnnotationRetention.BINARY
support after running this check over our codebase - I've pushed another commit that fixes it.