Is it possible to use `org.jetbrains:annotations` ...
# multiplatform
e
Is it possible to use
org.jetbrains:annotations
from commonMain? I can’t seem to get it to work.. Assuming the dependency is only available for JVM, is there any way to add annotations for jvm target? 🤔
i
if it is only available for JVM, you can't use it in commonMain
e
you can define your own
expect annotation class
mirroring the JVM-only annotations, with
actual typealias
in
jvmMain
, and either stub
actual annotation class
on other platforms or
@OptionalExpectation
on expectation
e
Thanks a lot@ephemient 🙌
Didn’t work out.. found this now https://youtrack.jetbrains.com/issue/KTIJ-16340 😢