Class GradlePropertiesWrapper
java.lang.Object
com.elo.solutions.eloinst.settings.GradlePropertiesWrapper
Wrapper class to convince the access to project properties
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindPropertyAsString(@NonNull String propertyName) Returns the project property from the gradle project contextfindPropertyAsStringOrDefault(@NonNull String propertyName, String defaultValue) Returns the project property from the gradle project context otherwise the default onestatic GradlePropertiesWrappernewInstance(org.gradle.api.Project project) Creating a new instanace of the GradlePropertiesWrapper
-
Constructor Details
-
GradlePropertiesWrapper
public GradlePropertiesWrapper()
-
-
Method Details
-
findPropertyAsString
Returns the project property from the gradle project context- Parameters:
propertyName- The name of the property to be returned- Returns:
- the value of
propertyNameas an optional if the value is not set in the project
-
findPropertyAsStringOrDefault
public String findPropertyAsStringOrDefault(@NonNull @NonNull String propertyName, String defaultValue) Returns the project property from the gradle project context otherwise the default one- Parameters:
propertyName- The name of the property to be returneddefaultValue- The value which should be return if property was not found in the project- Returns:
- the value of
propertyNameas an optional if the value is not set in the project
-
newInstance
Creating a new instanace of the GradlePropertiesWrapper- Parameters:
project- gradle project instance- Returns:
- instance of GradlePropertiesWrapper
-