Skip to content

Commit

Permalink
Issue #200: Upgrade Netty to a version supporting Java 9+ (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrabinowitz authored Jul 8, 2020
1 parent 22b41d3 commit 3597f15
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
lazy val scala211Version = "2.11.12"
lazy val scala212Version = "2.12.10"
lazy val sparkVersion = "2.4.0"
lazy val grpcVersion = "1.30.2"
// should match the dependency from grpc-netty
lazy val nettyVersion = "4.1.48.Final"
// should match the dependency in grpc-netty
lazy val nettyTcnativeVersion = "2.0.29.Final"

lazy val commonSettings = Seq(
organization := "com.google.cloud.spark",
Expand All @@ -35,9 +40,9 @@ lazy val root = (project in file("."))
.aggregate(connector, fatJar, published)

lazy val commonTestDependencies = Seq(
"io.grpc" % "grpc-alts" % "1.30.0",
"io.grpc" % "grpc-netty-shaded" % "1.30.0",
"com.google.api" % "gax-grpc" % "1.57.0",
"io.grpc" % "grpc-alts" % grpcVersion exclude("io.grpc", "grpc-netty-shaded"),
"io.grpc" % "grpc-netty" % grpcVersion,
"com.google.api" % "gax-grpc" % "1.57.0" exclude("io.grpc", "grpc-netty-shaded"),
"com.google.guava" % "guava" % "29.0-jre",

"org.scalatest" %% "scalatest" % "3.1.0" % "test",
Expand Down Expand Up @@ -78,12 +83,22 @@ lazy val connector = (project in file("connector"))

// Keep com.google.cloud dependencies in sync
"com.google.cloud" % "google-cloud-bigquery" % "1.116.1",
"com.google.cloud" % "google-cloud-bigquerystorage" % "0.133.2-beta",
"com.google.cloud" % "google-cloud-bigquerystorage" % "0.133.2-beta"
exclude("io.grpc", "grpc-netty-shaded"),
// Keep in sync with com.google.cloud
"com.fasterxml.jackson.core" % "jackson-databind" % "2.11.0",
"com.fasterxml.jackson.module" % "jackson-module-paranamer" % "2.11.0",
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.11.0",
"io.netty" % "netty-all" % "4.1.27.Final" % "provided",

// Netty, with a version supporting Java 11
"io.netty" % "netty-all" % nettyVersion % "provided",
"io.netty" % "netty-buffer" % nettyVersion,
"io.netty" % "netty-common" % nettyVersion,
"org.eclipse.jetty.alpn" % "alpn-api" % "1.1.3.v20160715",
// scalastyle:off
// See https://github.com/grpc/grpc-java/blob/master/SECURITY.md#tls-with-netty-tcnative-on-boringssl
// scalastyle:on
"io.netty" % "netty-tcnative-boringssl-static" % nettyTcnativeVersion,

// runtime
// scalastyle:off
Expand All @@ -109,6 +124,7 @@ lazy val fatJar = project
).map(_.inAll),

assemblyMergeStrategy in assembly := {
case x if x.endsWith("/public-suffix-list.txt") => MergeStrategy.filterDistinctLines
case "module-info.class" => MergeStrategy.discard
case PathList(ps@_*) if ps.last.endsWith(".properties") => MergeStrategy.filterDistinctLines
case PathList(ps@_*) if ps.last.endsWith(".proto") => MergeStrategy.discard
Expand Down

0 comments on commit 3597f15

Please sign in to comment.