I'm looking to extend my gradle build with a call to an external tool.  The issue is that I need to provide the current CPU architecture that is currently being targeted, for example armeabi or arm64-v8a if the user has chosen to deploy to a physical device.  I am having trouble finding a way of determining this information in the gradle build file.  
Currently I am performing this action in a custom task which runs before preBuild, similar to this solution. Is there any way to detect the CPU architecture at this point?
task customTask(type: Exec) {
    commandLine "myTool.exe", "-architecture=$something"
}
preBuild.dependsOn customTask
I'm using the experimental plugin 0.7.0-beta3.
Thanks