mirror of https://github.com/grpc/grpc-java.git
all: update animalsniffer to Java 7 and add Android 14 (#4727)
This commit is contained in:
parent
67352081f8
commit
79b24709b9
|
|
@ -4,5 +4,6 @@ dependencies {
|
||||||
libraries.google_auth_credentials
|
libraries.google_auth_credentials
|
||||||
testCompile project(':grpc-testing'),
|
testCompile project(':grpc-testing'),
|
||||||
libraries.oauth_client
|
libraries.oauth_client
|
||||||
signature "org.codehaus.mojo.signature:java16:1.1@signature"
|
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
||||||
|
signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4@signature"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,7 @@ subprojects {
|
||||||
epoll_suffix = ":" + osdetector.classifier
|
epoll_suffix = ":" + osdetector.classifier
|
||||||
}
|
}
|
||||||
libraries = [
|
libraries = [
|
||||||
|
animalsniffer_annotations: "org.codehaus.mojo:animal-sniffer-annotations:1.17",
|
||||||
errorprone: "com.google.errorprone:error_prone_annotations:2.2.0",
|
errorprone: "com.google.errorprone:error_prone_annotations:2.2.0",
|
||||||
gson: "com.google.code.gson:gson:2.7",
|
gson: "com.google.code.gson:gson:2.7",
|
||||||
guava: "com.google.guava:guava:${guavaVersion}",
|
guava: "com.google.guava:guava:${guavaVersion}",
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,6 @@ description = 'gRPC: Context'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testCompile libraries.jsr305
|
testCompile libraries.jsr305
|
||||||
signature "org.codehaus.mojo.signature:java16:1.1@signature"
|
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
||||||
|
signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4@signature"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ java_library(
|
||||||
"@com_google_guava_guava//jar",
|
"@com_google_guava_guava//jar",
|
||||||
"@io_opencensus_opencensus_api//jar",
|
"@io_opencensus_opencensus_api//jar",
|
||||||
"@io_opencensus_opencensus_contrib_grpc_metrics//jar",
|
"@io_opencensus_opencensus_contrib_grpc_metrics//jar",
|
||||||
|
"@org_codehaus_mojo_animal_sniffer_annotations//jar",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@ dependencies {
|
||||||
libraries.gson,
|
libraries.gson,
|
||||||
libraries.guava,
|
libraries.guava,
|
||||||
libraries.errorprone,
|
libraries.errorprone,
|
||||||
libraries.jsr305
|
libraries.jsr305,
|
||||||
|
libraries.animalsniffer_annotations
|
||||||
compile (libraries.opencensus_api) {
|
compile (libraries.opencensus_api) {
|
||||||
// prefer 3.0.0 from libraries instead of 3.0.1
|
// prefer 3.0.0 from libraries instead of 3.0.1
|
||||||
exclude group: 'com.google.code.findbugs', module: 'jsr305'
|
exclude group: 'com.google.code.findbugs', module: 'jsr305'
|
||||||
|
|
@ -28,7 +29,8 @@ dependencies {
|
||||||
project(':grpc-grpclb'),
|
project(':grpc-grpclb'),
|
||||||
libraries.guava_testlib
|
libraries.guava_testlib
|
||||||
|
|
||||||
signature "org.codehaus.mojo.signature:java16:1.1@signature"
|
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
||||||
|
signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4@signature"
|
||||||
}
|
}
|
||||||
|
|
||||||
javadoc {
|
javadoc {
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ import javax.naming.NamingException;
|
||||||
import javax.naming.directory.Attribute;
|
import javax.naming.directory.Attribute;
|
||||||
import javax.naming.directory.DirContext;
|
import javax.naming.directory.DirContext;
|
||||||
import javax.naming.directory.InitialDirContext;
|
import javax.naming.directory.InitialDirContext;
|
||||||
|
import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link JndiResourceResolverFactory} resolves additional records for the DnsNameResolver.
|
* {@link JndiResourceResolverFactory} resolves additional records for the DnsNameResolver.
|
||||||
|
|
@ -194,6 +195,7 @@ final class JndiResourceResolverFactory implements DnsNameResolver.ResourceResol
|
||||||
return new SrvRecord(parts[3], Integer.parseInt(parts[2]));
|
return new SrvRecord(parts[3], Integer.parseInt(parts[2]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@IgnoreJRERequirement
|
||||||
private static List<String> getAllRecords(String recordType, String name)
|
private static List<String> getAllRecords(String recordType, String name)
|
||||||
throws NamingException {
|
throws NamingException {
|
||||||
String[] rrType = new String[]{recordType};
|
String[] rrType = new String[]{recordType};
|
||||||
|
|
@ -235,6 +237,7 @@ final class JndiResourceResolverFactory implements DnsNameResolver.ResourceResol
|
||||||
return records;
|
return records;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@IgnoreJRERequirement
|
||||||
private static void closeThenThrow(NamingEnumeration<?> namingEnumeration, NamingException e)
|
private static void closeThenThrow(NamingEnumeration<?> namingEnumeration, NamingException e)
|
||||||
throws NamingException {
|
throws NamingException {
|
||||||
try {
|
try {
|
||||||
|
|
@ -245,6 +248,7 @@ final class JndiResourceResolverFactory implements DnsNameResolver.ResourceResol
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@IgnoreJRERequirement
|
||||||
private static void closeThenThrow(DirContext ctx, NamingException e) throws NamingException {
|
private static void closeThenThrow(DirContext ctx, NamingException e) throws NamingException {
|
||||||
try {
|
try {
|
||||||
ctx.close();
|
ctx.close();
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@ dependencies {
|
||||||
testCompile project(':grpc-core').sourceSets.test.output,
|
testCompile project(':grpc-core').sourceSets.test.output,
|
||||||
project(':grpc-testing'),
|
project(':grpc-testing'),
|
||||||
project(':grpc-netty')
|
project(':grpc-netty')
|
||||||
signature "org.codehaus.mojo.signature:java16:1.1@signature"
|
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
||||||
|
signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4@signature"
|
||||||
}
|
}
|
||||||
|
|
||||||
project.sourceSets {
|
project.sourceSets {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,8 @@ dependencies {
|
||||||
|
|
||||||
testProtobuf libraries.protobuf
|
testProtobuf libraries.protobuf
|
||||||
|
|
||||||
signature "org.codehaus.mojo.signature:java16:1.1@signature"
|
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
||||||
|
signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4@signature"
|
||||||
}
|
}
|
||||||
|
|
||||||
compileTestJava {
|
compileTestJava {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@ dependencies {
|
||||||
compile project(':grpc-core'),
|
compile project(':grpc-core'),
|
||||||
libraries.protobuf_nano,
|
libraries.protobuf_nano,
|
||||||
libraries.guava
|
libraries.guava
|
||||||
signature "org.codehaus.mojo.signature:java16:1.1@signature"
|
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
||||||
|
signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4@signature"
|
||||||
}
|
}
|
||||||
|
|
||||||
configureProtoCompilation()
|
configureProtoCompilation()
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ dependencies {
|
||||||
exclude group: 'com.google.protobuf', module: 'protobuf-lite'
|
exclude group: 'com.google.protobuf', module: 'protobuf-lite'
|
||||||
}
|
}
|
||||||
|
|
||||||
signature "org.codehaus.mojo.signature:java16:1.1@signature"
|
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
||||||
}
|
}
|
||||||
|
|
||||||
javadoc.options.links 'https://developers.google.com/protocol-buffers/docs/reference/java/'
|
javadoc.options.links 'https://developers.google.com/protocol-buffers/docs/reference/java/'
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,8 @@ def grpc_java_repositories(
|
||||||
omit_io_opencensus_grpc_metrics = False,
|
omit_io_opencensus_grpc_metrics = False,
|
||||||
omit_javax_annotation = False,
|
omit_javax_annotation = False,
|
||||||
omit_junit_junit = False,
|
omit_junit_junit = False,
|
||||||
omit_org_apache_commons_lang3 = False):
|
omit_org_apache_commons_lang3 = False,
|
||||||
|
omit_org_codehaus_mojo_animal_sniffer_annotations = False):
|
||||||
"""Imports dependencies for grpc-java."""
|
"""Imports dependencies for grpc-java."""
|
||||||
if not omit_com_google_api_grpc_google_common_protos:
|
if not omit_com_google_api_grpc_google_common_protos:
|
||||||
com_google_api_grpc_google_common_protos()
|
com_google_api_grpc_google_common_protos()
|
||||||
|
|
@ -92,6 +93,8 @@ def grpc_java_repositories(
|
||||||
junit_junit()
|
junit_junit()
|
||||||
if not omit_org_apache_commons_lang3:
|
if not omit_org_apache_commons_lang3:
|
||||||
org_apache_commons_lang3()
|
org_apache_commons_lang3()
|
||||||
|
if not omit_org_codehaus_mojo_animal_sniffer_annotations:
|
||||||
|
org_codehaus_mojo_animal_sniffer_annotations()
|
||||||
|
|
||||||
native.bind(
|
native.bind(
|
||||||
name = "guava",
|
name = "guava",
|
||||||
|
|
@ -311,3 +314,10 @@ def org_apache_commons_lang3():
|
||||||
artifact = "org.apache.commons:commons-lang3:3.5",
|
artifact = "org.apache.commons:commons-lang3:3.5",
|
||||||
sha1 = "6c6c702c89bfff3cd9e80b04d668c5e190d588c6",
|
sha1 = "6c6c702c89bfff3cd9e80b04d668c5e190d588c6",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def org_codehaus_mojo_animal_sniffer_annotations():
|
||||||
|
native.maven_jar(
|
||||||
|
name = "org_codehaus_mojo_animal_sniffer_annotations",
|
||||||
|
artifact = "org.codehaus.mojo:animal-sniffer-annotations:1.17",
|
||||||
|
sha1 = "f97ce6decaea32b36101e37979f8b647f00681fb",
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -21,7 +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
|
||||||
signature "org.codehaus.mojo.signature:java16:1.1@signature"
|
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
||||||
}
|
}
|
||||||
|
|
||||||
configureProtoCompilation()
|
configureProtoCompilation()
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@ dependencies {
|
||||||
compile project(':grpc-core')
|
compile project(':grpc-core')
|
||||||
testCompile libraries.truth,
|
testCompile libraries.truth,
|
||||||
project(':grpc-testing')
|
project(':grpc-testing')
|
||||||
signature "org.codehaus.mojo.signature:java16:1.1@signature"
|
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
||||||
|
signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4@signature"
|
||||||
}
|
}
|
||||||
|
|
||||||
javadoc.options.links "https://google.github.io/guava/releases/${guavaVersion}/api/docs/"
|
javadoc.options.links "https://google.github.io/guava/releases/${guavaVersion}/api/docs/"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue