diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 1768f2ff..96b6c600 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -15,10 +15,15 @@ jobs:
steps:
- uses: actions/checkout@v2
+
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
+
+ - name: Validate code format
+ run: mvn spotless:check
+
- name: Build with Maven
run: mvn -B package --file pom.xml
diff --git a/README.md b/README.md
index 4d0a54e0..67c9cd4d 100644
--- a/README.md
+++ b/README.md
@@ -45,6 +45,15 @@ public class PushOneDocument {
```
+## Local Setup to Contribute
+
+### Formatting
+
+This project uses [Google Java Format](https://github.com/google/google-java-format), so make sure your code is properly formatted before opening a pull request.
+```bash
+mvn spotless:apply
+```
+
## Release
* Tag the commit following semver.
diff --git a/pom.xml b/pom.xml
index 142e7175..9c4183c9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,26 +49,50 @@
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.0.0
+
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+
+ com.diffplug.spotless
+ spotless-maven-plugin
+ ${spotless.version}
+
+
+
+ src/main/java/**/*.java
+ src/test/java/**/*.java
+
+
+
+
+
+
+
+
+
+
+
release
-
- org.apache.maven.plugins
- maven-source-plugin
- 3.0.0
-
-
-
-
- attach-sources
-
- jar-no-fork
-
-
-
-
org.apache.maven.plugins
maven-javadoc-plugin
@@ -169,5 +193,6 @@
11
11
UTF-8
+ 2.37.0
\ No newline at end of file