Skip to content

Commit

Permalink
all: update animalsniffer to Java 7 and add Android 14 (#4727)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericgribkoff authored Aug 9, 2018
1 parent 6735208 commit 79b2470
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 11 deletions.
3 changes: 2 additions & 1 deletion auth/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ dependencies {
libraries.google_auth_credentials
testCompile project(':grpc-testing'),
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"
}
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ subprojects {
epoll_suffix = ":" + osdetector.classifier
}
libraries = [
animalsniffer_annotations: "org.codehaus.mojo:animal-sniffer-annotations:1.17",
errorprone: "com.google.errorprone:error_prone_annotations:2.2.0",
gson: "com.google.code.gson:gson:2.7",
guava: "com.google.guava:guava:${guavaVersion}",
Expand Down
3 changes: 2 additions & 1 deletion context/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ description = 'gRPC: Context'

dependencies {
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"
}
1 change: 1 addition & 0 deletions core/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ java_library(
"@com_google_guava_guava//jar",
"@io_opencensus_opencensus_api//jar",
"@io_opencensus_opencensus_contrib_grpc_metrics//jar",
"@org_codehaus_mojo_animal_sniffer_annotations//jar",
],
)

Expand Down
6 changes: 4 additions & 2 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ dependencies {
libraries.gson,
libraries.guava,
libraries.errorprone,
libraries.jsr305
libraries.jsr305,
libraries.animalsniffer_annotations
compile (libraries.opencensus_api) {
// prefer 3.0.0 from libraries instead of 3.0.1
exclude group: 'com.google.code.findbugs', module: 'jsr305'
Expand All @@ -28,7 +29,8 @@ dependencies {
project(':grpc-grpclb'),
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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import javax.naming.directory.Attribute;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;

/**
* {@link JndiResourceResolverFactory} resolves additional records for the DnsNameResolver.
Expand Down Expand Up @@ -194,6 +195,7 @@ static SrvRecord parseSrvRecord(String rawRecord) {
return new SrvRecord(parts[3], Integer.parseInt(parts[2]));
}

@IgnoreJRERequirement
private static List<String> getAllRecords(String recordType, String name)
throws NamingException {
String[] rrType = new String[]{recordType};
Expand Down Expand Up @@ -235,6 +237,7 @@ private static List<String> getAllRecords(String recordType, String name)
return records;
}

@IgnoreJRERequirement
private static void closeThenThrow(NamingEnumeration<?> namingEnumeration, NamingException e)
throws NamingException {
try {
Expand All @@ -245,6 +248,7 @@ private static void closeThenThrow(NamingEnumeration<?> namingEnumeration, Namin
throw e;
}

@IgnoreJRERequirement
private static void closeThenThrow(DirContext ctx, NamingException e) throws NamingException {
try {
ctx.close();
Expand Down
3 changes: 2 additions & 1 deletion okhttp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ dependencies {
testCompile project(':grpc-core').sourceSets.test.output,
project(':grpc-testing'),
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 {
Expand Down
3 changes: 2 additions & 1 deletion protobuf-lite/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ dependencies {

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 {
Expand Down
3 changes: 2 additions & 1 deletion protobuf-nano/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ dependencies {
compile project(':grpc-core'),
libraries.protobuf_nano,
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()
Expand Down
2 changes: 1 addition & 1 deletion protobuf/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies {
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/'
12 changes: 11 additions & 1 deletion repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def grpc_java_repositories(
omit_io_opencensus_grpc_metrics = False,
omit_javax_annotation = 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."""
if not omit_com_google_api_grpc_google_common_protos:
com_google_api_grpc_google_common_protos()
Expand Down Expand Up @@ -92,6 +93,8 @@ def grpc_java_repositories(
junit_junit()
if not omit_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(
name = "guava",
Expand Down Expand Up @@ -311,3 +314,10 @@ def org_apache_commons_lang3():
artifact = "org.apache.commons:commons-lang3:3.5",
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",
)
2 changes: 1 addition & 1 deletion services/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies {
compileOnly libraries.javax_annotation
testCompile project(':grpc-testing'),
libraries.netty_epoll // for DomainSocketAddress
signature "org.codehaus.mojo.signature:java16:1.1@signature"
signature "org.codehaus.mojo.signature:java17:1.0@signature"
}

configureProtoCompilation()
3 changes: 2 additions & 1 deletion stub/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ dependencies {
compile project(':grpc-core')
testCompile libraries.truth,
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/"

0 comments on commit 79b2470

Please sign in to comment.