diff options
author | ZHANG Dapeng <zdapeng@google.com> | 2019-04-02 14:52:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-02 14:52:27 -0700 |
commit | 755a22790b25a4c187bc31a6ff1d4f87a8860279 (patch) | |
tree | d98bf7dc0dada9f4b824d8a4120fc0bac7607b47 | |
parent | 30038fd0be4d568ce54af0a590b8546ccea9a5f3 (diff) | |
download | grpc-grpc-java-755a22790b25a4c187bc31a6ff1d4f87a8860279.tar.gz |
android/android-interop-testing/examples: upgrade android plugin
This resolves #5523
While bumping `com.android.tools.build:gradle:3.1.2` to `3.3.0`, some other plugins/artifacts/maven repo/buildscripts have to be updated:
- gradle (wrapper) need to upgrade to 4.10.x
- protobuf gradle plugin need to bump a version compatible with gradle version.
- need add `google()` and `jcenter()` repos for android (otherwise `com.android.tools.build:aapt2:3.3.0x` and `trove4j` will not be found resp.)
- need to accept license for Android "build-tools;28.0.3" in kokoro env.
21 files changed, 31 insertions, 20 deletions
@@ -131,7 +131,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.5' + classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.8' } } diff --git a/android-interop-testing/build.gradle b/android-interop-testing/build.gradle index d4fce1431..2f363241d 100644 --- a/android-interop-testing/build.gradle +++ b/android-interop-testing/build.gradle @@ -6,8 +6,8 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.2' - classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.5" + classpath 'com.android.tools.build:gradle:3.3.0' + classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.8" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/android/build.gradle b/android/build.gradle index 6ee0bfc76..c1b54341e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -12,7 +12,7 @@ buildscript { maven { url "https://plugins.gradle.org/m2/" } } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' + classpath 'com.android.tools.build:gradle:3.3.0' classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.6" classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' } @@ -36,6 +36,8 @@ android { } repositories { + google() + jcenter() mavenCentral() mavenLocal() } diff --git a/build.gradle b/build.gradle index 22981ef55..a5cfa970f 100644 --- a/build.gradle +++ b/build.gradle @@ -213,7 +213,7 @@ subprojects { protoc_lite: "com.google.protobuf:protoc-gen-javalite:3.0.0", protobuf_nano: "com.google.protobuf.nano:protobuf-javanano:${protobufNanoVersion}", protoc_nano: "com.google.protobuf:protoc:3.5.1-1", - protobuf_plugin: 'com.google.protobuf:protobuf-gradle-plugin:0.8.5', + protobuf_plugin: 'com.google.protobuf:protobuf-gradle-plugin:0.8.8', protobuf_util: "com.google.protobuf:protobuf-java-util:${protobufVersion}", lang: "org.apache.commons:commons-lang3:3.5", diff --git a/buildscripts/kokoro/android-interop.sh b/buildscripts/kokoro/android-interop.sh index 8c0fc55c5..2c5d6c84d 100755 --- a/buildscripts/kokoro/android-interop.sh +++ b/buildscripts/kokoro/android-interop.sh @@ -16,6 +16,8 @@ export CXXFLAGS=-I/tmp/protobuf/include export LD_LIBRARY_PATH=/tmp/protobuf/lib export OS_NAME=$(uname) +echo y | ${ANDROID_HOME}/tools/bin/sdkmanager "build-tools;28.0.3" + # Proto deps buildscripts/make_dependencies.sh diff --git a/buildscripts/kokoro/android.sh b/buildscripts/kokoro/android.sh index e261c5a2a..4d29627f1 100755 --- a/buildscripts/kokoro/android.sh +++ b/buildscripts/kokoro/android.sh @@ -16,6 +16,8 @@ export CXXFLAGS=-I/tmp/protobuf/include export LD_LIBRARY_PATH=/tmp/protobuf/lib export OS_NAME=$(uname) +echo y | ${ANDROID_HOME}/tools/bin/sdkmanager "build-tools;28.0.3" + # Proto deps buildscripts/make_dependencies.sh diff --git a/buildscripts/kokoro/linux_artifacts.sh b/buildscripts/kokoro/linux_artifacts.sh index a442acc14..1c0f52bf7 100755 --- a/buildscripts/kokoro/linux_artifacts.sh +++ b/buildscripts/kokoro/linux_artifacts.sh @@ -12,6 +12,7 @@ readonly GRPC_JAVA_DIR="$(cd "$(dirname "$0")"/../.. && pwd)" # grpc-android requires the Android SDK, so build outside of Docker and # use --include-build for its grpc-core dependency +echo y | ${ANDROID_HOME}/tools/bin/sdkmanager "build-tools;28.0.3" LOCAL_MVN_TEMP=$(mktemp -d) pushd "$GRPC_JAVA_DIR/android" ../gradlew uploadArchives \ diff --git a/examples/android/clientcache/build.gradle b/examples/android/clientcache/build.gradle index 2e20251bc..4e934ef68 100644 --- a/examples/android/clientcache/build.gradle +++ b/examples/android/clientcache/build.gradle @@ -6,8 +6,8 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' - classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.5" + classpath 'com.android.tools.build:gradle:3.3.0' + classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.8" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/examples/android/helloworld/build.gradle b/examples/android/helloworld/build.gradle index 2e20251bc..4e934ef68 100644 --- a/examples/android/helloworld/build.gradle +++ b/examples/android/helloworld/build.gradle @@ -6,8 +6,8 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' - classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.5" + classpath 'com.android.tools.build:gradle:3.3.0' + classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.8" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/examples/android/routeguide/build.gradle b/examples/android/routeguide/build.gradle index 5ead69a49..cf0116d9f 100644 --- a/examples/android/routeguide/build.gradle +++ b/examples/android/routeguide/build.gradle @@ -6,8 +6,8 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' - classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.5" + classpath 'com.android.tools.build:gradle:3.3.0' + classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.8" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/examples/build.gradle b/examples/build.gradle index 1696dadc5..6b21d2359 100644 --- a/examples/build.gradle +++ b/examples/build.gradle @@ -2,7 +2,7 @@ plugins { // Provide convenience executables for trying out the examples. id 'application' // ASSUMES GRADLE 2.12 OR HIGHER. Use plugin version 0.7.5 with earlier gradle versions - id 'com.google.protobuf' version '0.8.5' + id 'com.google.protobuf' version '0.8.8' // Generate IntelliJ IDEA's .idea & .iml project files id 'idea' } diff --git a/examples/example-alts/build.gradle b/examples/example-alts/build.gradle index 07fc5e822..1f1423f51 100644 --- a/examples/example-alts/build.gradle +++ b/examples/example-alts/build.gradle @@ -2,7 +2,7 @@ plugins { // Provide convenience executables for trying out the examples. id 'application' // ASSUMES GRADLE 2.12 OR HIGHER. Use plugin version 0.7.5 with earlier gradle versions - id 'com.google.protobuf' version '0.8.5' + id 'com.google.protobuf' version '0.8.8' // Generate IntelliJ IDEA's .idea & .iml project files id 'idea' } diff --git a/examples/example-gauth/build.gradle b/examples/example-gauth/build.gradle index 58df8da34..85a049986 100644 --- a/examples/example-gauth/build.gradle +++ b/examples/example-gauth/build.gradle @@ -2,7 +2,7 @@ plugins { // Provide convenience executables for trying out the examples. id 'application' // ASSUMES GRADLE 2.12 OR HIGHER. Use plugin version 0.7.5 with earlier gradle versions - id 'com.google.protobuf' version '0.8.5' + id 'com.google.protobuf' version '0.8.8' // Generate IntelliJ IDEA's .idea & .iml project files id 'idea' } diff --git a/examples/example-kotlin/android/helloworld/build.gradle b/examples/example-kotlin/android/helloworld/build.gradle index bc1865883..e2d060ddb 100644 --- a/examples/example-kotlin/android/helloworld/build.gradle +++ b/examples/example-kotlin/android/helloworld/build.gradle @@ -9,8 +9,8 @@ buildscript { mavenLocal() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' - classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.5" + classpath 'com.android.tools.build:gradle:3.3.0' + classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.8" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/examples/example-kotlin/build.gradle b/examples/example-kotlin/build.gradle index 820891c10..ed70bd658 100644 --- a/examples/example-kotlin/build.gradle +++ b/examples/example-kotlin/build.gradle @@ -1,6 +1,6 @@ plugins { id 'org.jetbrains.kotlin.jvm' version'1.3.10' - id 'com.google.protobuf' version '0.8.5' + id 'com.google.protobuf' version '0.8.8' // Generate IntelliJ IDEA's .idea & .iml project files // Starting with 0.8.4 of protobuf-gradle-plugin, *.proto and the gen output files are added @@ -14,6 +14,8 @@ plugins { } repositories { + google() + jcenter() mavenCentral() mavenLocal() } diff --git a/examples/example-kotlin/settings.gradle b/examples/example-kotlin/settings.gradle index b5f630207..4c82b6089 100644 --- a/examples/example-kotlin/settings.gradle +++ b/examples/example-kotlin/settings.gradle @@ -1,5 +1,7 @@ pluginManagement { repositories { + google() + jcenter() maven { // The google mirror is less flaky than mavenCentral() url "https://maven-central.storage-download.googleapis.com/repos/central/data/" } diff --git a/examples/example-tls/build.gradle b/examples/example-tls/build.gradle index 574b3561f..7156e92f2 100644 --- a/examples/example-tls/build.gradle +++ b/examples/example-tls/build.gradle @@ -2,7 +2,7 @@ plugins { // Provide convenience executables for trying out the examples. id 'application' // ASSUMES GRADLE 2.12 OR HIGHER. Use plugin version 0.7.5 with earlier gradle versions - id 'com.google.protobuf' version '0.8.5' + id 'com.google.protobuf' version '0.8.8' // Generate IntelliJ IDEA's .idea & .iml project files id 'idea' } diff --git a/examples/gradle/wrapper/gradle-wrapper.jar b/examples/gradle/wrapper/gradle-wrapper.jar Binary files differindex 0d4a95168..135367700 100644 --- a/examples/gradle/wrapper/gradle-wrapper.jar +++ b/examples/gradle/wrapper/gradle-wrapper.jar diff --git a/examples/gradle/wrapper/gradle-wrapper.properties b/examples/gradle/wrapper/gradle-wrapper.properties index a95009c3b..5c1b6c95b 100644 --- a/examples/gradle/wrapper/gradle-wrapper.properties +++ b/examples/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar Binary files differindex 0d4a95168..135367700 100644 --- a/gradle/wrapper/gradle-wrapper.jar +++ b/gradle/wrapper/gradle-wrapper.jar diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a95009c3b..5c1b6c95b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists |