Refactor gradle option generation mechanism

Ensure there's a statically checked dependency on LanguageVersion and
JvmTarget, so that this information is updated automatically once a new
language version or a JVM target is added
This commit is contained in:
Alexander Udalov
2016-10-07 16:46:04 +03:00
parent 2c66d4e59b
commit 8d660c2f6e
9 changed files with 95 additions and 31 deletions
@@ -22,6 +22,9 @@ enum class JvmTarget(val string: String) {
;
companion object {
@JvmField
val DEFAULT = JVM_1_6
@JvmStatic
fun fromString(string: String) = values().find { it.string == string }
}