Skip to content

grpc-spring-boot Gradle plugin incompatible with com.google.protobuf v0.10.0 (generatedFilesBaseDir is now read-only) #421

Description

@toni1991

Problem

The io.github.lognet.grpc-spring-boot Gradle plugin (v5.2.0) fails to configure when used together with com.google.protobuf v0.10.0.

Error

Cannot set the value of read-only property 'generatedFilesBaseDir' for extension 'protobuf' of type com.google.protobuf.gradle.ProtobufExtension.

The error originates from line 89 of the plugin's internal grpc-spring-boot.gradle script.

Root Cause

generatedFilesBaseDir was deprecated in com.google.protobuf v0.9.2 and made read-only in v0.10.0 (see release notes: https://github.com/google/protobuf-gradle-plugin/releases/tag/v0.10.0).

Reproduction

// build.gradle
plugins {
    id 'com.google.protobuf' version '0.10.0'
    id 'io.github.lognet.grpc-spring-boot' version '5.2.0'
}

Running ./gradlew build produces the error above.

Expected Behavior

The plugin should be compatible with com.google.protobuf v0.10.0 by removing or replacing the generatedFilesBaseDir assignment.

Environment

  • grpc-spring-boot-starter-gradle-plugin: 5.2.0
  • com.google.protobuf: 0.10.0
  • Gradle: 9.4.1
  • Java: 21

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions