Skip to content

Commit

Permalink
chore: relax protobuf-java version req (#1130)
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Baert <[email protected]>
  • Loading branch information
toddbaert authored Jan 3, 2025
1 parent 1c30502 commit 074baae
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions providers/flagd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<!-- exclusion expression for e2e tests -->
<testExclusions>**/e2e/*.java</testExclusions>
<io.grpc.version>1.69.0</io.grpc.version>
<!-- caution - updating this will break compatibility with older protobuf-java versions -->
<protobuf-java.min.version>3.25.5</protobuf-java.min.version>
</properties>

Expand All @@ -38,8 +39,6 @@
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<!-- 5.0.0-rc < 5.0.0, unfortunately -->
<version>[${protobuf-java.min.version},4.999999)</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -153,6 +152,19 @@

</dependencies>

<dependencyManagement>
<dependencies>
<!-- we need to generate protobuf sources with the minium protobuf version we want to be compatible with -->
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<!-- caution - updating this will break compatibility with older protobuf-java versions -->
<version>${protobuf-java.min.version}</version>
</dependency>
</dependencies>

</dependencyManagement>

<build>
<!-- required for protobuf generation -->
<extensions>
Expand Down Expand Up @@ -238,24 +250,6 @@
</build>

<profiles>
<profile>
<!-- this profile forces us to compile against our minimum version of protobuf-java,
which is required so we can be compatible with both protobuf-java@v3 and protobuf-java@v4 consumers -->
<id>build</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>

<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<!-- must match minimum version in protobuf-java dependency range above -->
<version>${protobuf-java.min.version}</version>
</dependency>
</dependencies>

</profile>
<profile>
<!-- this profile handles running the flagd e2e tests -->
<id>e2e</id>
Expand Down

0 comments on commit 074baae

Please sign in to comment.