From c2e09dca5577fd5ba0dd5c532e18804e2fc2de3c Mon Sep 17 00:00:00 2001 From: Alexander Martinz Date: Fri, 6 Jul 2018 14:18:04 +0200 Subject: gradle: update, compatibility with newer AS versions *) Remove buildToolsVersion to let the gradle plugin pick the best one automatically. "If you're using Android plugin for Gradle 3.0.0 or higher, your project automatically uses a default version of the build tools that the plugin specifies." *) Upgrade android gradle plugin to latest stable version *) Upgrade protobuf plugin to 0.8.6, which does not depend on private APIs anymore and allows using newer AS versions. *) Update to new syntax, replace "compile" with "implementation" Change-Id: I87a3e444011fa46795908e85bafd9ed96cd78a97 Signed-off-by: Alexander Martinz --- build.gradle | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/build.gradle b/build.gradle index 906584754..e918ad118 100644 --- a/build.gradle +++ b/build.gradle @@ -5,8 +5,8 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.1' - classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.3' + classpath 'com.android.tools.build:gradle:3.1.3' + classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.6' } } @@ -15,7 +15,6 @@ apply plugin: 'com.google.protobuf' android { compileSdkVersion 27 - buildToolsVersion '27.0.3' defaultConfig { minSdkVersion 23 @@ -104,21 +103,22 @@ repositories { final String SUPPORT_LIBS_VERSION = '27.1.1' dependencies { - compile "com.android.support:support-v4:${SUPPORT_LIBS_VERSION}" - compile "com.android.support:support-dynamic-animation:${SUPPORT_LIBS_VERSION}" - compile "com.android.support:recyclerview-v7:${SUPPORT_LIBS_VERSION}" - compile "com.android.support:palette-v7:${SUPPORT_LIBS_VERSION}" - compile "com.android.support:appcompat-v7:${SUPPORT_LIBS_VERSION}" - compile "com.android.support:design:${SUPPORT_LIBS_VERSION}" - compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7' - - testCompile 'junit:junit:4.12' - androidTestCompile "org.mockito:mockito-core:1.10.19" - androidTestCompile 'com.google.dexmaker:dexmaker:1.2' - androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2' - androidTestCompile 'com.android.support.test:runner:1.0.1' - androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3' - androidTestCompile "com.android.support:support-annotations:${SUPPORT_LIBS_VERSION}" + implementation "com.android.support:appcompat-v7:${SUPPORT_LIBS_VERSION}" + implementation "com.android.support:design:${SUPPORT_LIBS_VERSION}" + implementation "com.android.support:palette-v7:${SUPPORT_LIBS_VERSION}" + implementation "com.android.support:recyclerview-v7:${SUPPORT_LIBS_VERSION}" + implementation "com.android.support:support-dynamic-animation:${SUPPORT_LIBS_VERSION}" + implementation "com.android.support:support-v4:${SUPPORT_LIBS_VERSION}" + + implementation 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7' + + testImplementation 'junit:junit:4.12' + androidTestImplementation "org.mockito:mockito-core:1.10.19" + androidTestImplementation 'com.google.dexmaker:dexmaker:1.2' + androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2' + androidTestImplementation 'com.android.support.test:runner:1.0.1' + androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3' + androidTestImplementation "com.android.support:support-annotations:${SUPPORT_LIBS_VERSION}" } protobuf { -- cgit v1.2.3