gradlex-org / build-parameters

Compile-safe access to parameters supplied to a Gradle build
https://gradlex.org/build-parameters
Apache License 2.0
101 stars 5 forks source link

Generated Enums: toString() should return the original (non-escaped) value #93

Closed jjohannes closed 1 year ago

jjohannes commented 1 year ago

Generate an override to toString() that does the inverse of what parse() is doning now.

The use case is that I want to use the value in the build logic (e.g. to pass it to another tool like git) and not just check the enum values in a if/switch statement. I still want to use enumeration instead of string as parameter type to limit the set of allowed values.