I am new to Gradle. We use Perforce as our source control system at work. When I execute a “release” target I would like the “version” property to use the value of a Perforce counter. How can I do this? I assume I need to somehow fork the ‘p4 counters’ call and parse the output. I am pretty sure this would be a pain in the butt in Java, is there an easy way in Gradle / Grovvy?