diff options
| author | Stefan Schmidt <ubschmidt2@users.noreply.github.com> | 2018-03-09 21:41:09 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-09 21:41:09 +0100 |
| commit | 7d681cc50a3478303b5d26b884d0638d5dbae6d5 (patch) | |
| tree | 9b028780fe28065c9f9efd7ec0d3c825dec79262 /build.gradle | |
| parent | a59bf4dde1961fd3d3c119f5a7c305b55be80b59 (diff) | |
| download | platform_external_opencensus-java-7d681cc50a3478303b5d26b884d0638d5dbae6d5.tar.gz platform_external_opencensus-java-7d681cc50a3478303b5d26b884d0638d5dbae6d5.tar.bz2 platform_external_opencensus-java-7d681cc50a3478303b5d26b884d0638d5dbae6d5.zip | |
Fix build on platforms that are not supported by netty-tcnative. (#1041)
For projects that depend on gRPC during test execution, make sure to
also configure ALPN if running on a platform (e.g. FreeBSD) that is not
supported by io.netty:netty-tcnative-boringssl-static:jar. Also see:
https://github.com/grpc/grpc-java/blob/master/SECURITY.md#tls-with-jdk-jetty-alpnnpn
I think something is better than nothing here.
Diffstat (limited to 'build.gradle')
| -rw-r--r-- | build.gradle | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle index 5f311a94..14e2eb70 100644 --- a/build.gradle +++ b/build.gradle @@ -394,4 +394,24 @@ subprojects { } } } + + // For projects that depend on gRPC during test execution, make sure to + // also configure ALPN if running on a platform (e.g. FreeBSD) that is not + // supported by io.netty:netty-tcnative-boringssl-static:jar. Also see: + // https://github.com/grpc/grpc-java/blob/master/SECURITY.md#tls-with-jdk-jetty-alpnnpn + if (project.name in ['opencensus-exporter-stats-stackdriver', + 'opencensus-exporter-trace-stackdriver']) { + def os = org.gradle.internal.os.OperatingSystem.current() + if (!os.isLinux() && !os.isWindows() && !os.isMacOsX()) { + configurations { + alpn + } + dependencies { + alpn 'org.mortbay.jetty.alpn:jetty-alpn-agent:2.0.7' + } + test { + jvmArgs "-javaagent:${configurations.alpn.asPath}" + } + } + } } |
