Skip to content

Commit

Permalink
Java 11 compatibility (#3821)
Browse files Browse the repository at this point in the history
* Add the javax.annotation-api as a compile scope to the google-api-grpc projects

* Upgrade maven-compiler-plugin 3.5.1->3.7.0 and maven-jar-plugin 2.6->3.1.0

* Add annotation-api compile dependency to google-cloud-clients

* Fix objensis version 3.1.0->2.6

* Fix service option test visibility

* Temporarily using Java 7 build to test Java 11

* Restore the java 7 test to use the java 7 image
  • Loading branch information
chingor13 authored Nov 30, 2018
1 parent 6573662 commit 3a4efc7
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 10 deletions.
10 changes: 9 additions & 1 deletion google-api-grpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<!-- Common dependencies -->
Expand Down Expand Up @@ -751,7 +759,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<version>3.7.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public long millisTime() {
}
}

private interface TestService extends Service<TestServiceOptions> {}
interface TestService extends Service<TestServiceOptions> {}

private static class TestServiceImpl extends BaseService<TestServiceOptions>
implements TestService {
Expand Down Expand Up @@ -209,7 +209,7 @@ private static class DefaultTestServiceRpc implements TestServiceRpc {
DefaultTestServiceRpc(TestServiceOptions options) {}
}

private static class TestServiceOptions
static class TestServiceOptions
extends ServiceOptions<TestService, TestServiceOptions> {
private static class Builder
extends ServiceOptions.Builder<TestService, TestServiceOptions, Builder> {
Expand Down
12 changes: 10 additions & 2 deletions google-cloud-clients/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@
<objenesis.version>2.6</objenesis.version>
</properties>
<!-- All non-test dependency versions should be added to google-cloud-bom/pom.xml -->
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
Expand Down Expand Up @@ -580,7 +588,7 @@
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<version>3.1.0</version>
<configuration>
<archive>
<addMavenDescriptor>true</addMavenDescriptor>
Expand All @@ -606,7 +614,7 @@
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<version>3.7.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<version>3.7.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<version>3.5.1</version>
<version>3.7.0</version>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.source.version}</source>
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-testing/google-cloud-appenginejava8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<version>3.5.1</version>
<version>3.7.0</version>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.source.version}</source>
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<version>3.7.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-util/google-cloud-compat-checker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<version>3.7.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
Expand Down

0 comments on commit 3a4efc7

Please sign in to comment.