egorand
08/19/2019, 6:51 PM@ObsoleteCoroutinesApi
and @ExperimentalCoroutinesApi
and I don’t want library users to opt into using any of those everywhere in their code, just in the scope of my library. I imagine it has to be something like this:
@Experimental
@UseExperimental(ObsoleteCoroutinesApi::class, ExperimentalCoroutinesApi::class)
annotation class MyExperimental
but the IDE won’t allow me to use @UseExperimental(MyExperimental::class)
in place of e.g. @UseExperimental(ObsoleteCoroutinesApi::class)
in the library code. Is there a proper way to set it up? Does this approach make sense?louiscad
08/19/2019, 8:09 PMegorand
08/19/2019, 8:22 PMcompileKotlin {
kotlinOptions {
freeCompilerArgs += "-Xuse-experimental=ObsoleteCoroutinesApi"
freeCompilerArgs += "-Xuse-experimental=ExperimentalCoroutinesApi"
freeCompilerArgs += "-Xexperimental=MyExperimental"
}
}
louiscad
08/19/2019, 9:16 PMegorand
08/20/2019, 11:44 AM