Use advanced properties.
ext.propA = 'propAValue' ext.propB = propA println "$propA, $propB" def PrintAllProps(){ def propC = propA println "$propA, $propB, $propC" } task(runmethod) << { PrintAllProps() }
Running runmethod fingerprints:
gradle runmethod propAValue, propAValue :runmethod propAValue, propAValue, propAValue
Learn more about Gradle. Additional properties here.
You should be able to call functions from functions without doing anything special:
def PrintMoreProps(){ print 'More Props: ' PrintAllProps() }
leads to:
More Props: propAValue, propAValue, propAValue
Rage
source share