:wave: Is it possible to use <@OptIn> (i.e `@OptIn...
# announcements
s
👋 Is it possible to use @OptIn (i.e
@OptIn(kotlinx.coroutines.ExperimentalCoroutinesApi::class
) for an entire package and sub packages? I’m getting a bunch of warnings in my tests as I’m using experimental
runBlockingTest{}
and I’d love to squash all the warnings in a single place rather than per class annotation.
u
You can either annotate each file with
@file:OptIn(...)
, or add the command line argument
-Xopt-in=...
to opt in for the entire module (add it to
kotlinOptions.freeCompilerArgs
in Gradle). There’s no way to opt in at a package level yet.
👍 2