Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
include:
- javaVersion: 25
distribution: 'liberica'
- javaVersion: 17
distribution: 'temurin'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Contribution Guidelines

## Building from Source

Java 25 is the preferred version to build with as we leverage [JSpecify](https://jspecify.dev/docs/start-here/) to validate nullability constraints in the source code.

However, if you can not use Java 25 for some reason, you can still build locally with Java 17.
In this scenario the nullability constraints will not be validated locally but rather via the continuous integration pull request workflow.

## Code Formatting and Javadoc

Before submitting a PR, please run the following commands to ensure proper formatting and Javadoc processing
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ For further information go to our [Spring gRPC reference documentation](https://

# Getting Started

**📌 NOTE**\
Spring gRPC `1.0.x` supports Spring Boot `4.0.x.`

This section offers jumping off points for how to get started using Spring gRPC. There is a simple sample project in the `samples` directory (e.g. [`grpc-server`](https://github.com/spring-projects/spring-grpc/tree/main/samples/grpc-server)). You can run it with `mvn spring-boot:run` or `gradle bootRun`. You will see the following code in that sample.

Want to get started? Let’s speedrun a working service.
Expand Down Expand Up @@ -146,9 +149,6 @@ More details on what is going on in the next section.

You should follow the steps in each of the following section according to your needs.

**📌 NOTE**\
Spring gRPC supports Spring Boot 3.4.x and 3.5.x

### Add Milestone and Snapshot Repositories

If you prefer to add the dependency snippets by hand, follow the directions in the following sections.
Expand Down
116 changes: 75 additions & 41 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,47 +190,6 @@
<artifactId>maven-site-plugin</artifactId>
<version>${maven-site-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<release>${java.version}</release>
<showWarnings>true</showWarnings>
<compilerArgs>
<compilerArg>-parameters</compilerArg>
<compilerArg>-Xdoclint:none</compilerArg>
<compilerArg>-Werror</compilerArg>
<compilerArg>-XDcompilePolicy=simple</compilerArg>
<compilerArg>--should-stop=ifError=FLOW</compilerArg>
<compilerArg>
-Xplugin:ErrorProne
<!-- Disable all built-in error prone checks -->
-XepDisableAllChecks
<!-- JSpecify mode https://github.com/uber/NullAway/wiki/JSpecify-Support -->
-XepOpt:NullAway:JSpecifyMode=true
<!-- Check JSpecify annotations -->
-Xep:NullAway:ERROR
-XepOpt:NullAway:OnlyNullMarked
-XepOpt:NullAway:TreatGeneratedAsUnannotated=true
<!-- https://github.com/uber/NullAway/issues/162 -->
-XepExcludedPaths:.*/src/test/java/.*
</compilerArg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>${error-prone.version}</version>
</path>
<path>
<groupId>com.uber.nullaway</groupId>
<artifactId>nullaway</artifactId>
<version>${nullaway.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down Expand Up @@ -464,6 +423,81 @@
</plugins>
</build>
</profile>
<profile>
<id>java17</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<compilerArgument>-parameters</compilerArgument>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jspecify</id>
<activation>
<jdk>[25,)</jdk>
<property>
<name>jspecify.enabled</name>
<value>!false</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<release>${java.version}</release>
<showWarnings>true</showWarnings>
<compilerArgs>
<compilerArg>-parameters</compilerArg>
<compilerArg>-Xdoclint:none</compilerArg>
<compilerArg>-Werror</compilerArg>
<compilerArg>-XDcompilePolicy=simple</compilerArg>
<compilerArg>--should-stop=ifError=FLOW</compilerArg>
<compilerArg>
-Xplugin:ErrorProne
<!-- Disable all built-in error prone checks -->
-XepDisableAllChecks
<!-- JSpecify mode https://github.com/uber/NullAway/wiki/JSpecify-Support -->
-XepOpt:NullAway:JSpecifyMode=true
<!-- Check JSpecify annotations -->
-Xep:NullAway:ERROR
-XepOpt:NullAway:OnlyNullMarked
-XepOpt:NullAway:TreatGeneratedAsUnannotated=true
<!-- https://github.com/uber/NullAway/issues/162 -->
-XepExcludedPaths:.*/src/test/java/.*
</compilerArg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>${error-prone.version}</version>
</path>
<path>
<groupId>com.uber.nullaway</groupId>
<artifactId>nullaway</artifactId>
<version>${nullaway.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>staging</id>
<distributionManagement>
Expand Down
1 change: 1 addition & 0 deletions spring-grpc-docs/src/main/antora/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
* xref:index.adoc[Overview]
* xref:whats-new.adoc[What's new?]
* xref:system-requirements.adoc[System Requirements]
* xref:getting-started.adoc[Getting Started]
* xref:server.adoc[GRPC Server]
* xref:client.adoc[GRPC Clients]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:spring-grpc-version: 1.0.x
:spring-framework-version: 7.0.1
:spring-boot-version: 4.0.x
:spring-framework-docs: https://spring.io/projects/spring-framework#learn
:spring-boot-docs: https://spring.io/projects/spring-boot#learn
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
[[contribution-guidelines]]
= Contribution Guidelines

== Building from Source

Java 25 is the preferred version to build with as we leverage https://jspecify.dev/docs/start-here/[JSpecify] to validate nullability constraints in the source code.

However, if you can not use Java 25 for some reason, you can still build locally with Java 17.
In this scenario the nullability constraints will not be validated locally but rather via the continuous integration pull request workflow.

== Code Formatting and Javadoc

Before submitting a PR, please run the following commands to ensure proper formatting and Javadoc processing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[[getting-started]]
= Getting Started

include::./attributes/attributes-variables.adoc[]

NOTE: Spring gRPC `{spring-grpc-version}` supports Spring Boot `{spring-boot-version}`

This section offers jumping off points for how to get started using Spring gRPC. There is a simple sample project in the `samples` directory (e.g. https://github.com/spring-projects/spring-grpc/tree/main/samples/grpc-server[`grpc-server`]). You can run it with `mvn spring-boot:run` or `gradle bootRun`. You will see the following code in that sample.

Want to get started? Let's speedrun a working service.
Expand Down Expand Up @@ -146,8 +150,6 @@ More details on what is going on in the next section.

You should follow the steps in each of the following section according to your needs.

NOTE: Spring gRPC supports Spring Boot 3.4.x and 3.5.x

[[repositories]]
=== Add Milestone and Snapshot Repositories

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[[system-requirements]]
= System Requirements

include::./attributes/attributes-variables.adoc[]

Spring gRPC `{spring-grpc-version}` requires the following:

- https://www.java.com[Java 17] and is compatible up to and including Java 25
- {spring-framework-docs}[Spring Framework `{spring-framework-version}`] or above

We recommend a Spring Boot first approach and Spring gRPC `{spring-grpc-version}` supports {spring-boot-docs}[Spring Boot] `{spring-boot-version}.`
Loading