При синхронизации текущего проекта я получаю предупреждение: «Конфигурация ошибки« compile »устарела и была заменена на« реализация и api ». Как исправить эту ошибку.
build.gradle (ПРОЕКТ: xyz)
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath "io.realm:realm-gradle-plugin:2.2.0"
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
bulid.gradle (модуль: приложение)
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.app.wordpress"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
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:cardview-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.8'
implementation 'com.google.firebase:firebase-messaging:17.4.0'
implementation 'com.google.firebase:firebase-config:16.4.0'
implementation 'com.google.firebase:firebase-invites:16.1.1'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation('com.squareup.retrofit2:retrofit:2.0.0-beta4') {
exclude module: 'okhttp'
}
implementation 'com.squareup.okhttp3:okhttp:3.2.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.0.1'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.balysv:material-ripple:1.0.2'
}
ПРЕДУПРЕЖДЕНИЕ
Я пытался изменить 'compile' на 'реализация'.
ВНИМАНИЕ: Конфигурация 'compile' устарела и была заменена на 'реализация' и 'api'.
Он будет удален в конце 2018 года. Для получения дополнительной информации см .: http://d.android.com/r/tools/update-dependency-configurations.html
Затронутые модули: приложение