INFO: API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'.
It will be removed at the end of 2019.
First of all, this is only a normal information that tells you about the API deprecation, which is a usual deprecation process over several Gradle major releases. So, no much worry about it.
Secondly, as of Gradle 5.1, it is recommended that the configuration avoidance APIs be used whenever tasks are created by custom plugins. See Task Configuration Avoidance.
Thirdly, your own gradle build script looks not including any statements about variant.getMergeResources()
, but this doesn't mean that your gradle plugins applied also don't include reference to variant.getMergeResources
, so you need to look into all of your plugins, e.g.
apply plugin: 'com.android.application'
apply plugin: 'jacoco'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
Probably above plugin implementation have at least one reference to the variant
object.
Edit #1
Run below command to get the detailed build information about your project:
./gradlew build --scan
For example, you will see something like below

More about build troubleshooting can be found at
Gradle Build Troubleshooting