Skip to content

Commit

Permalink
Bump to Gradle 7.6 and update plugins
Browse files Browse the repository at this point in the history
As normal, Android versions weren't touched as it tends to be special to
upgrade.

The errorprone plugin handles errorproneJavac for us now, since it
hasn't changed in five years. VERSION_CATALOGS is already enabled by
default and graduated out of preview.

Fixes grpc#9802
  • Loading branch information
ejona86 committed Jan 11, 2023
1 parent ec5bc6b commit eb391fd
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 20 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ For non-Android protobuf-based codegen integrated with the Gradle build system,
you can use [protobuf-gradle-plugin][]:
```gradle
plugins {
id 'com.google.protobuf' version '0.8.18'
id 'com.google.protobuf' version '0.9.1'
}
protobuf {
Expand Down Expand Up @@ -181,7 +181,7 @@ use protobuf-gradle-plugin but specify the 'lite' options:

```gradle
plugins {
id 'com.google.protobuf' version '0.8.18'
id 'com.google.protobuf' version '0.9.1'
}
protobuf {
Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ subprojects {
if (!project.hasProperty('errorProne') || errorProne.toBoolean()) {
dependencies {
errorprone libs.errorprone.core
errorproneJavac libs.errorprone.javac
}
} else {
// Disable Error Prone
Expand Down
4 changes: 4 additions & 0 deletions compiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ tasks.named("compileTestLiteJava").configure {
options.errorprone.excludedPaths = ".*/build/generated/source/proto/.*"
}

tasks.named("checkstyleTestLite").configure {
enabled = false
}

protobuf {
protoc {
if (project.hasProperty('protoc')) {
Expand Down
2 changes: 1 addition & 1 deletion examples/android/clientcache/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.18"
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.1"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion examples/android/helloworld/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.18"
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.1"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion examples/android/routeguide/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.18"
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.1"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion examples/android/strictmode/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.18"
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.1"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
3 changes: 1 addition & 2 deletions examples/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
plugins {
// Provide convenience executables for trying out the examples.
id 'application'
// ASSUMES GRADLE 5.6 OR HIGHER. Use plugin version 0.8.10 with earlier gradle versions
id 'com.google.protobuf' version '0.8.18'
id 'com.google.protobuf' version '0.9.1'
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
}
Expand Down
2 changes: 1 addition & 1 deletion examples/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 0 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ cronet-api = "org.chromium.net:cronet-api:92.4515.131"
cronet-embedded = "org.chromium.net:cronet-embedded:102.5005.125"
errorprone-annotations = "com.google.errorprone:error_prone_annotations:2.14.0"
errorprone-core = "com.google.errorprone:error_prone_core:2.10.0"
errorprone-javac = "com.google.errorprone:javac:9+181-r4173-1"
google-api-protos = "com.google.api.grpc:proto-google-common-protos:2.9.0"
google-auth-credentials = { module = "com.google.auth:google-auth-library-credentials", version.ref = "googleauth" }
google-auth-oauth2Http = { module = "com.google.auth:google-auth-library-oauth2-http", version.ref = "googleauth" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
14 changes: 6 additions & 8 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ pluginManagement {
id "com.android.library" version "4.2.0"
id "com.github.johnrengelman.shadow" version "7.1.2"
id "com.github.kt3k.coveralls" version "2.12.0"
id "com.google.cloud.tools.jib" version "3.2.1"
id "com.google.osdetector" version "1.7.0"
id "com.google.protobuf" version "0.8.19"
id "com.google.cloud.tools.jib" version "3.3.1"
id "com.google.osdetector" version "1.7.1"
id "com.google.protobuf" version "0.9.1"
id "digital.wup.android-maven-publish" version "3.6.3"
id "me.champeau.gradle.japicmp" version "0.3.0"
id "me.champeau.jmh" version "0.6.6"
id "net.ltgt.errorprone" version "2.0.2"
id "ru.vyarus.animalsniffer" version "1.5.4"
id "me.champeau.jmh" version "0.6.8"
id "net.ltgt.errorprone" version "3.0.1"
id "ru.vyarus.animalsniffer" version "1.6.0"
}
resolutionStrategy {
eachPlugin {
Expand All @@ -26,8 +26,6 @@ pluginManagement {
}
}

enableFeaturePreview('VERSION_CATALOGS')

rootProject.name = "grpc"
include ":grpc-api"
include ":grpc-core"
Expand Down

0 comments on commit eb391fd

Please sign in to comment.