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.
This commit is contained in:
Eric Anderson 2025-05-05 13:16:28 -07:00
parent 12aaf88d86
commit be0247f501
25 changed files with 27 additions and 97 deletions

View File

@ -152,7 +152,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.9.4'
id 'com.google.protobuf' version '0.9.5'
}
protobuf {
@ -185,7 +185,7 @@ use protobuf-gradle-plugin but specify the 'lite' options:
```gradle
plugins {
id 'com.google.protobuf' version '0.9.4'
id 'com.google.protobuf' version '0.9.5'
}
protobuf {

View File

@ -151,7 +151,7 @@ subprojects {
appendToProperty(
it.options.errorprone.excludedPaths,
".*/src/generated/[^/]+/java/.*" +
"|.*/build/generated/source/proto/[^/]+/java/.*",
"|.*/build/generated/sources/proto/[^/]+/java/.*",
"|")
}
}

View File

@ -152,7 +152,7 @@ dependencies {
}
tasks.named("compileTestJava").configure {
options.errorprone.excludedPaths = ".*/build/generated/source/proto/.*"
options.errorprone.excludedPaths = ".*/build/generated/sources/proto/.*"
}
tasks.named("compileTestLiteJava").configure {
@ -160,7 +160,7 @@ tasks.named("compileTestLiteJava").configure {
options.compilerArgs += [
"-Xlint:-cast"
]
options.errorprone.excludedPaths = ".*/build/generated/source/proto/.*"
options.errorprone.excludedPaths = ".*/build/generated/sources/proto/.*"
}
tasks.named("checkstyleTestLite").configure {

View File

@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.0'
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.4"
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.5"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

View File

@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.0'
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.4"
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.5"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

View File

@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.0'
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.4"
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.5"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

View File

@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.0'
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.4"
classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.5"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

View File

@ -1,7 +1,7 @@
plugins {
// Provide convenience executables for trying out the examples.
id 'application'
id 'com.google.protobuf' version '0.9.4'
id 'com.google.protobuf' version '0.9.5'
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
}
@ -52,16 +52,6 @@ protobuf {
}
}
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
}
}
startScripts.enabled = false
// Creates start scripts for a class name and adds it to the distribution. The

View File

@ -1,7 +1,7 @@
plugins {
// Provide convenience executables for trying out the examples.
id 'application'
id 'com.google.protobuf' version '0.9.4'
id 'com.google.protobuf' version '0.9.5'
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
}
@ -40,16 +40,6 @@ protobuf {
}
}
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
}
}
startScripts.enabled = false

View File

@ -2,7 +2,7 @@ plugins {
id 'application' // Provide convenience executables for trying out the examples.
id 'java'
id "com.google.protobuf" version "0.9.4"
id "com.google.protobuf" version "0.9.5"
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'

View File

@ -2,7 +2,7 @@ plugins {
id 'application' // Provide convenience executables for trying out the examples.
id 'java'
id "com.google.protobuf" version "0.9.4"
id "com.google.protobuf" version "0.9.5"
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'

View File

@ -1,7 +1,7 @@
plugins {
// Provide convenience executables for trying out the examples.
id 'application'
id 'com.google.protobuf' version '0.9.4'
id 'com.google.protobuf' version '0.9.5'
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
}
@ -46,16 +46,6 @@ protobuf {
}
}
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
}
}
startScripts.enabled = false
task googleAuthClient(type: CreateStartScripts) {

View File

@ -1,7 +1,7 @@
plugins {
// Provide convenience executables for trying out the examples.
id 'application'
id 'com.google.protobuf' version '0.9.4'
id 'com.google.protobuf' version '0.9.5'
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
id 'java'

View File

@ -1,7 +1,7 @@
plugins {
// Provide convenience executables for trying out the examples.
id 'application'
id 'com.google.protobuf' version '0.9.4'
id 'com.google.protobuf' version '0.9.5'
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
id 'java'

View File

@ -2,7 +2,7 @@ plugins {
id 'application' // Provide convenience executables for trying out the examples.
id 'java'
id "com.google.protobuf" version "0.9.4"
id "com.google.protobuf" version "0.9.5"
id 'com.google.cloud.tools.jib' version '3.4.4' // For releasing to Docker Hub
}

View File

@ -1,7 +1,7 @@
plugins {
// Provide convenience executables for trying out the examples.
id 'application'
id 'com.google.protobuf' version '0.9.4'
id 'com.google.protobuf' version '0.9.5'
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
}
@ -51,16 +51,6 @@ protobuf {
}
}
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
}
}
startScripts.enabled = false
task hellowWorldJwtAuthServer(type: CreateStartScripts) {

View File

@ -1,7 +1,7 @@
plugins {
// Provide convenience executables for trying out the examples.
id 'application'
id 'com.google.protobuf' version '0.9.4'
id 'com.google.protobuf' version '0.9.5'
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
}
@ -51,16 +51,6 @@ protobuf {
}
}
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
}
}
startScripts.enabled = false
task hellowWorldOauthServer(type: CreateStartScripts) {

View File

@ -1,7 +1,7 @@
plugins {
// Provide convenience executables for trying out the examples.
id 'application'
id 'com.google.protobuf' version '0.9.4'
id 'com.google.protobuf' version '0.9.5'
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
}

View File

@ -1,6 +1,6 @@
plugins {
id 'application' // Provide convenience executables for trying out the examples.
id 'com.google.protobuf' version '0.9.4'
id 'com.google.protobuf' version '0.9.5'
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
id 'java'

View File

@ -1,6 +1,6 @@
plugins {
id 'application' // Provide convenience executables for trying out the examples.
id 'com.google.protobuf' version '0.9.4'
id 'com.google.protobuf' version '0.9.5'
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
id 'java'

View File

@ -1,5 +1,5 @@
plugins {
id 'com.google.protobuf' version '0.9.4'
id 'com.google.protobuf' version '0.9.5'
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
id 'war'
@ -34,13 +34,3 @@ protobuf {
all()*.plugins { grpc {} }
}
}
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
}
}

View File

@ -1,7 +1,7 @@
plugins {
// Provide convenience executables for trying out the examples.
id 'application'
id 'com.google.protobuf' version '0.9.4'
id 'com.google.protobuf' version '0.9.5'
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
}
@ -41,16 +41,6 @@ protobuf {
}
}
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
}
}
startScripts.enabled = false
task helloWorldTlsServer(type: CreateStartScripts) {

View File

@ -1,6 +1,6 @@
plugins {
id 'application' // Provide convenience executables for trying out the examples.
id 'com.google.protobuf' version '0.9.4'
id 'com.google.protobuf' version '0.9.5'
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
id 'java'

View File

@ -39,7 +39,7 @@ tasks.named("compileTestJava").configure {
options.compilerArgs += [
"-Xlint:-cast"
]
options.errorprone.excludedPaths = ".*/build/generated/source/proto/.*"
options.errorprone.excludedPaths = ".*/build/generated/sources/proto/.*"
}
protobuf {

View File

@ -13,7 +13,7 @@ pluginManagement {
// https://github.com/google/osdetector-gradle-plugin/tags
id "com.google.osdetector" version "1.7.3"
// https://github.com/google/protobuf-gradle-plugin/releases
id "com.google.protobuf" version "0.9.4"
id "com.google.protobuf" version "0.9.5"
// https://github.com/GradleUp/shadow/releases
// 8.3.2+ requires Java 11+
// 8.3.1 breaks apache imports for netty/shaded, fixed in 8.3.2