Class GradleProperties

java.lang.Object
com.helixframework.gradle.GradleProperties

public class GradleProperties extends Object
The GradleProperties class provides methods for retrieving user properties from the Gradle configuration file.
  • Method Details

    • getGlobalProperties

      public static Properties getGlobalProperties() throws IOException
      Retrieves the user properties from the global configuration file.
      Returns:
      the user properties as a Properties object
      Throws:
      IOException - if an I/O error occurs while reading the configuration file
    • addGlobalProperty

      public static void addGlobalProperty(String key, String value) throws IOException
      Adds a property to the Gradle global configuration file.
      Parameters:
      key - the key of the property
      value - the value of the property
      Throws:
      IOException - if an I/O error occurs while writing to the configuration file
    • getProperties

      public static Properties getProperties(File projectDir) throws IOException
      Retrieves the user properties from the project configuration file and the global configuration file.
      Parameters:
      projectDir - gradle project directory
      Returns:
      the user properties as a Properties object
      Throws:
      IOException - if an I/O error occurs while reading the configuration file