How to use gradle global variable in shell script

Hi Team,

I have a global variable defined in gradle as shown below.
project.ext.set(“productDateLong”, productDateLong)

now I want to use this variable in my shell script code which is in separate file [.sh file]
Kindly let me know if there is any way I can do this.