/** * Get a property from the project or the environment * * First looks up the property value in the project's properties. If the property is not set, converts the property * name to upper underscore format and checks if the value is set in the environment. * * @param name Property name * @return Property value or <code>null</code> if the property does not exist */ public @Nullable String getProperty(String name) { String env = toEnvName(name); String property = name.toLowerCase(); String value = System.getProperty(env); if (value == null) { value = (String) getProject().findProperty(property); } return value; }
/** * Get a property from the project or the environment * * First looks up the property value in the project's properties. If the property is not set, converts the property * name to upper underscore format and checks if the value is set in the environment. * * @param name Property name * @return Property value or <code>null</code> if the property does not exist */ public @Nullable String getProperty(String name) { String env = toEnvName(name); String property = name.toLowerCase(); String value = System.getProperty(env); if (value == null) { value = (String) getProject().findProperty(property); } return value; }