I am trying to get the latest revision number of mercurial repository dynamically and have it in the versionName of the android app.
This is what I have in the grad
In my case using Linux Mint, I had to install nodejs in sudo mode.
Android Studio runs the commands on the terminal as a super user, so I had nodejs installed on my user but not "root" (sudo).
To install, I followed this instructions: https://github.com/nodesource/distributions/blob/master/README.md