gradle filter custom token in jar dependency

We have a problem with a gradle dependency where we cannot inject programmaticaly the good value for a java property, we cannot modify this dependency( update the code)

how could I open this dependency jar , modify the ${my_property} token in an xml file and use this updated jar to make my gradle build?