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,
|
override val description: String,
|
||||||
val compilerArgument: String
|
val compilerArgument: String
|
||||||
) : DescriptionAware {
|
) : DescriptionAware {
|
||||||
ENABLED("Enabled", "enabled"),
|
ENABLED("Enabled", "enable"),
|
||||||
ENABLED_WITH_WARNING("Enabled with warning", "warning"),
|
ENABLED_WITH_WARNING("Enabled with warning", "warn"),
|
||||||
DISABLED("Disabled", "disabled");
|
DISABLED("Disabled", "error");
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val DEFAULT = ENABLED_WITH_WARNING
|
val DEFAULT = ENABLED_WITH_WARNING
|
||||||
@@ -79,6 +79,10 @@ enum class CoroutineSupport(
|
|||||||
arguments.coroutinesError -> DISABLED
|
arguments.coroutinesError -> DISABLED
|
||||||
else -> DEFAULT
|
else -> DEFAULT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun byCompilerArgument(argument: String): CoroutineSupport {
|
||||||
|
return CoroutineSupport.values().find { it.compilerArgument == argument } ?: DEFAULT
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user