<commit_before>package im.actor

import akka.sbt.AkkaKernelPlugin
import akka.sbt.AkkaKernelPlugin.{Dist, distBootClass, distJvmOptions, outputDirectory}
import sbt.Keys._
import sbt._
import spray.revolver.RevolverPlugin._

object Build extends sbt.Build {
  val Organization = "Actor IM"
  val Version = "0.1.0-SNAPSHOT"
  val ScalaVersion = "2.11.6"

  lazy val buildSettings =
    Defaults.coreDefaultSettings ++
      Seq(
        organization := Organization,
        version := Version,
        scalaVersion := ScalaVersion,
        crossPaths := false,
        organizationName := Organization,
        organizationHomepage := Some(url("https://actor.im"))
      )

  lazy val compilerWarnings = Seq(
    "-Ywarn-dead-code",
    "-Ywarn-infer-any",
    "-Ywarn-numeric-widen"
  )

  lazy val defaultSettings =
    buildSettings ++ Formatting.formatSettings ++
      Seq(
        initialize ~= { _ =>
          if (sys.props("java.specification.version") != "1.8")
            sys.error("Java 8 is required for this project.")
        },
        resolvers ++= Resolvers.seq,
        scalacOptions in Compile ++= Seq(
          "-encoding",
          "UTF-8",
          "-deprecation",
          "-unchecked",
          "-feature",
          "-language:higherKinds",
          "-Xfatal-warnings",
          "-Xlint"
        ) ++ compilerWarnings,
        javaOptions ++= Seq("-Dfile.encoding=UTF-8", "-Dscalac.patmat.analysisBudget=off"),
        javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint:unchecked", "-Xlint:deprecation")
      )

  lazy val root = Project(
    "actor-server",
    file("."),
    settings =
      defaultSettings ++
        AkkaKernelPlugin.distSettings ++
        Revolver.settings ++
        Seq(
          libraryDependencies ++= Dependencies.root,
          distJvmOptions in Dist := "-server -Xms256M -Xmx1024M",
          distBootClass in Dist := "im.actor.server.Main",
          outputDirectory in Dist := file("target/dist"),
          Revolver.reStartArgs := Seq("im.actor.server.Main"),
          mainClass in Revolver.reStart := Some("im.actor.server.Main"),
          mainClass in Compile := Some("im.actor.server.Main"),
          autoCompilerPlugins := true,
          scalacOptions in(Compile, doc) := Seq(
            "-groups",
            "-implicits",
            "-diagrams"
          ) ++ compilerWarnings
        )
  ).settings(net.virtualvoid.sbt.graph.Plugin.graphSettings: _*)
    .dependsOn(actorFrontend)
    .aggregate(actorApi, actorFrontend, actorModels, actorPersist, actorPresences, actorSession, actorRpcApi, actorTests)

  lazy val actorApi = Project(
    id = "actor-api",
    base = file("actor-api"),
    settings =
      defaultSettings ++
        SbtActorApi.settings ++
        Seq(
          libraryDependencies ++= Dependencies.api
        )
  ).dependsOn(actorPersist, actorCodecs)

  lazy val actorSession = Project(
    id = "actor-session",
    base = file("actor-session"),
    settings = defaultSettings ++ Seq(
      libraryDependencies ++= Dependencies.session
    )
  ).dependsOn(actorPersist, actorCodecs, actorApi, actorRpcApi, actorPush)

  lazy val actorSessionMessages = Project(
    id = "actor-session-messages",
    base = file("actor-session-messages"),
    settings = defaultSettings ++ Seq(libraryDependencies ++= Dependencies.sessionMessages)
  ).dependsOn(actorApi)

  lazy val actorPush = Project(
    id = "actor-push",
    base = file("actor-push"),
    settings = defaultSettings ++ Seq(
      libraryDependencies ++= Dependencies.push
    )
  ).dependsOn(actorApi, actorCodecs, actorPersist, actorPresences, actorSessionMessages)

  lazy val actorPresences = Project(
    id = "actor-presences",
    base = file("actor-presences"),
    settings = defaultSettings ++ Seq(libraryDependencies ++= Dependencies.presences)
  ).dependsOn(actorPersist)

  lazy val actorRpcApi = Project(
    id = "actor-rpc-api",
    base = file("actor-rpc-api"),
    settings = defaultSettings ++ Seq(
      libraryDependencies ++= Dependencies.rpcApi
    )
  ).dependsOn(actorApi, actorCodecs, actorPersist, actorPresences, actorPush, actorSessionMessages, actorSms, actorSocial)

  lazy val actorSms = Project(
    id = "actor-sms",
    base = file("actor-sms"),
    settings = defaultSettings ++ Seq(libraryDependencies ++= Dependencies.sms)
  )

  lazy val actorSocial = Project(
    id = "actor-social",
    base = file("actor-social"),
    settings = defaultSettings ++ Seq(
      libraryDependencies ++= Dependencies.social
    )
  ).dependsOn(actorPersist)

  lazy val actorFrontend = Project(
    id = "actor-frontend",
    base = file("actor-frontend"),
    settings = defaultSettings ++ Seq(
      libraryDependencies ++= Dependencies.frontend
    )
  ).dependsOn(actorApi, actorSessionMessages, actorSession)

  lazy val actorCodecs = Project(
    id = "actor-codecs",
    base = file("actor-codecs"),
    settings = defaultSettings ++ Seq(
      libraryDependencies ++= Dependencies.codecs
    )
  ).dependsOn(actorModels)

  lazy val actorModels = Project(
    id = "actor-models",
    base = file("actor-models"),
    settings = defaultSettings ++ Seq(
      libraryDependencies ++= Dependencies.models
    )
  )

  lazy val actorPersist = Project(
    id = "actor-persist",
    base = file("actor-persist"),
    settings = defaultSettings ++ Seq(
      libraryDependencies ++= Dependencies.persist
    )
  ).dependsOn(actorModels)

  lazy val actorTests = Project(
    id = "actor-tests",
    base = file("actor-tests"),
    settings = defaultSettings ++ Testing.settings ++ Seq(
      libraryDependencies ++= Dependencies.tests
    ))
    .configs(Configs.all: _*)
    .dependsOn(actorApi, actorCodecs, actorFrontend, actorPersist, actorPush, actorRpcApi, actorSession)
}
<commit_msg>chore(build): add sbt cached resolution to build<commit_after>package im.actor

import akka.sbt.AkkaKernelPlugin
import akka.sbt.AkkaKernelPlugin.{Dist, distBootClass, distJvmOptions, outputDirectory}
import sbt.Keys._
import sbt._
import spray.revolver.RevolverPlugin._

object Build extends sbt.Build {
  val Organization = "Actor IM"
  val Version = "0.1.0-SNAPSHOT"
  val ScalaVersion = "2.11.6"

  lazy val buildSettings =
    Defaults.coreDefaultSettings ++
      Seq(
        organization := Organization,
        version := Version,
        scalaVersion := ScalaVersion,
        crossPaths := false,
        organizationName := Organization,
        updateOptions := updateOptions.value.withCachedResolution(true),
        organizationHomepage := Some(url("https://actor.im"))
      )

  lazy val compilerWarnings = Seq(
    "-Ywarn-dead-code",
    "-Ywarn-infer-any",
    "-Ywarn-numeric-widen"
  )

  lazy val defaultSettings =
    buildSettings ++ Formatting.formatSettings ++
      Seq(
        initialize ~= { _ =>
          if (sys.props("java.specification.version") != "1.8")
            sys.error("Java 8 is required for this project.")
        },
        resolvers ++= Resolvers.seq,
        scalacOptions in Compile ++= Seq(
          "-encoding",
          "UTF-8",
          "-deprecation",
          "-unchecked",
          "-feature",
          "-language:higherKinds",
          "-Xfatal-warnings",
          "-Xlint"
        ) ++ compilerWarnings,
        javaOptions ++= Seq("-Dfile.encoding=UTF-8", "-Dscalac.patmat.analysisBudget=off"),
        javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint:unchecked", "-Xlint:deprecation")
      )

  lazy val root = Project(
    "actor-server",
    file("."),
    settings =
      defaultSettings ++
        AkkaKernelPlugin.distSettings ++
        Revolver.settings ++
        Seq(
          libraryDependencies ++= Dependencies.root,
          distJvmOptions in Dist := "-server -Xms256M -Xmx1024M",
          distBootClass in Dist := "im.actor.server.Main",
          outputDirectory in Dist := file("target/dist"),
          Revolver.reStartArgs := Seq("im.actor.server.Main"),
          mainClass in Revolver.reStart := Some("im.actor.server.Main"),
          mainClass in Compile := Some("im.actor.server.Main"),
          autoCompilerPlugins := true,
          scalacOptions in(Compile, doc) := Seq(
            "-groups",
            "-implicits",
            "-diagrams"
          ) ++ compilerWarnings
        )
  ).settings(net.virtualvoid.sbt.graph.Plugin.graphSettings: _*)
    .dependsOn(actorFrontend)
    .aggregate(actorApi, actorFrontend, actorModels, actorPersist, actorPresences, actorSession, actorRpcApi, actorTests)

  lazy val actorApi = Project(
    id = "actor-api",
    base = file("actor-api"),
    settings =
      defaultSettings ++
        SbtActorApi.settings ++
        Seq(
          libraryDependencies ++= Dependencies.api
        )
  ).dependsOn(actorPersist, actorCodecs)

  lazy val actorSession = Project(
    id = "actor-session",
    base = file("actor-session"),
    settings = defaultSettings ++ Seq(
      libraryDependencies ++= Dependencies.session
    )
  ).dependsOn(actorPersist, actorCodecs, actorApi, actorRpcApi, actorPush)

  lazy val actorSessionMessages = Project(
    id = "actor-session-messages",
    base = file("actor-session-messages"),
    settings = defaultSettings ++ Seq(libraryDependencies ++= Dependencies.sessionMessages)
  ).dependsOn(actorApi)

  lazy val actorPush = Project(
    id = "actor-push",
    base = file("actor-push"),
    settings = defaultSettings ++ Seq(
      libraryDependencies ++= Dependencies.push
    )
  ).dependsOn(actorApi, actorCodecs, actorPersist, actorPresences, actorSessionMessages)

  lazy val actorPresences = Project(
    id = "actor-presences",
    base = file("actor-presences"),
    settings = defaultSettings ++ Seq(libraryDependencies ++= Dependencies.presences)
  ).dependsOn(actorPersist)

  lazy val actorRpcApi = Project(
    id = "actor-rpc-api",
    base = file("actor-rpc-api"),
    settings = defaultSettings ++ Seq(
      libraryDependencies ++= Dependencies.rpcApi
    )
  ).dependsOn(actorApi, actorCodecs, actorPersist, actorPresences, actorPush, actorSessionMessages, actorSms, actorSocial)

  lazy val actorSms = Project(
    id = "actor-sms",
    base = file("actor-sms"),
    settings = defaultSettings ++ Seq(libraryDependencies ++= Dependencies.sms)
  )

  lazy val actorSocial = Project(
    id = "actor-social",
    base = file("actor-social"),
    settings = defaultSettings ++ Seq(
      libraryDependencies ++= Dependencies.social
    )
  ).dependsOn(actorPersist)

  lazy val actorFrontend = Project(
    id = "actor-frontend",
    base = file("actor-frontend"),
    settings = defaultSettings ++ Seq(
      libraryDependencies ++= Dependencies.frontend
    )
  ).dependsOn(actorApi, actorSessionMessages, actorSession)

  lazy val actorCodecs = Project(
    id = "actor-codecs",
    base = file("actor-codecs"),
    settings = defaultSettings ++ Seq(
      libraryDependencies ++= Dependencies.codecs
    )
  ).dependsOn(actorModels)

  lazy val actorModels = Project(
    id = "actor-models",
    base = file("actor-models"),
    settings = defaultSettings ++ Seq(
      libraryDependencies ++= Dependencies.models
    )
  )

  lazy val actorPersist = Project(
    id = "actor-persist",
    base = file("actor-persist"),
    settings = defaultSettings ++ Seq(
      libraryDependencies ++= Dependencies.persist
    )
  ).dependsOn(actorModels)

  lazy val actorTests = Project(
    id = "actor-tests",
    base = file("actor-tests"),
    settings = defaultSettings ++ Testing.settings ++ Seq(
      libraryDependencies ++= Dependencies.tests
    ))
    .configs(Configs.all: _*)
    .dependsOn(actorApi, actorCodecs, actorFrontend, actorPersist, actorPush, actorRpcApi, actorSession)
}

{'fraction_non_alphanumeric': 0.12666666666666668, 'fraction_numerical': 0.003931623931623932, 'mean_word_length': 2.9370794078061913, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '7015765', 'n_tokens_mistral': 3558, 'n_tokens_neox': 3461, 'n_words': 720}