mirror of https://github.com/grpc/grpc-java.git
Add build support for Java 11
It appears everything was already working on Java 11, except build-specific and testing issues. Updating to Netty 4.1.30 (#4940) probably fixed the last true Java 11 incompatibility. Fixes #4933
This commit is contained in:
parent
f7dec06fbc
commit
959323be97
|
|
@ -49,6 +49,7 @@ jdk:
|
||||||
# processor based plugin.
|
# processor based plugin.
|
||||||
- oraclejdk8 # if both jdk 8 and 9 are removed, migrate to net.ltgt.errorprone-javacplugin (see above comment)
|
- oraclejdk8 # if both jdk 8 and 9 are removed, migrate to net.ltgt.errorprone-javacplugin (see above comment)
|
||||||
- oraclejdk9 # if both jdk 8 and 9 are removed, migrate to net.ltgt.errorprone-javacplugin (see above comment)
|
- oraclejdk9 # if both jdk 8 and 9 are removed, migrate to net.ltgt.errorprone-javacplugin (see above comment)
|
||||||
|
- openjdk11
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ dependencies {
|
||||||
// prefer 20.0 from libraries instead of 19.0
|
// prefer 20.0 from libraries instead of 19.0
|
||||||
exclude group: 'com.google.guava', module: 'guava'
|
exclude group: 'com.google.guava', module: 'guava'
|
||||||
}
|
}
|
||||||
|
compileOnly libraries.javax_annotation
|
||||||
runtime project(':grpc-grpclb')
|
runtime project(':grpc-grpclb')
|
||||||
testCompile libraries.guava,
|
testCompile libraries.guava,
|
||||||
libraries.guava_testlib,
|
libraries.guava_testlib,
|
||||||
|
|
|
||||||
|
|
@ -297,6 +297,10 @@ subprojects {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jacoco {
|
||||||
|
toolVersion = "0.8.2"
|
||||||
|
}
|
||||||
|
|
||||||
checkstyle {
|
checkstyle {
|
||||||
configDir = file("$rootDir/buildscripts")
|
configDir = file("$rootDir/buildscripts")
|
||||||
toolVersion = "6.17"
|
toolVersion = "6.17"
|
||||||
|
|
|
||||||
|
|
@ -130,11 +130,14 @@ configurations {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testCompile project(':grpc-protobuf'),
|
testCompile project(':grpc-protobuf'),
|
||||||
project(':grpc-stub')
|
project(':grpc-stub'),
|
||||||
|
libraries.javax_annotation
|
||||||
testLiteCompile project(':grpc-protobuf-lite'),
|
testLiteCompile project(':grpc-protobuf-lite'),
|
||||||
project(':grpc-stub')
|
project(':grpc-stub'),
|
||||||
|
libraries.javax_annotation
|
||||||
testNanoCompile project(':grpc-protobuf-nano'),
|
testNanoCompile project(':grpc-protobuf-nano'),
|
||||||
project(':grpc-stub')
|
project(':grpc-stub'),
|
||||||
|
libraries.javax_annotation
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,9 @@ repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sourceCompatibility = 1.7
|
||||||
|
targetCompatibility = 1.7
|
||||||
|
|
||||||
// IMPORTANT: You probably want the non-SNAPSHOT version of gRPC. Make sure you
|
// IMPORTANT: You probably want the non-SNAPSHOT version of gRPC. Make sure you
|
||||||
// are looking at a tagged version of the example and not "master"!
|
// are looking at a tagged version of the example and not "master"!
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,12 @@
|
||||||
<artifactId>grpc-alts</artifactId>
|
<artifactId>grpc-alts</artifactId>
|
||||||
<version>${grpc.version}</version>
|
<version>${grpc.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.annotation</groupId>
|
||||||
|
<artifactId>javax.annotation-api</artifactId>
|
||||||
|
<version>1.2</version>
|
||||||
|
<scope>provided</scope> <!-- not needed at runtime -->
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.grpc</groupId>
|
<groupId>io.grpc</groupId>
|
||||||
<artifactId>grpc-testing</artifactId>
|
<artifactId>grpc-testing</artifactId>
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ public class ProtocolNegotiatorsTest {
|
||||||
sslContext = GrpcSslContexts.forServer(serverCert, key)
|
sslContext = GrpcSslContexts.forServer(serverCert, key)
|
||||||
.ciphers(TestUtils.preferredTestCiphers(), SupportedCipherSuiteFilter.INSTANCE).build();
|
.ciphers(TestUtils.preferredTestCiphers(), SupportedCipherSuiteFilter.INSTANCE).build();
|
||||||
engine = SSLContext.getDefault().createSSLEngine();
|
engine = SSLContext.getDefault().createSSLEngine();
|
||||||
|
engine.setUseClientMode(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ dependencies {
|
||||||
compileOnly libraries.javax_annotation
|
compileOnly libraries.javax_annotation
|
||||||
testCompile project(':grpc-testing'),
|
testCompile project(':grpc-testing'),
|
||||||
libraries.netty_epoll // for DomainSocketAddress
|
libraries.netty_epoll // for DomainSocketAddress
|
||||||
|
testCompileOnly libraries.javax_annotation
|
||||||
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue