Forum Discussion
aaronpliu
7 years agoFrequent Contributor
Hi sdudani ,
you may need take advantage of Groovy to load properties.
// set file path
// assume you run script on project level
def projectPath = project.path + "/<YourFilePath>/xxx.properties"
def properties = new Properties()
de props = new File(ProjectPath)
if (props.isFile()) {
props.withInputStream {
properties.load(it)
}
}
// if want to remove space
for (def key in properties.propertyNames()) {
properties.put(key, properties.getProperty(key).trim())
}
// return
BR,
/Aaron