<commit_before>/**
 * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com>
 */
package lagom.build

import sbt.Keys._
import sbt._

object Dependencies {

  object Versions {
    // Version numbers

    val Scala210 = "2.10.7"
    val Scala212 = "2.12.8"
    val Scala    = Seq(Scala212)
    val SbtScala = Seq(Scala212, Scala210)

    // If you update the version of Play, you probably need to update the other Play* variables.
    val Play             = "2.8.0-M3"
    val PlayJson         = "2.8.0-M3"
    val PlayStandaloneWs = "2.1.0-M3"
    val Twirl            = "1.5.0-M2"
    val PlayFileWatch    = "1.1.8"

    val Akka: String = sys.props.getOrElse("lagom.build.akka.version", "2.6.0-M4")
    val AkkaHttp     = "10.1.8"

    val AkkaPersistenceCassandra = "0.62"
    val AkkaPersistenceJdbc      = "3.5.2"
    val AkkaManagement           = "1.0.1"

    val Disruptor = "3.3.11"

    // Also be sure to update ScalaTestVersion in docs/build.sbt.
    val ScalaTest            = "3.0.8"
    val Jackson              = "2.9.9"
    val JacksonCore          = Jackson
    val JacksonDatatype      = Jackson
    val JacksonDatabind      = Jackson
    val Guava                = "28.0-jre"
    val Maven                = "3.6.0"
    val Netty                = "4.1.36.Final"
    val NettyReactiveStreams = "2.0.3"
    val Kafka                = "2.1.1"
    val AlpakkaKafka         = "1.0.4"
    val Curator              = "2.12.0"
    val Immutables           = "2.3.10"
    val HibernateCore        = "5.4.2.Final"
    val PCollections         = "2.2.0"

    val ScalaJava8Compat = "0.9.0"
    val ScalaXml         = "1.2.0"
    val Slick            = "3.3.2"
    val JUnit            = "4.12"
    val JUnitInterface   = "0.11"

    val Slf4j   = "1.7.25"
    val Logback = "1.2.3"
    val Log4j   = "2.11.2"

    val jetty = "9.4.16.v20190411"

    val Selenium = "3.141.59"
  }

  // Some setup before we start creating ModuleID vals
  private val slf4jApi = "org.slf4j" % "slf4j-api" % Versions.Slf4j
  private val slf4j: Seq[ModuleID] = Seq("jcl-over-slf4j", "jul-to-slf4j", "log4j-over-slf4j").map {
    "org.slf4j" % _ % Versions.Slf4j
  } ++ Seq(slf4jApi)
  private val excludeSlf4j = slf4j.map { moduleId =>
    ExclusionRule(moduleId.organization, moduleId.name)
  }
  private val log4jModules = Seq(
    "log4j-api",
    "log4j-core",
    "log4j-slf4j-impl"
  ).map(artifactId => ("org.apache.logging.log4j" % artifactId % Versions.Log4j).excludeAll(excludeSlf4j: _*))

  // Specific libraries that get reused
  private val scalaTest: ModuleID    = ("org.scalatest" %% "scalatest" % Versions.ScalaTest).excludeAll(excludeSlf4j: _*)
  private val guava                  = "com.google.guava" % "guava" % Versions.Guava
  private val scalaJava8Compat       = "org.scala-lang.modules" %% "scala-java8-compat" % Versions.ScalaJava8Compat
  private val scalaCollectionCompat  = "org.scala-lang.modules" %% "scala-collection-compat" % "2.1.1"
  private val scalaXml               = "org.scala-lang.modules" %% "scala-xml" % Versions.ScalaXml
  private val javassist              = "org.javassist" % "javassist" % "3.24.0-GA"
  private val byteBuddy              = "net.bytebuddy" % "byte-buddy" % "1.9.10"
  private val scalaParserCombinators = "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2"
  private val typesafeConfig         = "com.typesafe" % "config" % "1.3.4"
  private val sslConfig              = "com.typesafe" %% "ssl-config-core" % "0.4.0"
  private val h2                     = "com.h2database" % "h2" % "1.4.192"
  private val cassandraDriverCore =
    ("com.datastax.cassandra" % "cassandra-driver-core" % "3.6.0").excludeAll(excludeSlf4j: _*)

  private val akkaActor            = "com.typesafe.akka" %% "akka-actor" % Versions.Akka
  private val akkaRemote           = "com.typesafe.akka" %% "akka-remote" % Versions.Akka
  private val akkaCluster          = "com.typesafe.akka" %% "akka-cluster" % Versions.Akka
  private val akkaClusterSharding  = "com.typesafe.akka" %% "akka-cluster-sharding" % Versions.Akka
  private val akkaClusterTools     = "com.typesafe.akka" %% "akka-cluster-tools" % Versions.Akka
  private val akkaDistributedData  = "com.typesafe.akka" %% "akka-distributed-data" % Versions.Akka
  private val akkaJackson          = "com.typesafe.akka" %% "akka-serialization-jackson" % Versions.Akka
  private val akkaMultiNodeTestkit = "com.typesafe.akka" %% "akka-multi-node-testkit" % Versions.Akka
  private val akkaPersistence      = "com.typesafe.akka" %% "akka-persistence" % Versions.Akka
  private val akkaPersistenceQuery = "com.typesafe.akka" %% "akka-persistence-query" % Versions.Akka
  private val akkaSlf4j            = ("com.typesafe.akka" %% "akka-slf4j" % Versions.Akka).excludeAll(excludeSlf4j: _*)
  private val akkaStream           = "com.typesafe.akka" %% "akka-stream" % Versions.Akka
  private val akkaProtobuf         = "com.typesafe.akka" %% "akka-protobuf" % Versions.Akka

  private val akkaManagement                 = "com.lightbend.akka.management" %% "akka-management"                   % Versions.AkkaManagement
  private val akkaManagementClusterHttp      = "com.lightbend.akka.management" %% "akka-management-cluster-http"      % Versions.AkkaManagement
  private val akkaManagementClusterBootstrap = "com.lightbend.akka.management" %% "akka-management-cluster-bootstrap" % Versions.AkkaManagement

  private val akkaStreamTestkit = "com.typesafe.akka"   %% "akka-stream-testkit" % Versions.Akka
  private val akkaTestkit       = "com.typesafe.akka"   %% "akka-testkit"        % Versions.Akka
  private val reactiveStreams   = "org.reactivestreams" % "reactive-streams"     % "1.0.2"

  private val akkaDiscovery = "com.typesafe.akka" %% "akka-discovery" % Versions.Akka

  private val akkaPersistenceJdbc =
    ("com.github.dnvriend" %% "akka-persistence-jdbc" % Versions.AkkaPersistenceJdbc).excludeAll(excludeSlf4j: _*)

  // latest version of APC depend on a Cassandra driver core that's not compatible with Lagom (newer netty/guava/etc... under the covers)
  private val akkaPersistenceCassandra         = "com.typesafe.akka" %% "akka-persistence-cassandra"          % Versions.AkkaPersistenceCassandra
  private val akkaPersistenceCassandraLauncher = "com.typesafe.akka" %% "akka-persistence-cassandra-launcher" % Versions.AkkaPersistenceCassandra
  private val akkaStreamKafka                  = "com.typesafe.akka" %% "akka-stream-kafka"                   % Versions.AlpakkaKafka
  private val kafkaClients                     = "org.apache.kafka"  % "kafka-clients"                        % Versions.Kafka

  private val akkaHttpCore      = "com.typesafe.akka" %% "akka-http-core"       % Versions.AkkaHttp
  private val akkaHttpRouteDsl  = "com.typesafe.akka" %% "akka-http"            % Versions.AkkaHttp
  private val akkaHttpSprayJson = "com.typesafe.akka" %% "akka-http-spray-json" % Versions.AkkaHttp
  private val akkaParsing       = "com.typesafe.akka" %% "akka-parsing"         % Versions.AkkaHttp

  private val sprayJson = "io.spray" %% "spray-json" % "1.3.5"

  private val play           = ("com.typesafe.play" %% "play"           % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playBuildLink  = ("com.typesafe.play" % "build-link"      % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playExceptions = ("com.typesafe.play" % "play-exceptions" % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playGuice      = ("com.typesafe.play" %% "play-guice"     % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playJava       = ("com.typesafe.play" %% "play-java"      % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playJdbc       = ("com.typesafe.play" %% "play-jdbc"      % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playNettyServer =
    ("com.typesafe.play" %% "play-netty-server" % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playAkkaHttpServer =
    ("com.typesafe.play" %% "play-akka-http-server" % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playServer = ("com.typesafe.play" %% "play-server" % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playTest   = ("com.typesafe.play" %% "play-test"   % Versions.Play).excludeAll(excludeSlf4j: _*)

  private val playWs    = ("com.typesafe.play" %% "play-ws"     % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playAhcWs = ("com.typesafe.play" %% "play-ahc-ws" % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playJson  = ("com.typesafe.play" %% "play-json"   % Versions.PlayJson).excludeAll(excludeSlf4j: _*)
  private val playFunctional =
    ("com.typesafe.play" %% "play-functional" % Versions.PlayJson).excludeAll(excludeSlf4j: _*)
  private val playFileWatch =
    ("com.lightbend.play" %% "play-file-watch" % Versions.PlayFileWatch).excludeAll(excludeSlf4j: _*)

  private val pcollections          = "org.pcollections" % "pcollections" % Versions.PCollections
  private val jsr250                = "javax.annotation" % "jsr250-api" % "1.0"
  private val junit                 = "junit" % "junit" % Versions.JUnit
  private val commonsLang           = "org.apache.commons" % "commons-lang3" % "3.9"
  private val javaxAnnotationApi    = "javax.annotation" % "javax.annotation-api" % "1.3.2"
  private val dropwizardMetricsCore = ("io.dropwizard.metrics" % "metrics-core" % "3.2.6").excludeAll(excludeSlf4j: _*)

  private val okhttp3 = "com.squareup.okhttp3" % "okhttp" % "3.11.0"
  private val okio    = "com.squareup.okio"    % "okio"   % "1.14.1"

  private val jacksonFamily =
    libraryFamily("com.fasterxml.jackson.core", Versions.JacksonCore)(
      "jackson-annotations",
      "jackson-core"
    ) ++ libraryFamily("com.fasterxml.jackson.core", Versions.JacksonDatabind)(
      "jackson-databind"
    ) ++ libraryFamily("com.fasterxml.jackson.datatype", Versions.JacksonDatatype)(
      "jackson-datatype-jdk8",
      "jackson-datatype-jsr310",
      "jackson-datatype-guava",
      "jackson-datatype-pcollections",
    ) ++ libraryFamily("com.fasterxml.jackson.module", Versions.JacksonDatatype)(
      "jackson-module-parameter-names",
      "jackson-module-paranamer"
    ) ++ libraryFamily("com.fasterxml.jackson.dataformat", Versions.JacksonDatatype)(
      "jackson-dataformat-cbor",
    )

  val scalaParserCombinatorOverrides = Seq(scalaParserCombinators)

  // A whitelist of dependencies that Lagom is allowed to depend on, either directly or transitively.
  // This list is used to validate all of Lagom's dependencies.
  // By maintaining this whitelist, we can be absolutely sure of what we depend on, that we consistently depend on the
  // same versions of libraries across our modules, we can ensure also that we have no partial upgrades of families of
  // libraries (such as Play or Akka), and we will also be alerted when a transitive dependency is upgraded (because
  // the validation task will fail) which means we can manually check that it is safe to upgrade that dependency.
  val DependencyWhitelist: Def.Initialize[Seq[ModuleID]] = Def.setting {
    val scalaVersion = Keys.scalaVersion.value

    Seq(
      "aopalliance" % "aopalliance" % "1.0",
      cassandraDriverCore,
      akkaPersistenceJdbc,
      "com.github.jnr"           % "jffi"                    % "1.2.16",
      "com.github.jnr"           % "jnr-constants"           % "0.9.9",
      "com.github.jnr"           % "jnr-ffi"                 % "2.1.7",
      "com.github.jnr"           % "jnr-posix"               % "3.0.44",
      "com.github.jnr"           % "jnr-x86asm"              % "1.0.2",
      "com.google.code.findbugs" % "jsr305"                  % "3.0.2",
      "com.google.errorprone"    % "error_prone_annotations" % "2.3.2",
      guava,
      "com.google.j2objc"            % "j2objc-annotations"   % "1.3",
      "com.google.inject"            % "guice"                % "4.2.2",
      "com.google.inject.extensions" % "guice-assistedinject" % "4.2.2",
      "com.googlecode.usc"           % "jdbcdslog"            % "1.0.6.2",
      "org.checkerframework"         % "checker-qual"         % "2.8.1",
      "javax.xml.bind"               % "jaxb-api"             % "2.3.1",
      "jakarta.xml.bind"             % "jakarta.xml.bind-api" % "2.3.2",
      h2,
      "com.jolbox"   % "bonecp"          % "0.8.0.RELEASE",
      "com.lmax"     % "disruptor"       % Versions.Disruptor,
      "com.novocode" % "junit-interface" % Versions.JUnitInterface,
      typesafeConfig,
      sslConfig,
      "com.typesafe" %% "ssl-config-core" % "0.3.7",
      akkaDiscovery,
      akkaHttpCore,
      akkaHttpRouteDsl,
      akkaHttpSprayJson,
      akkaStreamKafka,
      akkaJackson,
      akkaParsing,
      akkaManagement,
      akkaManagementClusterHttp,
      akkaManagementClusterBootstrap,
      akkaPersistenceCassandra,
      akkaPersistenceCassandraLauncher,
      sprayJson,
      "com.typesafe.netty" % "netty-reactive-streams"      % Versions.NettyReactiveStreams,
      "com.typesafe.netty" % "netty-reactive-streams-http" % Versions.NettyReactiveStreams,
      "com.typesafe.play"  %% "cachecontrol"               % "2.0.0-M2",
      playJson,
      playFunctional,
      "com.typesafe.play" %% "play-json"       % "2.7.2",
      "com.typesafe.play" %% "play-functional" % "2.7.2",
      // play client libs
      playWs,
      playAhcWs,
      "com.typesafe.play" %% "play-ws-standalone"      % Versions.PlayStandaloneWs,
      "com.typesafe.play" %% "play-ws-standalone-xml"  % Versions.PlayStandaloneWs,
      "com.typesafe.play" %% "play-ws-standalone-json" % Versions.PlayStandaloneWs,
      "com.typesafe.play" %% "play-ahc-ws-standalone"  % Versions.PlayStandaloneWs,
      "com.typesafe.play" % "shaded-asynchttpclient"   % Versions.PlayStandaloneWs,
      "com.typesafe.play" % "shaded-oauth"             % Versions.PlayStandaloneWs,
      playTest,
      // dependencies added by play-test
      "org.fluentlenium"        % "fluentlenium-core"       % "3.7.1",
      "org.seleniumhq.selenium" % "selenium-support"        % Versions.Selenium,
      "org.seleniumhq.selenium" % "selenium-api"            % Versions.Selenium,
      "org.seleniumhq.selenium" % "selenium-remote-driver"  % Versions.Selenium,
      "org.seleniumhq.selenium" % "selenium-firefox-driver" % Versions.Selenium,
      byteBuddy,
      "org.apache.commons"   % "commons-exec"    % "1.3",
      "commons-logging"      % "commons-logging" % "1.2",
      "com.google.code.gson" % "gson"            % "2.8.4",
      okhttp3,
      okio,
      "org.atteo.classindex"        % "classindex"         % "3.4",
      "org.seleniumhq.selenium"     % "htmlunit-driver"    % "2.35.1",
      "xalan"                       % "xalan"              % "2.7.2",
      "xalan"                       % "serializer"         % "2.7.2",
      "org.apache.commons"          % "commons-text"       % "1.6",
      "org.apache.httpcomponents"   % "httpmime"           % "4.5.8",
      "org.apache.httpcomponents"   % "httpclient"         % "4.5.8",
      "org.apache.httpcomponents"   % "httpcore"           % "4.4.11",
      "net.sourceforge.htmlunit"    % "htmlunit"           % "2.35.0",
      "net.sourceforge.htmlunit"    % "htmlunit-core-js"   % "2.35.0",
      "net.sourceforge.htmlunit"    % "neko-htmlunit"      % "2.35.0",
      "xerces"                      % "xercesImpl"         % "2.12.0",
      "xml-apis"                    % "xml-apis"           % "1.4.01",
      "net.sourceforge.htmlunit"    % "htmlunit-cssparser" % "1.4.0",
      "commons-io"                  % "commons-io"         % "2.6",
      "commons-net"                 % "commons-net"        % "3.6",
      "org.eclipse.jetty.websocket" % "websocket-client"   % Versions.jetty,
      "org.eclipse.jetty"           % "jetty-client"       % Versions.jetty,
      "org.eclipse.jetty"           % "jetty-http"         % Versions.jetty,
      "org.eclipse.jetty"           % "jetty-util"         % Versions.jetty,
      "org.eclipse.jetty"           % "jetty-io"           % Versions.jetty,
      "org.eclipse.jetty"           % "jetty-xml"          % Versions.jetty,
      "org.eclipse.jetty.websocket" % "websocket-common"   % Versions.jetty,
      "org.eclipse.jetty.websocket" % "websocket-api"      % Versions.jetty,
      jsr250,
      "com.typesafe.play"  %% "twirl-api"      % Versions.Twirl,
      "com.typesafe.slick" %% "slick"          % Versions.Slick,
      "com.typesafe.slick" %% "slick-hikaricp" % Versions.Slick,
      "com.zaxxer"         % "HikariCP"        % "3.3.1",
      "commons-codec"      % "commons-codec"   % "1.11",
      dropwizardMetricsCore,
      "io.jsonwebtoken" % "jjwt" % "0.9.1",
      // Netty 3 uses a different package to Netty 4, and a different artifact ID, so can safely coexist
      "io.netty"            % "netty"                   % "3.10.6.Final",
      "javax.cache"         % "cache-api"               % "1.1.1",
      "javax.inject"        % "javax.inject"            % "1",
      "javax.transaction"   % "jta"                     % "1.1",
      "jakarta.transaction" % "jakarta.transaction-api" % "1.3.2",
      "joda-time"           % "joda-time"               % "2.10.2",
      "junit"               % "junit"                   % Versions.JUnit,
      "net.jodah"           % "typetools"               % "0.5.0",
      "org.lz4"             % "lz4-java"                % "1.5.0",
      "com.github.luben"    % "zstd-jni"                % "1.3.7-1",
      "org.agrona"          % "agrona"                  % "1.0.1",
      commonsLang,
      kafkaClients,
      "org.codehaus.mojo"               % "animal-sniffer-annotations" % "1.17",
      "org.hibernate"                   % "hibernate-validator"        % "5.2.4.Final",
      "org.hibernate.javax.persistence" % "hibernate-jpa-2.1-api"      % "1.0.2.Final",
      "org.immutables"                  % "value"                      % Versions.Immutables,
      javassist,
      "org.joda"     % "joda-convert"  % "1.9.2",
      "org.hamcrest" % "hamcrest-core" % "1.3",
      "org.lmdbjava" % "lmdbjava"      % "0.6.1",
      pcollections,
      reactiveStreams,
      "org.scalactic" %% "scalactic" % Versions.ScalaTest,
      scalaTest,
      "org.scala-lang.modules" %% "scala-java8-compat" % Versions.ScalaJava8Compat,
      scalaParserCombinators,
      "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.1",
      scalaXml,
      "org.scala-sbt"     % "test-interface" % "1.0",
      "org.typelevel"     %% "macro-compat"  % "1.1.1",<commit_msg>Fix dependencies validation<commit_after>/**
 * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com>
 */
package lagom.build

import sbt.Keys._
import sbt._

object Dependencies {

  object Versions {
    // Version numbers

    val Scala210 = "2.10.7"
    val Scala212 = "2.12.8"
    val Scala    = Seq(Scala212)
    val SbtScala = Seq(Scala212, Scala210)

    // If you update the version of Play, you probably need to update the other Play* variables.
    val Play             = "2.8.0-M3"
    val PlayJson         = "2.8.0-M4"
    val PlayStandaloneWs = "2.1.0-M3"
    val Twirl            = "1.5.0-M2"
    val PlayFileWatch    = "1.1.8"

    val Akka: String = sys.props.getOrElse("lagom.build.akka.version", "2.6.0-M4")
    val AkkaHttp     = "10.1.8"

    val AkkaPersistenceCassandra = "0.62"
    val AkkaPersistenceJdbc      = "3.5.2"
    val AkkaManagement           = "1.0.1"

    val Disruptor = "3.3.11"

    // Also be sure to update ScalaTestVersion in docs/build.sbt.
    val ScalaTest            = "3.0.8"
    val Jackson              = "2.9.9"
    val JacksonCore          = Jackson
    val JacksonDatatype      = Jackson
    val JacksonDatabind      = "2.9.9.1"
    val Guava                = "28.0-jre"
    val Maven                = "3.6.0"
    val Netty                = "4.1.37.Final"
    val NettyReactiveStreams = "2.0.3"
    val Kafka                = "2.1.1"
    val AlpakkaKafka         = "1.0.4"
    val Curator              = "2.12.0"
    val Immutables           = "2.3.10"
    val HibernateCore        = "5.4.2.Final"
    val PCollections         = "2.2.0"

    val ScalaJava8Compat = "0.9.0"
    val ScalaXml         = "1.2.0"
    val Slick            = "3.3.2"
    val JUnit            = "4.12"
    val JUnitInterface   = "0.11"

    val Slf4j   = "1.7.25"
    val Logback = "1.2.3"
    val Log4j   = "2.11.2"

    val jetty = "9.4.16.v20190411"

    val Selenium = "3.141.59"
  }

  // Some setup before we start creating ModuleID vals
  private val slf4jApi = "org.slf4j" % "slf4j-api" % Versions.Slf4j
  private val slf4j: Seq[ModuleID] = Seq("jcl-over-slf4j", "jul-to-slf4j", "log4j-over-slf4j").map {
    "org.slf4j" % _ % Versions.Slf4j
  } ++ Seq(slf4jApi)
  private val excludeSlf4j = slf4j.map { moduleId =>
    ExclusionRule(moduleId.organization, moduleId.name)
  }
  private val log4jModules = Seq(
    "log4j-api",
    "log4j-core",
    "log4j-slf4j-impl"
  ).map(artifactId => ("org.apache.logging.log4j" % artifactId % Versions.Log4j).excludeAll(excludeSlf4j: _*))

  // Specific libraries that get reused
  private val scalaTest: ModuleID    = ("org.scalatest" %% "scalatest" % Versions.ScalaTest).excludeAll(excludeSlf4j: _*)
  private val guava                  = "com.google.guava" % "guava" % Versions.Guava
  private val scalaJava8Compat       = "org.scala-lang.modules" %% "scala-java8-compat" % Versions.ScalaJava8Compat
  private val scalaCollectionCompat  = "org.scala-lang.modules" %% "scala-collection-compat" % "2.1.1"
  private val scalaXml               = "org.scala-lang.modules" %% "scala-xml" % Versions.ScalaXml
  private val javassist              = "org.javassist" % "javassist" % "3.24.0-GA"
  private val byteBuddy              = "net.bytebuddy" % "byte-buddy" % "1.9.10"
  private val scalaParserCombinators = "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2"
  private val typesafeConfig         = "com.typesafe" % "config" % "1.3.4"
  private val sslConfig              = "com.typesafe" %% "ssl-config-core" % "0.4.0"
  private val h2                     = "com.h2database" % "h2" % "1.4.192"
  private val cassandraDriverCore =
    ("com.datastax.cassandra" % "cassandra-driver-core" % "3.6.0").excludeAll(excludeSlf4j: _*)

  private val akkaActor            = "com.typesafe.akka" %% "akka-actor" % Versions.Akka
  private val akkaRemote           = "com.typesafe.akka" %% "akka-remote" % Versions.Akka
  private val akkaCluster          = "com.typesafe.akka" %% "akka-cluster" % Versions.Akka
  private val akkaClusterSharding  = "com.typesafe.akka" %% "akka-cluster-sharding" % Versions.Akka
  private val akkaClusterTools     = "com.typesafe.akka" %% "akka-cluster-tools" % Versions.Akka
  private val akkaDistributedData  = "com.typesafe.akka" %% "akka-distributed-data" % Versions.Akka
  private val akkaJackson          = "com.typesafe.akka" %% "akka-serialization-jackson" % Versions.Akka
  private val akkaMultiNodeTestkit = "com.typesafe.akka" %% "akka-multi-node-testkit" % Versions.Akka
  private val akkaPersistence      = "com.typesafe.akka" %% "akka-persistence" % Versions.Akka
  private val akkaPersistenceQuery = "com.typesafe.akka" %% "akka-persistence-query" % Versions.Akka
  private val akkaSlf4j            = ("com.typesafe.akka" %% "akka-slf4j" % Versions.Akka).excludeAll(excludeSlf4j: _*)
  private val akkaStream           = "com.typesafe.akka" %% "akka-stream" % Versions.Akka
  private val akkaProtobuf         = "com.typesafe.akka" %% "akka-protobuf" % Versions.Akka

  private val akkaManagement                 = "com.lightbend.akka.management" %% "akka-management"                   % Versions.AkkaManagement
  private val akkaManagementClusterHttp      = "com.lightbend.akka.management" %% "akka-management-cluster-http"      % Versions.AkkaManagement
  private val akkaManagementClusterBootstrap = "com.lightbend.akka.management" %% "akka-management-cluster-bootstrap" % Versions.AkkaManagement

  private val akkaStreamTestkit = "com.typesafe.akka"   %% "akka-stream-testkit" % Versions.Akka
  private val akkaTestkit       = "com.typesafe.akka"   %% "akka-testkit"        % Versions.Akka
  private val reactiveStreams   = "org.reactivestreams" % "reactive-streams"     % "1.0.2"

  private val akkaDiscovery = "com.typesafe.akka" %% "akka-discovery" % Versions.Akka

  private val akkaPersistenceJdbc =
    ("com.github.dnvriend" %% "akka-persistence-jdbc" % Versions.AkkaPersistenceJdbc).excludeAll(excludeSlf4j: _*)

  // latest version of APC depend on a Cassandra driver core that's not compatible with Lagom (newer netty/guava/etc... under the covers)
  private val akkaPersistenceCassandra         = "com.typesafe.akka" %% "akka-persistence-cassandra"          % Versions.AkkaPersistenceCassandra
  private val akkaPersistenceCassandraLauncher = "com.typesafe.akka" %% "akka-persistence-cassandra-launcher" % Versions.AkkaPersistenceCassandra
  private val akkaStreamKafka                  = "com.typesafe.akka" %% "akka-stream-kafka"                   % Versions.AlpakkaKafka
  private val kafkaClients                     = "org.apache.kafka"  % "kafka-clients"                        % Versions.Kafka

  private val akkaHttpCore      = "com.typesafe.akka" %% "akka-http-core"       % Versions.AkkaHttp
  private val akkaHttpRouteDsl  = "com.typesafe.akka" %% "akka-http"            % Versions.AkkaHttp
  private val akkaHttpSprayJson = "com.typesafe.akka" %% "akka-http-spray-json" % Versions.AkkaHttp
  private val akkaParsing       = "com.typesafe.akka" %% "akka-parsing"         % Versions.AkkaHttp

  private val sprayJson = "io.spray" %% "spray-json" % "1.3.5"

  private val play           = ("com.typesafe.play" %% "play"           % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playBuildLink  = ("com.typesafe.play" % "build-link"      % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playExceptions = ("com.typesafe.play" % "play-exceptions" % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playGuice      = ("com.typesafe.play" %% "play-guice"     % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playJava       = ("com.typesafe.play" %% "play-java"      % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playJdbc       = ("com.typesafe.play" %% "play-jdbc"      % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playNettyServer =
    ("com.typesafe.play" %% "play-netty-server" % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playAkkaHttpServer =
    ("com.typesafe.play" %% "play-akka-http-server" % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playServer = ("com.typesafe.play" %% "play-server" % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playTest   = ("com.typesafe.play" %% "play-test"   % Versions.Play).excludeAll(excludeSlf4j: _*)

  private val playWs    = ("com.typesafe.play" %% "play-ws"     % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playAhcWs = ("com.typesafe.play" %% "play-ahc-ws" % Versions.Play).excludeAll(excludeSlf4j: _*)
  private val playJson  = ("com.typesafe.play" %% "play-json"   % Versions.PlayJson).excludeAll(excludeSlf4j: _*)
  private val playFunctional =
    ("com.typesafe.play" %% "play-functional" % Versions.PlayJson).excludeAll(excludeSlf4j: _*)
  private val playFileWatch =
    ("com.lightbend.play" %% "play-file-watch" % Versions.PlayFileWatch).excludeAll(excludeSlf4j: _*)

  private val pcollections          = "org.pcollections" % "pcollections" % Versions.PCollections
  private val jsr250                = "javax.annotation" % "jsr250-api" % "1.0"
  private val junit                 = "junit" % "junit" % Versions.JUnit
  private val commonsLang           = "org.apache.commons" % "commons-lang3" % "3.9"
  private val javaxAnnotationApi    = "javax.annotation" % "javax.annotation-api" % "1.3.2"
  private val dropwizardMetricsCore = ("io.dropwizard.metrics" % "metrics-core" % "3.2.6").excludeAll(excludeSlf4j: _*)

  private val okhttp3 = "com.squareup.okhttp3" % "okhttp" % "3.11.0"
  private val okio    = "com.squareup.okio"    % "okio"   % "1.14.1"

  private val jacksonFamily =
    libraryFamily("com.fasterxml.jackson.core", Versions.JacksonCore)(
      "jackson-annotations",
      "jackson-core"
    ) ++ libraryFamily("com.fasterxml.jackson.core", Versions.JacksonDatabind)(
      "jackson-databind"
    ) ++ libraryFamily("com.fasterxml.jackson.datatype", Versions.JacksonDatatype)(
      "jackson-datatype-jdk8",
      "jackson-datatype-jsr310",
      "jackson-datatype-guava",
      "jackson-datatype-pcollections",
    ) ++ libraryFamily("com.fasterxml.jackson.module", Versions.JacksonDatatype)(
      "jackson-module-parameter-names",
      "jackson-module-paranamer"
    ) ++ libraryFamily("com.fasterxml.jackson.dataformat", Versions.JacksonDatatype)(
      "jackson-dataformat-cbor",
    )

  val scalaParserCombinatorOverrides = Seq(scalaParserCombinators)

  // A whitelist of dependencies that Lagom is allowed to depend on, either directly or transitively.
  // This list is used to validate all of Lagom's dependencies.
  // By maintaining this whitelist, we can be absolutely sure of what we depend on, that we consistently depend on the
  // same versions of libraries across our modules, we can ensure also that we have no partial upgrades of families of
  // libraries (such as Play or Akka), and we will also be alerted when a transitive dependency is upgraded (because
  // the validation task will fail) which means we can manually check that it is safe to upgrade that dependency.
  val DependencyWhitelist: Def.Initialize[Seq[ModuleID]] = Def.setting {
    val scalaVersion = Keys.scalaVersion.value

    Seq(
      "aopalliance" % "aopalliance" % "1.0",
      cassandraDriverCore,
      akkaPersistenceJdbc,
      "com.github.jnr"           % "jffi"                    % "1.2.16",
      "com.github.jnr"           % "jnr-constants"           % "0.9.9",
      "com.github.jnr"           % "jnr-ffi"                 % "2.1.7",
      "com.github.jnr"           % "jnr-posix"               % "3.0.44",
      "com.github.jnr"           % "jnr-x86asm"              % "1.0.2",
      "com.google.code.findbugs" % "jsr305"                  % "3.0.2",
      "com.google.errorprone"    % "error_prone_annotations" % "2.3.2",
      guava,
      "com.google.j2objc"            % "j2objc-annotations"   % "1.3",
      "com.google.inject"            % "guice"                % "4.2.2",
      "com.google.inject.extensions" % "guice-assistedinject" % "4.2.2",
      "com.googlecode.usc"           % "jdbcdslog"            % "1.0.6.2",
      "org.checkerframework"         % "checker-qual"         % "2.8.1",
      "javax.xml.bind"               % "jaxb-api"             % "2.3.1",
      "jakarta.xml.bind"             % "jakarta.xml.bind-api" % "2.3.2",
      h2,
      "com.jolbox"   % "bonecp"          % "0.8.0.RELEASE",
      "com.lmax"     % "disruptor"       % Versions.Disruptor,
      "com.novocode" % "junit-interface" % Versions.JUnitInterface,
      typesafeConfig,
      sslConfig,
      "com.typesafe" %% "ssl-config-core" % "0.3.7",
      akkaDiscovery,
      akkaHttpCore,
      akkaHttpRouteDsl,
      akkaHttpSprayJson,
      akkaStreamKafka,
      akkaJackson,
      akkaParsing,
      akkaManagement,
      akkaManagementClusterHttp,
      akkaManagementClusterBootstrap,
      akkaPersistenceCassandra,
      akkaPersistenceCassandraLauncher,
      sprayJson,
      "com.typesafe.netty" % "netty-reactive-streams"      % Versions.NettyReactiveStreams,
      "com.typesafe.netty" % "netty-reactive-streams-http" % Versions.NettyReactiveStreams,
      "com.typesafe.play"  %% "cachecontrol"               % "2.0.0-M2",
      playJson,
      playFunctional,
      "com.typesafe.play" %% "play-json"       % "2.7.2",
      "com.typesafe.play" %% "play-functional" % "2.7.2",
      // play client libs
      playWs,
      playAhcWs,
      "com.typesafe.play" %% "play-ws-standalone"      % Versions.PlayStandaloneWs,
      "com.typesafe.play" %% "play-ws-standalone-xml"  % Versions.PlayStandaloneWs,
      "com.typesafe.play" %% "play-ws-standalone-json" % Versions.PlayStandaloneWs,
      "com.typesafe.play" %% "play-ahc-ws-standalone"  % Versions.PlayStandaloneWs,
      "com.typesafe.play" % "shaded-asynchttpclient"   % Versions.PlayStandaloneWs,
      "com.typesafe.play" % "shaded-oauth"             % Versions.PlayStandaloneWs,
      playTest,
      // dependencies added by play-test
      "org.fluentlenium"        % "fluentlenium-core"       % "3.7.1",
      "org.seleniumhq.selenium" % "selenium-support"        % Versions.Selenium,
      "org.seleniumhq.selenium" % "selenium-api"            % Versions.Selenium,
      "org.seleniumhq.selenium" % "selenium-remote-driver"  % Versions.Selenium,
      "org.seleniumhq.selenium" % "selenium-firefox-driver" % Versions.Selenium,
      byteBuddy,
      "org.apache.commons"   % "commons-exec"    % "1.3",
      "commons-logging"      % "commons-logging" % "1.2",
      "com.google.code.gson" % "gson"            % "2.8.4",
      okhttp3,
      okio,
      "org.atteo.classindex"        % "classindex"         % "3.4",
      "org.seleniumhq.selenium"     % "htmlunit-driver"    % "2.35.1",
      "xalan"                       % "xalan"              % "2.7.2",
      "xalan"                       % "serializer"         % "2.7.2",
      "org.apache.commons"          % "commons-text"       % "1.6",
      "org.apache.httpcomponents"   % "httpmime"           % "4.5.8",
      "org.apache.httpcomponents"   % "httpclient"         % "4.5.8",
      "org.apache.httpcomponents"   % "httpcore"           % "4.4.11",
      "net.sourceforge.htmlunit"    % "htmlunit"           % "2.35.0",
      "net.sourceforge.htmlunit"    % "htmlunit-core-js"   % "2.35.0",
      "net.sourceforge.htmlunit"    % "neko-htmlunit"      % "2.35.0",
      "xerces"                      % "xercesImpl"         % "2.12.0",
      "xml-apis"                    % "xml-apis"           % "1.4.01",
      "net.sourceforge.htmlunit"    % "htmlunit-cssparser" % "1.4.0",
      "commons-io"                  % "commons-io"         % "2.6",
      "commons-net"                 % "commons-net"        % "3.6",
      "org.eclipse.jetty.websocket" % "websocket-client"   % Versions.jetty,
      "org.eclipse.jetty"           % "jetty-client"       % Versions.jetty,
      "org.eclipse.jetty"           % "jetty-http"         % Versions.jetty,
      "org.eclipse.jetty"           % "jetty-util"         % Versions.jetty,
      "org.eclipse.jetty"           % "jetty-io"           % Versions.jetty,
      "org.eclipse.jetty"           % "jetty-xml"          % Versions.jetty,
      "org.eclipse.jetty.websocket" % "websocket-common"   % Versions.jetty,
      "org.eclipse.jetty.websocket" % "websocket-api"      % Versions.jetty,
      jsr250,
      "com.typesafe.play"  %% "twirl-api"      % Versions.Twirl,
      "com.typesafe.slick" %% "slick"          % Versions.Slick,
      "com.typesafe.slick" %% "slick-hikaricp" % Versions.Slick,
      "com.zaxxer"         % "HikariCP"        % "3.3.1",
      "commons-codec"      % "commons-codec"   % "1.11",
      dropwizardMetricsCore,
      "io.jsonwebtoken" % "jjwt" % "0.9.1",
      // Netty 3 uses a different package to Netty 4, and a different artifact ID, so can safely coexist
      "io.netty"            % "netty"                   % "3.10.6.Final",
      "javax.cache"         % "cache-api"               % "1.1.1",
      "javax.inject"        % "javax.inject"            % "1",
      "javax.transaction"   % "jta"                     % "1.1",
      "jakarta.transaction" % "jakarta.transaction-api" % "1.3.2",
      "joda-time"           % "joda-time"               % "2.10.3",
      "junit"               % "junit"                   % Versions.JUnit,
      "net.jodah"           % "typetools"               % "0.5.0",
      "org.lz4"             % "lz4-java"                % "1.5.0",
      "com.github.luben"    % "zstd-jni"                % "1.3.7-1",
      "org.agrona"          % "agrona"                  % "1.0.1",
      commonsLang,
      kafkaClients,
      "org.codehaus.mojo"               % "animal-sniffer-annotations" % "1.17",
      "org.hibernate"                   % "hibernate-validator"        % "5.2.4.Final",
      "org.hibernate.javax.persistence" % "hibernate-jpa-2.1-api"      % "1.0.2.Final",
      "org.immutables"                  % "value"                      % Versions.Immutables,
      javassist,
      "org.joda"     % "joda-convert"  % "1.9.2",
      "org.hamcrest" % "hamcrest-core" % "1.3",
      "org.lmdbjava" % "lmdbjava"      % "0.6.1",
      pcollections,
      reactiveStreams,
      "org.scalactic" %% "scalactic" % Versions.ScalaTest,
      scalaTest,
      "org.scala-lang.modules" %% "scala-java8-compat" % Versions.ScalaJava8Compat,
      scalaParserCombinators,
      "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.1",
      scalaXml,
      "org.scala-sbt"     % "test-interface" % "1.0",
      "org.typelevel"     %% "macro-compat"  % "1.1.1",
{'fraction_non_alphanumeric': 0.14371628910463863, 'fraction_numerical': 0.02594390507011866, 'mean_word_length': 2.2705062621273595, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 26}, 'pii_count': 3, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4481618', 'n_tokens_mistral': 13955, 'n_tokens_neox': 13044, 'n_words': 2193}