Skip to content

Commit be0247f

Browse files
committed
Bump com.google.protobuf gradle plugin to 0.9.5
The plugin now outputs to "generated/sources". The IDE configuration explicitly adding the folders to the source sets hasn't been needed for some years.
1 parent 12aaf88 commit be0247f

File tree

25 files changed

+27
-97
lines changed

25 files changed

+27
-97
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ For non-Android protobuf-based codegen integrated with the Gradle build system,
152152
you can use [protobuf-gradle-plugin][]:
153153
```gradle
154154
plugins {
155-
id 'com.google.protobuf' version '0.9.4'
155+
id 'com.google.protobuf' version '0.9.5'
156156
}
157157
158158
protobuf {
@@ -185,7 +185,7 @@ use protobuf-gradle-plugin but specify the 'lite' options:
185185

186186
```gradle
187187
plugins {
188-
id 'com.google.protobuf' version '0.9.4'
188+
id 'com.google.protobuf' version '0.9.5'
189189
}
190190
191191
protobuf {

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ subprojects {
151151
appendToProperty(
152152
it.options.errorprone.excludedPaths,
153153
".*/src/generated/[^/]+/java/.*" +
154-
"|.*/build/generated/source/proto/[^/]+/java/.*",
154+
"|.*/build/generated/sources/proto/[^/]+/java/.*",
155155
"|")
156156
}
157157
}

compiler/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,15 @@ dependencies {
152152
}
153153

154154
tasks.named("compileTestJava").configure {
155-
options.errorprone.excludedPaths = ".*/build/generated/source/proto/.*"
155+
options.errorprone.excludedPaths = ".*/build/generated/sources/proto/.*"
156156
}
157157

158158
tasks.named("compileTestLiteJava").configure {
159159
options.compilerArgs = compileTestJava.options.compilerArgs
160160
options.compilerArgs += [
161161
"-Xlint:-cast"
162162
]
163-
options.errorprone.excludedPaths = ".*/build/generated/source/proto/.*"
163+
options.errorprone.excludedPaths = ".*/build/generated/sources/proto/.*"
164164
}
165165

166166
tasks.named("checkstyleTestLite").configure {

examples/android/clientcache/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
}
88
dependencies {
99
classpath 'com.android.tools.build:gradle:7.4.0'
10-
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.4"
10+
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.5"
1111

1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files

examples/android/helloworld/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
}
88
dependencies {
99
classpath 'com.android.tools.build:gradle:7.4.0'
10-
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.4"
10+
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.5"
1111

1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files

examples/android/routeguide/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
}
88
dependencies {
99
classpath 'com.android.tools.build:gradle:7.4.0'
10-
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.4"
10+
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.5"
1111

1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files

examples/android/strictmode/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
}
88
dependencies {
99
classpath 'com.android.tools.build:gradle:7.4.0'
10-
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.4"
10+
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.5"
1111

1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files

examples/build.gradle

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
// Provide convenience executables for trying out the examples.
33
id 'application'
4-
id 'com.google.protobuf' version '0.9.4'
4+
id 'com.google.protobuf' version '0.9.5'
55
// Generate IntelliJ IDEA's .idea & .iml project files
66
id 'idea'
77
}
@@ -52,16 +52,6 @@ protobuf {
5252
}
5353
}
5454

55-
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
56-
sourceSets {
57-
main {
58-
java {
59-
srcDirs 'build/generated/source/proto/main/grpc'
60-
srcDirs 'build/generated/source/proto/main/java'
61-
}
62-
}
63-
}
64-
6555
startScripts.enabled = false
6656

6757
// Creates start scripts for a class name and adds it to the distribution. The

examples/example-alts/build.gradle

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
// Provide convenience executables for trying out the examples.
33
id 'application'
4-
id 'com.google.protobuf' version '0.9.4'
4+
id 'com.google.protobuf' version '0.9.5'
55
// Generate IntelliJ IDEA's .idea & .iml project files
66
id 'idea'
77
}
@@ -40,16 +40,6 @@ protobuf {
4040
}
4141
}
4242

43-
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
44-
sourceSets {
45-
main {
46-
java {
47-
srcDirs 'build/generated/source/proto/main/grpc'
48-
srcDirs 'build/generated/source/proto/main/java'
49-
}
50-
}
51-
}
52-
5343
startScripts.enabled = false
5444

5545

examples/example-debug/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id 'application' // Provide convenience executables for trying out the examples.
33
id 'java'
44

5-
id "com.google.protobuf" version "0.9.4"
5+
id "com.google.protobuf" version "0.9.5"
66

77
// Generate IntelliJ IDEA's .idea & .iml project files
88
id 'idea'

examples/example-dualstack/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id 'application' // Provide convenience executables for trying out the examples.
33
id 'java'
44

5-
id "com.google.protobuf" version "0.9.4"
5+
id "com.google.protobuf" version "0.9.5"
66

77
// Generate IntelliJ IDEA's .idea & .iml project files
88
id 'idea'

examples/example-gauth/build.gradle

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
// Provide convenience executables for trying out the examples.
33
id 'application'
4-
id 'com.google.protobuf' version '0.9.4'
4+
id 'com.google.protobuf' version '0.9.5'
55
// Generate IntelliJ IDEA's .idea & .iml project files
66
id 'idea'
77
}
@@ -46,16 +46,6 @@ protobuf {
4646
}
4747
}
4848

49-
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
50-
sourceSets {
51-
main {
52-
java {
53-
srcDirs 'build/generated/source/proto/main/grpc'
54-
srcDirs 'build/generated/source/proto/main/java'
55-
}
56-
}
57-
}
58-
5949
startScripts.enabled = false
6050

6151
task googleAuthClient(type: CreateStartScripts) {

examples/example-gcp-csm-observability/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
// Provide convenience executables for trying out the examples.
33
id 'application'
4-
id 'com.google.protobuf' version '0.9.4'
4+
id 'com.google.protobuf' version '0.9.5'
55
// Generate IntelliJ IDEA's .idea & .iml project files
66
id 'idea'
77
id 'java'

examples/example-gcp-observability/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
// Provide convenience executables for trying out the examples.
33
id 'application'
4-
id 'com.google.protobuf' version '0.9.4'
4+
id 'com.google.protobuf' version '0.9.5'
55
// Generate IntelliJ IDEA's .idea & .iml project files
66
id 'idea'
77
id 'java'

examples/example-hostname/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id 'application' // Provide convenience executables for trying out the examples.
33
id 'java'
44

5-
id "com.google.protobuf" version "0.9.4"
5+
id "com.google.protobuf" version "0.9.5"
66
id 'com.google.cloud.tools.jib' version '3.4.4' // For releasing to Docker Hub
77
}
88

examples/example-jwt-auth/build.gradle

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
// Provide convenience executables for trying out the examples.
33
id 'application'
4-
id 'com.google.protobuf' version '0.9.4'
4+
id 'com.google.protobuf' version '0.9.5'
55
// Generate IntelliJ IDEA's .idea & .iml project files
66
id 'idea'
77
}
@@ -51,16 +51,6 @@ protobuf {
5151
}
5252
}
5353

54-
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
55-
sourceSets {
56-
main {
57-
java {
58-
srcDirs 'build/generated/source/proto/main/grpc'
59-
srcDirs 'build/generated/source/proto/main/java'
60-
}
61-
}
62-
}
63-
6454
startScripts.enabled = false
6555

6656
task hellowWorldJwtAuthServer(type: CreateStartScripts) {

examples/example-oauth/build.gradle

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
// Provide convenience executables for trying out the examples.
33
id 'application'
4-
id 'com.google.protobuf' version '0.9.4'
4+
id 'com.google.protobuf' version '0.9.5'
55
// Generate IntelliJ IDEA's .idea & .iml project files
66
id 'idea'
77
}
@@ -51,16 +51,6 @@ protobuf {
5151
}
5252
}
5353

54-
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
55-
sourceSets {
56-
main {
57-
java {
58-
srcDirs 'build/generated/source/proto/main/grpc'
59-
srcDirs 'build/generated/source/proto/main/java'
60-
}
61-
}
62-
}
63-
6454
startScripts.enabled = false
6555

6656
task hellowWorldOauthServer(type: CreateStartScripts) {

examples/example-opentelemetry/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
// Provide convenience executables for trying out the examples.
33
id 'application'
4-
id 'com.google.protobuf' version '0.9.4'
4+
id 'com.google.protobuf' version '0.9.5'
55
// Generate IntelliJ IDEA's .idea & .iml project files
66
id 'idea'
77
}

examples/example-orca/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'application' // Provide convenience executables for trying out the examples.
3-
id 'com.google.protobuf' version '0.9.4'
3+
id 'com.google.protobuf' version '0.9.5'
44
// Generate IntelliJ IDEA's .idea & .iml project files
55
id 'idea'
66
id 'java'

examples/example-reflection/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'application' // Provide convenience executables for trying out the examples.
3-
id 'com.google.protobuf' version '0.9.4'
3+
id 'com.google.protobuf' version '0.9.5'
44
// Generate IntelliJ IDEA's .idea & .iml project files
55
id 'idea'
66
id 'java'

examples/example-servlet/build.gradle

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'com.google.protobuf' version '0.9.4'
2+
id 'com.google.protobuf' version '0.9.5'
33
// Generate IntelliJ IDEA's .idea & .iml project files
44
id 'idea'
55
id 'war'
@@ -34,13 +34,3 @@ protobuf {
3434
all()*.plugins { grpc {} }
3535
}
3636
}
37-
38-
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
39-
sourceSets {
40-
main {
41-
java {
42-
srcDirs 'build/generated/source/proto/main/grpc'
43-
srcDirs 'build/generated/source/proto/main/java'
44-
}
45-
}
46-
}

examples/example-tls/build.gradle

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
// Provide convenience executables for trying out the examples.
33
id 'application'
4-
id 'com.google.protobuf' version '0.9.4'
4+
id 'com.google.protobuf' version '0.9.5'
55
// Generate IntelliJ IDEA's .idea & .iml project files
66
id 'idea'
77
}
@@ -41,16 +41,6 @@ protobuf {
4141
}
4242
}
4343

44-
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
45-
sourceSets {
46-
main {
47-
java {
48-
srcDirs 'build/generated/source/proto/main/grpc'
49-
srcDirs 'build/generated/source/proto/main/java'
50-
}
51-
}
52-
}
53-
5444
startScripts.enabled = false
5545

5646
task helloWorldTlsServer(type: CreateStartScripts) {

examples/example-xds/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'application' // Provide convenience executables for trying out the examples.
3-
id 'com.google.protobuf' version '0.9.4'
3+
id 'com.google.protobuf' version '0.9.5'
44
// Generate IntelliJ IDEA's .idea & .iml project files
55
id 'idea'
66
id 'java'

protobuf-lite/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ tasks.named("compileTestJava").configure {
3939
options.compilerArgs += [
4040
"-Xlint:-cast"
4141
]
42-
options.errorprone.excludedPaths = ".*/build/generated/source/proto/.*"
42+
options.errorprone.excludedPaths = ".*/build/generated/sources/proto/.*"
4343
}
4444

4545
protobuf {

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pluginManagement {
1313
// https://github.com/google/osdetector-gradle-plugin/tags
1414
id "com.google.osdetector" version "1.7.3"
1515
// https://github.com/google/protobuf-gradle-plugin/releases
16-
id "com.google.protobuf" version "0.9.4"
16+
id "com.google.protobuf" version "0.9.5"
1717
// https://github.com/GradleUp/shadow/releases
1818
// 8.3.2+ requires Java 11+
1919
// 8.3.1 breaks apache imports for netty/shaded, fixed in 8.3.2

0 commit comments

Comments
 (0)