Import kotlin.coroutines property from gradle to facet
Original commit: 2ff04f2bc5
This commit is contained in:
committed by
Stanislav Erokhin
parent
eb76293fc7
commit
343c1c5dee
@@ -65,9 +65,9 @@ enum class CoroutineSupport(
|
||||
override val description: String,
|
||||
val compilerArgument: String
|
||||
) : DescriptionAware {
|
||||
ENABLED("Enabled", "enabled"),
|
||||
ENABLED_WITH_WARNING("Enabled with warning", "warning"),
|
||||
DISABLED("Disabled", "disabled");
|
||||
ENABLED("Enabled", "enable"),
|
||||
ENABLED_WITH_WARNING("Enabled with warning", "warn"),
|
||||
DISABLED("Disabled", "error");
|
||||
|
||||
companion object {
|
||||
val DEFAULT = ENABLED_WITH_WARNING
|
||||
@@ -79,6 +79,10 @@ enum class CoroutineSupport(
|
||||
arguments.coroutinesError -> DISABLED
|
||||
else -> DEFAULT
|
||||
}
|
||||
|
||||
fun byCompilerArgument(argument: String): CoroutineSupport {
|
||||
return CoroutineSupport.values().find { it.compilerArgument == argument } ?: DEFAULT
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user