Guilherme Delgado
09/29/2022, 9:59 AM> Task module123compileDebugKotlin
warning: opt-in requirement marker kotlinx.coroutines.FlowPreview is unresolved. Please make sure it’s present in the module dependencies
warning: opt-in requirement marker kotlinx.coroutines.ExperimentalCoroutinesApi is unresolved. Please make sure it’s present in the module dependencies
warning: opt-in requirement marker kotlinx.serialization.ExperimentalSerializationApi is unresolved. Please make sure it’s present in the module dependenciesBut I’ve a gradle script with it:
private fun KotlinJvmOptions.addOptions(options: List<String> = emptyList()) {
jvmTarget = JavaVersion.VERSION_11.toString()
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=kotlin.Experimental",
"-opt-in=kotlinx.coroutines.FlowPreview",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=kotlinx.serialization.ExperimentalSerializationApi"
) + options
}
Why is it throwing that warning? 🤔Guilherme Delgado
09/29/2022, 9:59 AMGuilherme Delgado
09/29/2022, 10:00 AMinternal fun LibraryExtension.addKotlinJvmOptions(options: List<String> = emptyList()) {
(this as ExtensionAware).extensions.configure<KotlinJvmOptions>("kotlinOptions") { addOptions(options) }
}
internal fun BaseAppModuleExtension.addKotlinJvmOptions(options: List<String> = emptyList()) {
(this as ExtensionAware).extensions.configure<KotlinJvmOptions>("kotlinOptions") { addOptions(options) }
}
Vampire
09/29/2022, 10:02 AMGuilherme Delgado
09/29/2022, 10:05 AMimport kotlinx.coroutines.FlowPreview
@FlowPreview
....
(actually I can remove them all now because I’m using stable versions, but they’re there 🤔 )Vampire
09/29/2022, 10:10 AMGuilherme Delgado
09/29/2022, 10:14 AMGuilherme Delgado
09/29/2022, 10:23 AM@ExperimentalSerializationApi
@JvmName("create")
fun StringFormat.asConverterFactory(contentType: MediaType): Converter.Factory {
return Factory(contentType, FromString(this))
}
If I remove it no warning is thrown in the IDE, only in the console build outputGuilherme Delgado
09/29/2022, 10:23 AMwarning: opt-in requirement marker kotlinx.serialization.ExperimentalSerializationApi is unresolved. Please make sure it’s present in the module dependencies
Guilherme Delgado
09/29/2022, 10:24 AMGuilherme Delgado
09/29/2022, 1:45 PMMustafa Ozhan
12/03/2022, 11:55 PM