how to get userid and gid in gradle?
Gradle doesn't provide such functionality out-of-the-box, however running commands in groovy is fairly easy. Below sample gradle script that does the job:
def username = System.properties['user.name']
println "Username $username"
def uid = ["id", "-u", username].execute().text.trim()
println "UID: $uid"
def gid = ["id", "-g", username].execute().text.trim()
println "GID: $gid"