<commit_before>package summingbird

import sbt._
import Keys._
import sbtassembly.Plugin._
import AssemblyKeys._
import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
import com.typesafe.tools.mima.plugin.MimaKeys.previousArtifact
import scalariform.formatter.preferences._
import com.typesafe.sbt.SbtScalariform._

object SummingbirdBuild extends Build {
  def withCross(dep: ModuleID) =
    dep cross CrossVersion.binaryMapped {
      case "2.9.3" => "2.9.2" // TODO: hack because twitter hasn't built things against 2.9.3
      case version if version startsWith "2.10" => "2.10" // TODO: hack because sbt is broken
      case x => x
    }

  def specs2Import(scalaVersion: String) = scalaVersion match {
      case version if version startsWith "2.9" => "org.specs2" %% "specs2" % "1.12.4.1" % "test"
      case version if version startsWith "2.10" => "org.specs2" %% "specs2" % "1.13" % "test"
  }

  def isScala210x(scalaVersion: String) = scalaVersion match {
      case version if version startsWith "2.9" => false
      case version if version startsWith "2.10" => true
  }

  val extraSettings = Project.defaultSettings ++ mimaDefaultSettings ++ scalariformSettings

  val sharedSettings = extraSettings ++ Seq(
    organization := "com.twitter",
    version := "0.5.2-t1412029703000-ac6ba35a5bc56ad74f4ad016b77e4818633cceb5",
    scalaVersion := "2.9.3",
    crossScalaVersions := Seq("2.9.3", "2.10.4"),
    // To support hadoop 1.x
    javacOptions ++= Seq("-source", "1.6", "-target", "1.6"),

    javacOptions in doc ~= { (options: Seq[String]) =>
      val targetPos = options.indexOf("-target")
      if(targetPos > -1) {
        options.take(targetPos) ++ options.drop(targetPos + 2)
      } else options
    },

    libraryDependencies ++= Seq(
      "junit" % "junit" % "4.11" % "test",
      "org.slf4j" % "slf4j-api" % slf4jVersion,
      "org.scalacheck" %% "scalacheck" % "1.10.0" % "test",
      // These satisify's scaldings log4j needs when in test mode
      "log4j" % "log4j" % "1.2.16" % "test",
      "org.slf4j" % "slf4j-log4j12" % slf4jVersion % "test"
    ),

    libraryDependencies <+= scalaVersion(specs2Import(_)),

    libraryDependencies += "com.novocode" % "junit-interface" % "0.10" % "test",

    resolvers ++= Seq(<commit_msg>undo test version bump in Build.scala<commit_after>package summingbird

import sbt._
import Keys._
import sbtassembly.Plugin._
import AssemblyKeys._
import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
import com.typesafe.tools.mima.plugin.MimaKeys.previousArtifact
import scalariform.formatter.preferences._
import com.typesafe.sbt.SbtScalariform._

object SummingbirdBuild extends Build {
  def withCross(dep: ModuleID) =
    dep cross CrossVersion.binaryMapped {
      case "2.9.3" => "2.9.2" // TODO: hack because twitter hasn't built things against 2.9.3
      case version if version startsWith "2.10" => "2.10" // TODO: hack because sbt is broken
      case x => x
    }

  def specs2Import(scalaVersion: String) = scalaVersion match {
      case version if version startsWith "2.9" => "org.specs2" %% "specs2" % "1.12.4.1" % "test"
      case version if version startsWith "2.10" => "org.specs2" %% "specs2" % "1.13" % "test"
  }

  def isScala210x(scalaVersion: String) = scalaVersion match {
      case version if version startsWith "2.9" => false
      case version if version startsWith "2.10" => true
  }

  val extraSettings = Project.defaultSettings ++ mimaDefaultSettings ++ scalariformSettings

  val sharedSettings = extraSettings ++ Seq(
    organization := "com.twitter",
    version := "0.5.1",
    scalaVersion := "2.9.3",
    crossScalaVersions := Seq("2.9.3", "2.10.4"),
    // To support hadoop 1.x
    javacOptions ++= Seq("-source", "1.6", "-target", "1.6"),

    javacOptions in doc ~= { (options: Seq[String]) =>
      val targetPos = options.indexOf("-target")
      if(targetPos > -1) {
        options.take(targetPos) ++ options.drop(targetPos + 2)
      } else options
    },

    libraryDependencies ++= Seq(
      "junit" % "junit" % "4.11" % "test",
      "org.slf4j" % "slf4j-api" % slf4jVersion,
      "org.scalacheck" %% "scalacheck" % "1.10.0" % "test",
      // These satisify's scaldings log4j needs when in test mode
      "log4j" % "log4j" % "1.2.16" % "test",
      "org.slf4j" % "slf4j-log4j12" % slf4jVersion % "test"
    ),

    libraryDependencies <+= scalaVersion(specs2Import(_)),

    libraryDependencies += "com.novocode" % "junit-interface" % "0.10" % "test",

    resolvers ++= Seq(
{'fraction_non_alphanumeric': 0.14565888056412515, 'fraction_numerical': 0.046496253856324374, 'mean_word_length': 3.3105413105413106, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4850515', 'n_tokens_mistral': 1677, 'n_tokens_neox': 1568, 'n_words': 366}