Open sdeleuze opened 6 years ago
There is something weird with those annotations and I'm yet to find out what it is. For now there's a workaround in 0.3.1 - the @ConditionalOnClass
requires the name of the class as String
. I'm leaving this issue open until I find a proper solution since I don't like this workaround.
kotlin-reflect
seems not super lenient with theKClass
based@ConditionalOnClass
variant shipped withspring-kotlin-coroutine
, it throwsTypeNotPresentException
when for example RxJava is not on the classpath.To reproduce the issue, comment these 2 RxJava dependencies on my sample Spring + Coroutine app.
I suggest using regular
Class
based@ConditionalOnClass
for now, and raising an issue about that on https://youtrack.jetbrains.com/issues/KT in order to be more defensive about that onkotlin-reflect
.