diff --git a/build.sbt b/build.sbt index 246b1f76..9674b7a3 100644 --- a/build.sbt +++ b/build.sbt @@ -18,16 +18,16 @@ import sbt.{Project, addCompilerPlugin, _} import sbt.librarymanagement.CrossVersion import com.github.sbt.git.SbtGit.GitKeys._ -// Variables: -val scioVersion = "0.13.6" -val beamVersion = "2.52.0" // keep in sync with scio +val scioVersion = "0.14.0" + +val beamVersion = "2.53.0" // keep in sync with scio val avroVersion = "1.8.2" // keep in sync with scio val scalacheckShapelessVersion = "1.3.1" val scalatestVersion = "3.2.17" val scalatestMockitoVersion = "3.1.0.0" val jodaTimeVersion = "2.10.10" // keep in sync with scio -val magnoliaVersion = "1.1.3" // keep in sync with scio -val ratatoolVersion = "0.4.3" // keep scio versions in sync +val magnoliaVersion = "1.1.8" // keep in sync with scio +val ratatoolVersion = "0.4.4" val scalaCheckVersion = "1.17.0" val enumeratumVersion = "1.7.3" val scalaCollectionsCompatVersion = "2.11.0" @@ -58,7 +58,7 @@ lazy val commonSettings = Defaults.coreDefaultSettings ++ Sonatype.sonatypeSetti name := "spotify-elitzur", scalaVersion := "2.13.12", scalacOptions ++= Seq( - "-target:jvm-1.8", + "-target:8", "-deprecation", "-feature", "-unchecked", @@ -72,19 +72,13 @@ lazy val commonSettings = Defaults.coreDefaultSettings ++ Sonatype.sonatypeSetti Seq() } }, - javacOptions ++= Seq("-source", "1.8", - "-target", "1.8"), - + javacOptions ++= Seq("--release", "8"), // Repositories and dependencies - resolvers ++= Seq( - Resolver.sonatypeRepo("public"), - "Local Maven Repository" at "file://" + Path.userHome.absolutePath + "/.m2/repository", - "Local Ivy Repository" at "file://" + Path.userHome.absolutePath + "/.ivy2/local", - "Confluent's Maven Public Repository" at "https://packages.confluent.io/maven/" - ), + resolvers ++= Resolver.sonatypeOssRepos("public"), // protobuf-lite is an older subset of protobuf-java and causes issues excludeDependencies += "com.google.protobuf" % "protobuf-lite", + excludeDependencies += "org.apache.beam" % "beam-sdks-java-io-kafka", crossPaths := true, autoScalaLibrary := false, @@ -92,10 +86,10 @@ lazy val commonSettings = Defaults.coreDefaultSettings ++ Sonatype.sonatypeSetti libraryDependencies ++= Seq( "org.scala-lang" % "scala-reflect" % scalaVersion.value, - "org.scalatest" %% "scalatest" % scalatestVersion % "test", - "org.scalatestplus" %% "mockito-1-10" % scalatestMockitoVersion % "test", - "org.scalacheck" %% "scalacheck" % scalaCheckVersion % "test", - "com.spotify" %% "ratatool-scalacheck" % ratatoolVersion % "test", + "org.scalatest" %% "scalatest" % scalatestVersion % Test, + "org.scalatestplus" %% "mockito-1-10" % scalatestMockitoVersion % Test, + "org.scalacheck" %% "scalacheck" % scalaCheckVersion % Test, + "com.spotify" %% "ratatool-scalacheck" % ratatoolVersion % Test, "joda-time" % "joda-time" % jodaTimeVersion, "com.softwaremill.magnolia1_2" %% "magnolia" % magnoliaVersion, "com.beachape" %% "enumeratum" % enumeratumVersion, diff --git a/elitzur-examples/src/main/scala/com/spotify/elitzur/examples/ScioAvro.scala b/elitzur-examples/src/main/scala/com/spotify/elitzur/examples/ScioAvro.scala index 031173e2..4c4dc3b8 100644 --- a/elitzur-examples/src/main/scala/com/spotify/elitzur/examples/ScioAvro.scala +++ b/elitzur-examples/src/main/scala/com/spotify/elitzur/examples/ScioAvro.scala @@ -18,6 +18,7 @@ package com.spotify.elitzur.examples import com.spotify.scio._ +import com.spotify.scio.avro._ import com.spotify.elitzur.schemas.{InnerNestedType, TestAvroTypes} import com.spotify.elitzur.scio._ import com.spotify.elitzur.validators._ diff --git a/elitzur-scio/src/main/scala/com/spotify/elitzur/scio/Implicits.scala b/elitzur-scio/src/main/scala/com/spotify/elitzur/scio/Implicits.scala index 5868df84..54e75e2e 100644 --- a/elitzur-scio/src/main/scala/com/spotify/elitzur/scio/Implicits.scala +++ b/elitzur-scio/src/main/scala/com/spotify/elitzur/scio/Implicits.scala @@ -21,6 +21,7 @@ import ValidatorDoFns.{ValidatorDoFn, ValidatorDoFnWithResult} import com.spotify.elitzur.converters.avro.AvroConverter import com.spotify.elitzur.validators.{PostValidation, ValidationRecordConfig, Validator} import com.spotify.scio.coders.Coder +import com.spotify.scio.coders.kryo._ import com.spotify.scio.values.SCollection import org.apache.avro.generic.GenericRecord import org.apache.beam.sdk.transforms.ParDo diff --git a/elitzur-scio/src/test/scala/com/spotify/elitzur/AvroTest.scala b/elitzur-scio/src/test/scala/com/spotify/elitzur/AvroTest.scala index f33024a5..7496109f 100644 --- a/elitzur-scio/src/test/scala/com/spotify/elitzur/AvroTest.scala +++ b/elitzur-scio/src/test/scala/com/spotify/elitzur/AvroTest.scala @@ -21,6 +21,8 @@ import com.spotify.elitzur.converters.avro._ import ValidationTypeImplicits._ import com.spotify.elitzur.scio._ import com.spotify.elitzur.validators._ +import com.spotify.scio.avro._ +import com.spotify.scio.coders.kryo._ import com.spotify.scio.testing.PipelineSpec import com.spotify.skeleton.schema._ import com.spotify.scio.values.SCollection @@ -29,6 +31,7 @@ import org.apache.avro.util.Utf8 import org.apache.beam.sdk.Pipeline.PipelineExecutionException import org.scalacheck.{Arbitrary, Gen} import com.spotify.ratatool.scalacheck._ +import com.spotify.scio.avro._ sealed trait TestEnum extends EnumEntry with Product with Serializable