I have the following gradle files and I can\'t find anything which would still warrant the warning \"Configuration \'compile\' is obsolete and has been replace
The problem lies in apply plugin: 'com.google.gms.google-services'
The Google Services plugin is adding a dependency on behalf of you. Hopefully they fix it in the future.
I copy answer from below stackoverflow link. https://stackoverflow.com/a/49059867/4782538. Thanks @Niklas for answer.