Adding custom settings in build.gradle to solve plugin issues

Hi, Can you please guide how to add custom build.gradle settings in Ionic -Pro.

Context -

Firebase/Google recently (April 2020) published changes which made my otherwise well-functioning Ionic V3 app to stop building. Error was

Execution failed for task ‘:app:transformClassesWithDexBuilderForDebug’.

On my local system build, I was able to solve this build issue by adding custom settings as build-extras.gradle in platform/android/app. Answered here - https://stackoverflow.com/questions/61416616/cordova-stopped-building-after-the-23rd-april-2020-firebase-update

Since in Ionic Pro, we only upload the js code and platform is built in the cloud, I am desperately looking for a way to do the same on ionic Pro. I have researched and seems cordova hooks is the way to go, but not able to make it work. Can someone help ? Thanks.