CompilerOptionsHost
A utility base class that allows declaring CompilerOptions, which include both a CLI option and a CompilerConfiguration property.
Functions
Link copied to clipboard
fun flag(name: String, defaultValue: Boolean, description: String): Lazy<CompilerOption.SingularWithDefault<Boolean>>
An optional boolean flag parameter with a default. The argument values are true or false (using toBooleanLenient). If it cannot be converted to a boolean, the default is used.
fun flag(name: String, description: String, required: Boolean = true): Lazy<CompilerOption.Singular<Boolean>>
A boolean flag parameter with no default. Required by default. The argument values are true or false (using toBooleanLenient). If it cannot be converted to a boolean, it is ignored.
Link copied to clipboard
fun repeatedString(name: String, valueDescription: String, description: String, required: Boolean = true): Lazy<CompilerOption.Repeated<String>>
A repeated string parameter.
Link copied to clipboard
fun <T> singular(name: String, defaultValue: T, valueDescription: String, description: String, transform: (String) -> T?): Lazy<CompilerOption.SingularWithDefault<T>>
A single optional parameter with a default.
fun <T> singular(name: String, valueDescription: String, description: String, required: Boolean = true, transform: (String) -> T?): Lazy<CompilerOption.Singular<T & Any>>
A single parameter with no default. Required by default.
Link copied to clipboard
fun singularString(name: String, valueDescription: String, description: String, required: Boolean = true): Lazy<CompilerOption.Singular<String>>
A single string parameter with no default. Required by default.
fun singularString(name: String, defaultValue: String, valueDescription: String, description: String): Lazy<CompilerOption.SingularWithDefault<String>>
A single optional string parameter with a default.