<commit_before>import Http4sDependencies._
import Http4sKeys._
import UnidocKeys._
import SiteKeys._
import scala.util.{Properties, Success, Try}
import GhPagesKeys._
import com.typesafe.sbt.git.GitRunner

lazy val core = project

lazy val blaze = project.dependsOn(core)

lazy val servlet = project.dependsOn(core)

lazy val jetty = project.dependsOn(servlet)

lazy val tomcat = project.dependsOn(servlet)

lazy val dsl = project.dependsOn(core)

lazy val examples = project.dependsOn(blaze, jetty, tomcat, dsl)

/* common dependencies */
libraryDependencies in ThisBuild ++= Seq(
  junit % "test",
  scalameter % "test",
  scalatest % "test",
  specs2 % "test"
)

/* basic project info */
name := "http4s"

organization in ThisBuild := "org.http4s"

version in ThisBuild := "0.2.0-SNAPSHOT"

apiVersion in ThisBuild <<= version map { v => 
  val VersionExtractor = """(\d+)\.(\d+)\..*""".r
  v match {
    case VersionExtractor(major, minor) => (major.toInt, minor.toInt)
  }
}

description := "Common HTTP framework for Scala"

homepage in ThisBuild := Some(url("https://github.com/http4s/http4s"))

startYear in ThisBuild := Some(2013)

licenses in ThisBuild := Seq(
  ("Apache License, Version 2.0", url("http://www.apache.org/licenses/LICENSE-2.0.txt"))
)

scmInfo in ThisBuild := Some(
  ScmInfo(
    url("https://github.com/http4s/http4s"),
    "scm:git:https://github.com/http4s/http4s.git",
    Some("scm:git:<EMAIL>:http4s/http4s.git")
  )
)

/* scala versions and options */
scalaVersion in ThisBuild := "2.10.4"

crossScalaVersions in ThisBuild := Seq("2.10.4", "2.11.1")

offline in ThisBuild := false

scalacOptions in ThisBuild ++= Seq(
  "-feature",
  "-deprecation",
  "-unchecked",
  "-language:implicitConversions",
  "-language:higherKinds"
)

javacOptions in ThisBuild ++= Seq("-Xlint:unchecked", "-Xlint:deprecation")

resolvers in ThisBuild ++= Seq(
  Resolver.typesafeRepo("releases"),
  Resolver.sonatypeRepo("snapshots"),
  "spray repo" at "http://repo.spray.io",
  "Scalaz Bintray Repo" at "http://dl.bintray.com/scalaz/releases"
)

testOptions in ThisBuild += Tests.Argument(TestFrameworks.Specs2, "console", "junitxml")

/* sbt behavior */
logLevel in (ThisBuild, compile) := Level.Warn

traceLevel in ThisBuild := 5

unidocSettings

unidocProjectFilter in (ScalaUnidoc, unidoc) := inAnyProject -- inProjects(examples)

// autoAPIMappings is not respected by Unidoc
apiMappings in ThisBuild += (scalaInstance.value.libraryJar -> url(s"http://www.scala-lang.org/api/${scalaVersion.value}/"))

/* publishing */
publishMavenStyle in ThisBuild := true

publishTo in ThisBuild <<= version { (v: String) =>
  val nexus = "https://oss.sonatype.org/"
  if (v.trim.endsWith("-SNAPSHOT")) Some("snapshots" at nexus + "content/repositories/snapshots")
  else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}

Seq("SONATYPE_USER", "SONATYPE_PASS") map Properties.envOrNone match {
  case Seq(Some(user), Some(pass)) =>
    credentials in ThisBuild += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", user, pass)
  case _ =>
    credentials in ThisBuild ~= identity
}

publishArtifact in (ThisBuild, Test) := false

// Don't publish root pom.  It's not needed.
packagedArtifacts in file(".") := Map.empty

pomIncludeRepository in ThisBuild := { _ => false }

pomExtra in ThisBuild := (
  <developers>
    <developer>
      <id>rossabaker</id>
      <name><NAME></name>
      <email><EMAIL></email>
    </developer>
    <developer>
      <id>casualjim</id>
      <name><NAME></name>
      <email><EMAIL></email>
      <url>http://flanders.co.nz</url>
    </developer>
    <developer>
      <id>brycelane</id>
      <name><NAME></name>
      <email><EMAIL></email>
      <!-- <url></url> -->
    </developer>
  </developers>
)

site.settings

siteMappings <++= (mappings in (ScalaUnidoc, packageDoc), apiVersion) map { 
  case (m, (major, minor)) => 
    for ((f, d) <- m) yield (f, s"api/$major.$minor/$d")
}

includeFilter in SiteKeys.makeSite := "*" -- "*~"

ghpages.settings

ghpagesNoJekyll := false

// Don't blow away old API.
{<commit_msg>Add @before to the developers list.<commit_after>import Http4sDependencies._
import Http4sKeys._
import UnidocKeys._
import SiteKeys._
import scala.util.{Properties, Success, Try}
import GhPagesKeys._
import com.typesafe.sbt.git.GitRunner

lazy val core = project

lazy val blaze = project.dependsOn(core)

lazy val servlet = project.dependsOn(core)

lazy val jetty = project.dependsOn(servlet)

lazy val tomcat = project.dependsOn(servlet)

lazy val dsl = project.dependsOn(core)

lazy val examples = project.dependsOn(blaze, jetty, tomcat, dsl)

/* common dependencies */
libraryDependencies in ThisBuild ++= Seq(
  junit % "test",
  scalameter % "test",
  scalatest % "test",
  specs2 % "test"
)

/* basic project info */
name := "http4s"

organization in ThisBuild := "org.http4s"

version in ThisBuild := "0.2.0-SNAPSHOT"

apiVersion in ThisBuild <<= version map { v => 
  val VersionExtractor = """(\d+)\.(\d+)\..*""".r
  v match {
    case VersionExtractor(major, minor) => (major.toInt, minor.toInt)
  }
}

description := "Common HTTP framework for Scala"

homepage in ThisBuild := Some(url("https://github.com/http4s/http4s"))

startYear in ThisBuild := Some(2013)

licenses in ThisBuild := Seq(
  ("Apache License, Version 2.0", url("http://www.apache.org/licenses/LICENSE-2.0.txt"))
)

scmInfo in ThisBuild := Some(
  ScmInfo(
    url("https://github.com/http4s/http4s"),
    "scm:git:https://github.com/http4s/http4s.git",
    Some("scm:git:git@github.com:http4s/http4s.git")
  )
)

/* scala versions and options */
scalaVersion in ThisBuild := "2.10.4"

crossScalaVersions in ThisBuild := Seq("2.10.4", "2.11.1")

offline in ThisBuild := false

scalacOptions in ThisBuild ++= Seq(
  "-feature",
  "-deprecation",
  "-unchecked",
  "-language:implicitConversions",
  "-language:higherKinds"
)

javacOptions in ThisBuild ++= Seq("-Xlint:unchecked", "-Xlint:deprecation")

resolvers in ThisBuild ++= Seq(
  Resolver.typesafeRepo("releases"),
  Resolver.sonatypeRepo("snapshots"),
  "spray repo" at "http://repo.spray.io",
  "Scalaz Bintray Repo" at "http://dl.bintray.com/scalaz/releases"
)

testOptions in ThisBuild += Tests.Argument(TestFrameworks.Specs2, "console", "junitxml")

/* sbt behavior */
logLevel in (ThisBuild, compile) := Level.Warn

traceLevel in ThisBuild := 5

unidocSettings

unidocProjectFilter in (ScalaUnidoc, unidoc) := inAnyProject -- inProjects(examples)

// autoAPIMappings is not respected by Unidoc
apiMappings in ThisBuild += (scalaInstance.value.libraryJar -> url(s"http://www.scala-lang.org/api/${scalaVersion.value}/"))

/* publishing */
publishMavenStyle in ThisBuild := true

publishTo in ThisBuild <<= version { (v: String) =>
  val nexus = "https://oss.sonatype.org/"
  if (v.trim.endsWith("-SNAPSHOT")) Some("snapshots" at nexus + "content/repositories/snapshots")
  else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}

Seq("SONATYPE_USER", "SONATYPE_PASS") map Properties.envOrNone match {
  case Seq(Some(user), Some(pass)) =>
    credentials in ThisBuild += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", user, pass)
  case _ =>
    credentials in ThisBuild ~= identity
}

publishArtifact in (ThisBuild, Test) := false

// Don't publish root pom.  It's not needed.
packagedArtifacts in file(".") := Map.empty

pomIncludeRepository in ThisBuild := { _ => false }

pomExtra in ThisBuild := (
  <developers>
    <developer>
      <id>rossabaker</id>
      <name><NAME></name>
      <email><EMAIL></email>
    </developer>
    <developer>
      <id>casualjim</id>
      <name><NAME></name>
      <email><EMAIL></email>
      <url>http://flanders.co.nz</url>
    </developer>
    <developer>
      <id>brycelane</id>
      <name><NAME></name>
      <email><EMAIL></email>
    </developer>
    <developer>
      <id>before</id>
      <name><NAME></name>
    </developer>
  </developers>
)

site.settings

siteMappings <++= (mappings in (ScalaUnidoc, packageDoc), apiVersion) map { 
  case (m, (major, minor)) => 
    for ((f, d) <- m) yield (f, s"api/$major.$minor/$d")
}

includeFilter in SiteKeys.makeSite := "*" -- "*~"

ghpages.settings

ghpagesNoJekyll := false

// Don't blow away old API.
{
{'fraction_non_alphanumeric': 0.15968617984308991, 'fraction_numerical': 0.009414604707302354, 'mean_word_length': 4.061698228466708, 'pattern_counts': {'":': 0, '<': 94, '<?xml version=': 0, '>': 98, 'https://': 8, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, 'pii_count': 1, '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': '159841', 'n_tokens_mistral': 3010, 'n_tokens_neox': 2913, 'n_words': 652}