Fix usage printing for compiler plugins
This commit is contained in:
@@ -45,8 +45,10 @@ public fun cliPluginUsageString(pluginId: String, options: Collection<CliOption>
|
||||
"\n" + " ".repeat(MAX_OPTION_WIDTH + LEFT_INDENT + 1)
|
||||
} else " ".repeat(1 + MAX_OPTION_WIDTH - name.length())
|
||||
|
||||
val modifiers = (if (it.required) "required" else "") + (if (it.allowMultipleOccurrences) "multiple" else "")
|
||||
val modifiersEnclosed = if (modifiers.isNotEmpty()) " ($modifiers)" else ""
|
||||
val modifiers = listOf(
|
||||
if (it.required) "required" else null,
|
||||
if (it.allowMultipleOccurrences) "multiple" else null).filterNotNull()
|
||||
val modifiersEnclosed = if (modifiers.isEmpty()) "" else " (${modifiers.joinToString()})"
|
||||
|
||||
" ".repeat(LEFT_INDENT) + name + margin + it.description + modifiersEnclosed
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
ERROR: Required plugin option not present: org.jetbrains.kotlin.android:androidRes
|
||||
|
||||
Plugin "org.jetbrains.kotlin.android" usage:
|
||||
androidRes <path> Android resources path (required)
|
||||
androidRes <path> Android resources path (required, multiple)
|
||||
androidManifest <path> Android manifest file (required)
|
||||
supportV4 <path> Support android-v4 library
|
||||
|
||||
|
||||
Reference in New Issue
Block a user