Skip to content

Commit 6838220

Browse files
authored
feat: google-java-format version as a property (#997)
Once we declare this version as a property, then the hermetic build script can use the property value to determine the version of the google-java-format to download when it builds the container image. ``` $ JAVA_FORMAT_VERSION=$(mvn -pl java-shared-config help:evaluate -Dexpression='google-java-format.version' -q -DforceStdout) $ echo $JAVA_FORMAT_VERSION 1.7 ``` This uses https://maven.apache.org/plugins/maven-help-plugin/evaluate-mojo.html
1 parent f4daddb commit 6838220

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java-shared-config/pom.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<skipITs>true</skipITs>
2929
<auto-value.version>1.11.0</auto-value.version>
3030
<docRoot>/java/docs/reference/</docRoot>
31+
<google-java-format.version>1.7</google-java-format.version>
3132
</properties>
3233

3334
<build>
@@ -179,7 +180,7 @@
179180
<dependency>
180181
<groupId>com.google.googlejavaformat</groupId>
181182
<artifactId>google-java-format</artifactId>
182-
<version>1.7</version>
183+
<version>${google-java-format.version}</version>
183184
</dependency>
184185
</dependencies>
185186
</plugin>

0 commit comments

Comments
 (0)