<commit_before>package im.actor

import sbt.Keys._
import sbt._
import spray.revolver.RevolverPlugin._
import com.trueaccord.scalapb.{ScalaPbPlugin => PB}

object Build extends sbt.Build with Versioning with Releasing with Publishing {
  val ScalaVersion = "2.11.7"
  //val Version = getVersion

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

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

  lazy val defaultScalacOptions = Seq(
    "-target:jvm-1.8",
    "-Ybackend:GenBCode",
    "-Ydelambdafy:method",
    "-Yopt:l:classpath",
    //"-Ymacro-debug-lite",
    "-encoding", "UTF-8",
    "-deprecation",
    "-unchecked",
    "-feature",
    "-language:higherKinds",
    "-Xfatal-warnings",
    "-Xlint",
    "-Xfuture"
  ) ++ compilerWarnings

  lazy val defaultSettings =
    buildSettings ++ Formatting.formatSettings ++
      PB.protobufSettings ++ Seq(
      //PB.javaConversions in PB.protobufConfig := true,
      libraryDependencies += "com.trueaccord.scalapb" %% "scalapb-runtime" % "0.5.9" % PB.protobufConfig,
      PB.includePaths in PB.protobufConfig ++= Seq(
        file("actor-models/src/main/protobuf"),
        file("actor-core/src/main/protobuf")
      ),
      PB.runProtoc in PB.protobufConfig := (args =>
        com.github.os72.protocjar.Protoc.runProtoc("-v300" +: args.toArray))
    ) ++
      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 ++= defaultScalacOptions,
        javaOptions ++= Seq("-Dfile.encoding=UTF-8"),
        javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint:unchecked", "-Xlint:deprecation"),
        fork in Test := false,
        updateOptions := updateOptions.value.withCachedResolution(true)
      )


  lazy val root = Project(
    "actor",
    file("."),
    settings =
      defaultSettings ++ releaseSettings ++
        Revolver.settings ++
        Seq(
          libraryDependencies ++= Dependencies.root,
          //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"
          )
        )
  ).settings(net.virtualvoid.sbt.graph.Plugin.graphSettings: _*)
    .dependsOn(actorServerSdk, actorCli)
    .aggregate(
      //      actorDashboard,
      actorBots,
      actorRuntime,
      actorTests
    )
    .settings(
    aggregate in Revolver.reStart := false
  )

  lazy val actorActivation = Project(
    id = "actor-activation",
    base = file("actor-activation"),
    settings = defaultSettings ++ releaseSettings ++
      Seq(
        libraryDependencies ++= Dependencies.activation,
        scalacOptions in Compile := (scalacOptions in Compile).value.filterNot(_ == "-Ywarn-unused-import")
      )
  ).dependsOn(actorEmail, actorSms, actorPersist)

  lazy val actorBots = Project(
    id = "actor-bots",
    base = file("actor-bots"),
    settings = defaultSettings ++ releaseSettings ++
      Seq(libraryDependencies ++= Dependencies.bots)
  )
    .dependsOn(actorCore, actorTestkit % "test")

  lazy val actorBotsShared = Project(
    id = "actor-bots-shared",
    base = file("actor-bots-shared"),
    settings = defaultSettings ++ publishSettings ++ releaseSettings ++ Seq(
      libraryDependencies <+= (scalaVersion)("org.scala-lang" % "scala-reflect" % _),
      libraryDependencies ++= Dependencies.botShared,
      addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0-M5" cross CrossVersion.full)
    )
  )

  lazy val actorBotkit = Project(
    id = "actor-botkit",
    base = file("actor-botkit"),
    settings = defaultSettings ++ publishSettings ++ releaseSettings ++ Revolver.settings ++ Seq(
      libraryDependencies ++= Dependencies.botkit,
      addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0-M5" cross CrossVersion.full)
    )
  )
    .dependsOn(actorBotsShared)
    .aggregate(actorBotsShared)

  lazy val actorCli = Project(
    id = "actor-cli",
    base = file("actor-cli"),
    settings = defaultSettings ++ Revolver.settings ++ releaseSettings ++ Seq(
      libraryDependencies ++= Dependencies.cli,
      mainClass in Revolver.reStart := Some("im.actor.server.cli.ActorCliApp"),<commit_msg>chore(server): use separate versioning for botkit and bot shared<commit_after>package im.actor

import sbt.Keys._
import sbt._
import spray.revolver.RevolverPlugin._
import com.trueaccord.scalapb.{ScalaPbPlugin => PB}

object Build extends sbt.Build with Versioning with Releasing with Publishing {
  val ScalaVersion = "2.11.7"
  val BotKitVersion = getVersion

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

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

  lazy val defaultScalacOptions = Seq(
    "-target:jvm-1.8",
    "-Ybackend:GenBCode",
    "-Ydelambdafy:method",
    "-Yopt:l:classpath",
    //"-Ymacro-debug-lite",
    "-encoding", "UTF-8",
    "-deprecation",
    "-unchecked",
    "-feature",
    "-language:higherKinds",
    "-Xfatal-warnings",
    "-Xlint",
    "-Xfuture"
  ) ++ compilerWarnings

  lazy val defaultSettings =
    buildSettings ++ Formatting.formatSettings ++
      PB.protobufSettings ++ Seq(
      //PB.javaConversions in PB.protobufConfig := true,
      libraryDependencies += "com.trueaccord.scalapb" %% "scalapb-runtime" % "0.5.9" % PB.protobufConfig,
      PB.includePaths in PB.protobufConfig ++= Seq(
        file("actor-models/src/main/protobuf"),
        file("actor-core/src/main/protobuf")
      ),
      PB.runProtoc in PB.protobufConfig := (args =>
        com.github.os72.protocjar.Protoc.runProtoc("-v300" +: args.toArray))
    ) ++
      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 ++= defaultScalacOptions,
        javaOptions ++= Seq("-Dfile.encoding=UTF-8"),
        javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint:unchecked", "-Xlint:deprecation"),
        fork in Test := false,
        updateOptions := updateOptions.value.withCachedResolution(true)
      )


  lazy val root = Project(
    "actor",
    file("."),
    settings =
      defaultSettings ++ releaseSettings ++
        Revolver.settings ++
        Seq(
          libraryDependencies ++= Dependencies.root,
          //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"
          )
        )
  ).settings(net.virtualvoid.sbt.graph.Plugin.graphSettings: _*)
    .dependsOn(actorServerSdk, actorCli)
    .aggregate(
      //      actorDashboard,
      actorBots,
      actorRuntime,
      actorTests
    )
    .settings(
    aggregate in Revolver.reStart := false
  )

  lazy val actorActivation = Project(
    id = "actor-activation",
    base = file("actor-activation"),
    settings = defaultSettings ++ releaseSettings ++
      Seq(
        libraryDependencies ++= Dependencies.activation,
        scalacOptions in Compile := (scalacOptions in Compile).value.filterNot(_ == "-Ywarn-unused-import")
      )
  ).dependsOn(actorEmail, actorSms, actorPersist)

  lazy val actorBots = Project(
    id = "actor-bots",
    base = file("actor-bots"),
    settings = defaultSettings ++ releaseSettings ++
      Seq(libraryDependencies ++= Dependencies.bots)
  )
    .dependsOn(actorCore, actorTestkit % "test")

  lazy val actorBotsShared = Project(
    id = "actor-bots-shared",
    base = file("actor-bots-shared"),
    settings = defaultSettings ++ publishSettings ++ releaseSettings ++ Seq(
      version := BotKitVersion,
      libraryDependencies <+= (scalaVersion)("org.scala-lang" % "scala-reflect" % _),
      libraryDependencies ++= Dependencies.botShared,
      addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0-M5" cross CrossVersion.full)
    )
  )

  lazy val actorBotkit = Project(
    id = "actor-botkit",
    base = file("actor-botkit"),
    settings = defaultSettings ++ publishSettings ++ releaseSettings ++ Revolver.settings ++ Seq(
      version := BotKitVersion,
      libraryDependencies ++= Dependencies.botkit,
      addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0-M5" cross CrossVersion.full)
    )
  )
    .dependsOn(actorBotsShared)
    .aggregate(actorBotsShared)

  lazy val actorCli = Project(
    id = "actor-cli",
    base = file("actor-cli"),
    settings = defaultSettings ++ Revolver.settings ++ releaseSettings ++ Seq(
      libraryDependencies ++= Dependencies.cli,
      mainClass in Revolver.reStart := Some("im.actor.server.cli.ActorCliApp"),
{'fraction_non_alphanumeric': 0.13989530945294057, 'fraction_numerical': 0.006363543056553423, 'mean_word_length': 2.798830409356725, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '3929413', 'n_tokens_mistral': 3096, 'n_tokens_neox': 2981, 'n_words': 569}