Skip to content

Commit 3a4efc7

Browse files
authored
Java 11 compatibility (#3821)
* 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
1 parent 6573662 commit 3a4efc7

8 files changed

Lines changed: 26 additions & 10 deletions

File tree

google-api-grpc/pom.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@
8989
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
9090
</license>
9191
</licenses>
92+
<dependencies>
93+
<dependency>
94+
<groupId>javax.annotation</groupId>
95+
<artifactId>javax.annotation-api</artifactId>
96+
<version>1.2</version>
97+
<scope>compile</scope>
98+
</dependency>
99+
</dependencies>
92100
<dependencyManagement>
93101
<dependencies>
94102
<!-- Common dependencies -->
@@ -751,7 +759,7 @@
751759
<plugins>
752760
<plugin>
753761
<artifactId>maven-compiler-plugin</artifactId>
754-
<version>3.5.1</version>
762+
<version>3.7.0</version>
755763
<configuration>
756764
<source>1.7</source>
757765
<target>1.7</target>

google-cloud-clients/google-cloud-core/src/test/java/com/google/cloud/ServiceOptionsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public long millisTime() {
171171
}
172172
}
173173

174-
private interface TestService extends Service<TestServiceOptions> {}
174+
interface TestService extends Service<TestServiceOptions> {}
175175

176176
private static class TestServiceImpl extends BaseService<TestServiceOptions>
177177
implements TestService {
@@ -209,7 +209,7 @@ private static class DefaultTestServiceRpc implements TestServiceRpc {
209209
DefaultTestServiceRpc(TestServiceOptions options) {}
210210
}
211211

212-
private static class TestServiceOptions
212+
static class TestServiceOptions
213213
extends ServiceOptions<TestService, TestServiceOptions> {
214214
private static class Builder
215215
extends ServiceOptions.Builder<TestService, TestServiceOptions, Builder> {

google-cloud-clients/pom.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@
170170
<objenesis.version>2.6</objenesis.version>
171171
</properties>
172172
<!-- All non-test dependency versions should be added to google-cloud-bom/pom.xml -->
173+
<dependencies>
174+
<dependency>
175+
<groupId>javax.annotation</groupId>
176+
<artifactId>javax.annotation-api</artifactId>
177+
<version>1.2</version>
178+
<scope>compile</scope>
179+
</dependency>
180+
</dependencies>
173181
<dependencyManagement>
174182
<dependencies>
175183
<dependency>
@@ -580,7 +588,7 @@
580588
</plugin>
581589
<plugin>
582590
<artifactId>maven-jar-plugin</artifactId>
583-
<version>2.6</version>
591+
<version>3.1.0</version>
584592
<configuration>
585593
<archive>
586594
<addMavenDescriptor>true</addMavenDescriptor>
@@ -606,7 +614,7 @@
606614
</plugin>
607615
<plugin>
608616
<artifactId>maven-compiler-plugin</artifactId>
609-
<version>3.5.1</version>
617+
<version>3.7.0</version>
610618
<configuration>
611619
<source>1.7</source>
612620
<target>1.7</target>

google-cloud-examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<plugins>
9595
<plugin>
9696
<artifactId>maven-compiler-plugin</artifactId>
97-
<version>3.5.1</version>
97+
<version>3.7.0</version>
9898
<configuration>
9999
<source>1.7</source>
100100
<target>1.7</target>

google-cloud-testing/google-cloud-appengineflexcompat/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
<plugin>
4646
<groupId>org.apache.maven.plugins</groupId>
47-
<version>3.5.1</version>
47+
<version>3.7.0</version>
4848
<artifactId>maven-compiler-plugin</artifactId>
4949
<configuration>
5050
<source>${java.source.version}</source>

google-cloud-testing/google-cloud-appenginejava8/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
<plugin>
4141
<groupId>org.apache.maven.plugins</groupId>
42-
<version>3.5.1</version>
42+
<version>3.7.0</version>
4343
<artifactId>maven-compiler-plugin</artifactId>
4444
<configuration>
4545
<source>${java.source.version}</source>

google-cloud-testing/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
<plugins>
8686
<plugin>
8787
<artifactId>maven-compiler-plugin</artifactId>
88-
<version>3.5.1</version>
88+
<version>3.7.0</version>
8989
<configuration>
9090
<source>1.7</source>
9191
<target>1.7</target>

google-cloud-util/google-cloud-compat-checker/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<plugins>
6060
<plugin>
6161
<artifactId>maven-compiler-plugin</artifactId>
62-
<version>3.5.1</version>
62+
<version>3.7.0</version>
6363
<configuration>
6464
<source>1.7</source>
6565
<target>1.7</target>

0 commit comments

Comments
 (0)