novoda / gradle-build-properties-plugin

Keep your secrets secret. External build properties support for your Gradle scripts.
Other
110 stars 13 forks source link

Provide api to check whether entries contain a given key #47

Closed tobiasheine closed 6 years ago

tobiasheine commented 6 years ago

Currently it's kinda hard to check whether the Entries contain a certain key.

Possible workarounds are:

if (buildProperties.cli['key'].or('none').string != 'none') {
   ...
}

or

buildProperties.cli.keys.toList().contains('key')

But ideally we would expose BuildProperties.contains(String key):

if (buildProperties.cli.contains('key')) {
   ...
}