Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: gRPC codegen config in parent pom #170

Merged
merged 3 commits into from
Jan 23, 2025

Conversation

johanandren
Copy link
Member

@johanandren johanandren commented Jan 23, 2025

A profile triggered by the existence of a src/main/protobuf enables the akka-grpc plugin with the right config.

Also adds validation that the grpc version in the parent pom and the SDK are aligned as a CI check.

@github-actions github-actions bot added documentation documentation related java-sdk labels Jan 23, 2025
@johanandren johanandren marked this pull request as draft January 23, 2025 14:20
@johanandren
Copy link
Member Author

Manually checked that this works nicely in the doc snippets which has a protobuf dir and another sample that does not.

@johanandren johanandren marked this pull request as ready for review January 23, 2025 14:28
@johanandren johanandren requested a review from efgpinto January 23, 2025 14:29
Copy link
Contributor

@efgpinto efgpinto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM apart from the question about proto vs protobufdir.

<id>generate-protobuf-endpoints</id>
<activation>
<file>
<exists>src/main/protobuf</exists>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the directory was usually proto? maybe it can be either? I think we use to have proto in samples?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I'll change, IntelliJ suggests both (and we probably pick either up in Akka gRPC) but we indeed use proto Akka gRPC samples so let's go with that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record protobuf is the default in sbt/Scala projects

throw new IllegalStateException(
s"SDK Akka gRPC plugin version is [$pluginVersion] but parent pom version is not the same [$parentPomAkkaGrpcVersion]. " +
s"Align $parentPomFile with the SDK build version to correct.")
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to have this check in place. 👍

@johanandren johanandren merged commit 0016cfe into grpc-endpoints Jan 23, 2025
22 checks passed
@johanandren johanandren deleted the wip-grpc-project-setup branch January 23, 2025 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation documentation related java-sdk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants