0

I have replaced occurrences of compile by implementation in my project's build.gradle, but I'm still getting this warning.

My build.gradle:

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
buildscript {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://dl.bintray.com/android/android-tools' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.1'
        classpath 'com.google.gms:google-services:3.0.0'
    }
}

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}

android {
    compileSdkVersion 28

    defaultConfig {
        applicationId "com.henesiz"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 22
        versionName "1.11"

        ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'

    }
    signingConfigs {
        release {
            keyAlias 'imon'
            keyPassword '123456'
            storeFile file('key.jks')
            storePassword '123456'
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }

        debug{
            signingConfig signingConfigs.release
        }
    }
    lintOptions {
        abortOnError false
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    testImplementation 'junit:junit:4.12'


    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support:design:28.0.0'

    implementation 'com.google.firebase:firebase-core:10.2.1'
    implementation 'com.google.firebase:firebase-messaging:10.2.1'


    implementation group: 'com.appsflyer', name: 'af-android-sdk', version:'4.3.7'
    implementation 'com.mixpanel.android:mixpanel-android:4.6.4'
    implementation 'com.google.android.gms:play-services-location:10.2.1'
    implementation 'com.octo.android.robospice:robospice-retrofit:1.4.14'
}

apply plugin: 'com.google.gms.google-services'

WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html Affected Modules: app

  • The warning raise from one of the libraries You are using. Upgrading the libraries to the latest stable version should solve the warning. – Yanay Hollander Jul 28 '19 at 19:04

1 Answers1

0

The warning is being thrown by google-services:3.0.0, you can get rid of the error by upgrading to com.google.gms:google-services:3.2.0 or higher.

classpath 'com.google.gms:google-services:3.2.0'

P.S - Unless you have a specific reason, it's usually a good idea to opt for the latest stable version.

classpath 'com.google.gms:google-services:4.3.0'
Chrisvin Jem
  • 3,940
  • 1
  • 8
  • 24