Good afternoon,

is it possible to check for the presence of a property in settings.gradle
without resorting to a try/catch block?

Background: I'd like to provide a way for users to include certain
subprojects in the build. My first thought was to use gradle.properties.
Trying to use a property that's defined in gradle.properties works (so far
so good), but if the user does not have a gradle.properties file (e.g. in
the initial situation), Gradle throws an exception. I've been looking around
the sources and documentation (Settings/ProjectDescriptor/StartParameter),
but can't find a method that's equivalent to Project's hasProperty method.
So I'm using a try/catch block at the moment.

Thanks in advance,
  Levi

Reply via email to