Skip to content

Commit

Permalink
chore: configures project pom to java 8 (#1003)
Browse files Browse the repository at this point in the history
* chore: configures project pom to java 8

Configures source / target compilation to be Java 8.

* chore: updates clirr

Clirr does not seem to work with Java 8. The methods added here are not
new additions to the interface, but started to fail as we migrated to
Java 8. I am adding those to the exclusions in order to unblock CI.
  • Loading branch information
thiagotnunes committed Mar 24, 2021
1 parent 95cf759 commit 733d5b3
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
16 changes: 15 additions & 1 deletion google-cloud-spanner-bom/pom.xml
Expand Up @@ -107,6 +107,20 @@

<build>
<plugins>
<!-- TODO: Remove this once the shared configuration updates to use Java 8 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<compilerArgument>-Xlint:unchecked</compilerArgument>
<compilerArgument>-Xlint:deprecation</compilerArgument>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
Expand All @@ -116,4 +130,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
14 changes: 14 additions & 0 deletions google-cloud-spanner/clirr-ignored-differences.xml
Expand Up @@ -578,4 +578,18 @@
<className>com/google/cloud/spanner/connection/Connection</className>
<method>com.google.api.core.ApiFuture closeAsync()</method>
</difference>

<!-- Clirr seems to fail for these methods when upgrading to Java 8 -->
<!-- Adding these to unblock the CI -->
<!-- FIXME: Remove the methods below once clirr is fixed -->
<difference>
<differenceType>7012</differenceType>
<className>com/google/cloud/spanner/AsyncTransactionManager$CommitTimestampFuture</className>
<method>java.lang.Object get(long, java.util.concurrent.TimeUnit)</method>
</difference>
<difference>
<differenceType>7012</differenceType>
<className>com/google/cloud/spanner/AsyncTransactionManager$CommitTimestampFuture</className>
<method>java.lang.Object get()</method>
</difference>
</differences>
Expand Up @@ -49,7 +49,7 @@ public void testGetNull() {

@Test
public void testGetOrNull() {
assertThat(SpannerApiFutures.getOrNull(null)).isNull();
assertThat(SpannerApiFutures.getOrNull((ApiFuture<Object>) null)).isNull();
}

@Test
Expand Down
19 changes: 19 additions & 0 deletions pom.xml
Expand Up @@ -138,6 +138,25 @@
<module>google-cloud-spanner-bom</module>
</modules>

<build>
<plugins>
<!-- TODO: Remove this once the shared configuration updates to use Java 8 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<compilerArgument>-Xlint:unchecked</compilerArgument>
<compilerArgument>-Xlint:deprecation</compilerArgument>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
</plugins>
</build>

<reporting>
<plugins>
<plugin>
Expand Down

0 comments on commit 733d5b3

Please sign in to comment.