Class GradlePropertiesWrapper

java.lang.Object
com.elo.solutions.eloinst.settings.GradlePropertiesWrapper

public class GradlePropertiesWrapper extends Object
Wrapper class to convince the access to project properties
  • Constructor Details

    • GradlePropertiesWrapper

      public GradlePropertiesWrapper()
  • Method Details

    • findPropertyAsString

      public Optional<String> findPropertyAsString(@NonNull @NonNull String propertyName)
      Returns the project property from the gradle project context
      Parameters:
      propertyName - The name of the property to be returned
      Returns:
      the value of propertyName as 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 returned
      defaultValue - The value which should be return if property was not found in the project
      Returns:
      the value of propertyName as an optional if the value is not set in the project
    • newInstance

      public static GradlePropertiesWrapper newInstance(org.gradle.api.Project project)
      Creating a new instanace of the GradlePropertiesWrapper
      Parameters:
      project - gradle project instance
      Returns:
      instance of GradlePropertiesWrapper