<commit_before>import sbt._
import Keys._

object PlayBuild extends Build {
  
    import Resolvers._
    import Dependencies._
    import BuildSettings._
    import Generators._
    import LocalSBT._
    import Tasks._

    lazy val TemplatesProject = Project(
        "Templates",
        file("src/templates"),
        settings = buildSettings ++ Seq(
            libraryDependencies := templatesDependencies,
            publishTo := Some(playRepository),
            publishArtifact in (Compile, packageDoc) := false,
            publishArtifact in (Compile, packageSrc) := false,
            unmanagedJars in Compile += compilerJar,
            scalacOptions ++= Seq("-encoding", "UTF-8", "-Xlint","-deprecation", "-unchecked"),
            resolvers += typesafe
        )
    ).settings(com.typesafe.sbtscalariform.ScalariformPlugin.defaultScalariformSettings: _*)

    lazy val AnormProject = Project(
        "Anorm",
        file("src/anorm"),
        settings = buildSettings ++ Seq(
            libraryDependencies := anormDependencies,
            publishTo := Some(playRepository),
            scalacOptions ++= Seq("-encoding", "UTF-8", "-Xlint","-deprecation", "-unchecked"),
            publishArtifact in (Compile, packageDoc) := false,
            publishArtifact in (Compile, packageSrc) := true
        )
    ).settings(com.typesafe.sbtscalariform.ScalariformPlugin.defaultScalariformSettings: _*)

    lazy val PlayProject = Project(
        "Play",
        file("src/play"),
        settings = buildSettings ++ Seq(
            libraryDependencies := runtime,
            sourceGenerators in Compile <+= sourceManaged in Compile map PlayVersion,
            publishTo := Some(playRepository),
            scalacOptions ++= Seq("-encoding", "UTF-8", "-Xlint","-deprecation", "-unchecked"),
            javacOptions ++= Seq("-encoding", "UTF-8"),
            publishArtifact in (Compile, packageDoc) := false,
            publishArtifact in (Compile, packageSrc) := true,
            resolvers += typesafe,
            sourceGenerators in Compile <+= (dependencyClasspath in TemplatesProject in Runtime, packageBin in TemplatesProject in Compile, scalaSource in Compile, sourceManaged in Compile, streams) map ScalaTemplates,
            compile in (Compile) <<= PostCompile
        )
    ).settings(com.typesafe.sbtscalariform.ScalariformPlugin.defaultScalariformSettings: _*).dependsOn(TemplatesProject, AnormProject)
    
    lazy val PlayTestProject = Project(
      "Play-Test",
      file("src/play-test"),
      settings = buildSettings ++ Seq(
        libraryDependencies := testDependencies,
        publishTo := Some(playRepository),
        scalacOptions ++= Seq("-encoding", "UTF-8", "-Xlint","-deprecation", "-unchecked"),
        javacOptions  ++= Seq("-encoding", "UTF-8","-Xlint:unchecked", "-Xlint:deprecation"),
        publishArtifact in (Compile, packageDoc) := false,
        publishArtifact in (Compile, packageSrc) := true,
        resolvers += typesafe
      )
    ).settings(com.typesafe.sbtscalariform.ScalariformPlugin.defaultScalariformSettings: _*).dependsOn(PlayProject)

    lazy val SbtPluginProject = Project(
      "SBT-Plugin",
      file("src/sbt-plugin"),
      settings = buildSettings ++ Seq(
        sbtPlugin := true,
        publishMavenStyle := false,
        libraryDependencies := sbtDependencies,
        addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-core" % "2.0.0"),
        addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.1.0-M1-TYPESAFE"),
        unmanagedJars in Compile ++= sbtJars,
        publishTo := Some(playIvyRepository),
        scalacOptions ++= Seq("-encoding", "UTF-8", "-Xlint","-deprecation", "-unchecked"),
        publishArtifact in (Compile, packageDoc) := false,
        publishArtifact in (Compile, packageSrc) := false,
        resolvers += typesafe
      )
    ).settings(com.typesafe.sbtscalariform.ScalariformPlugin.defaultScalariformSettings: _*).dependsOn(PlayProject, TemplatesProject, ConsoleProject)

    lazy val ConsoleProject = Project(
      "Console",
      file("src/console"),
      settings = buildSettings ++ Seq(
        libraryDependencies := consoleDependencies,
        sourceGenerators in Compile <+= sourceManaged in Compile map PlayVersion,
        unmanagedJars in Compile ++=  sbtJars,
        publishTo := Some(playRepository),
        scalacOptions ++= Seq("-encoding", "UTF-8", "-Xlint","-deprecation", "-unchecked"),
        publishArtifact in (Compile, packageDoc) := false,
        publishArtifact in (Compile, packageSrc) := true,
        resolvers += typesafe
      )
    ).settings(com.typesafe.sbtscalariform.ScalariformPlugin.defaultScalariformSettings: _*)

    val Root = Project(
        "Root",
        file("."),
        settings = buildSettings ++ Seq(
            libraryDependencies := runtime,
            cleanFiles ++= Seq(file("../dist"), file("../repository/local")),
            resetRepositoryTask,
            buildRepositoryTask,
            distTask,
            generateAPIDocsTask,
            publish <<= (publish in PlayProject, publish in TemplatesProject, publish in AnormProject, publish in SbtPluginProject, publish in ConsoleProject, publish in PlayTestProject) map { (_,_,_,_,_,_) => },
            publishLocal <<= (publishLocal in PlayProject, publishLocal in TemplatesProject, publishLocal in AnormProject, publishLocal in SbtPluginProject, publishLocal in ConsoleProject, publishLocal in PlayTestProject) map { (_,_,_,_,_,_) => }
        )
    ).settings(com.typesafe.sbtscalariform.ScalariformPlugin.defaultScalariformSettings: _*)
     .dependsOn(PlayProject).aggregate(AnormProject, TemplatesProject, PlayProject, SbtPluginProject, ConsoleProject, PlayTestProject)

    object BuildSettings {

        val buildOrganization = "play"
        val buildVersion      = Option(System.getProperty("play.version")).filterNot(_.isEmpty).getOrElse("2.0-unknown")
        val buildScalaVersion = "2.9.1"
        val buildSbtVersion   = "0.11.2"

        val buildSettings = Defaults.defaultSettings ++ Seq (
            organization   := buildOrganization,
            version        := buildVersion,
            scalaVersion   := buildScalaVersion,
            logManager <<= extraLoggers(PlayLogManager.default),
            ivyLoggingLevel := UpdateLogging.DownloadOnly
        )

    }

    object LocalSBT {

        import BuildSettings._

        def isJar(f:java.io.File) = f.getName.endsWith(".jar")

        val sbtJars:Seq[java.io.File] = {
            file("sbt/boot/scala-" + buildScalaVersion + "/org.scala-tools.sbt/sbt/" + buildSbtVersion).listFiles.filter(isJar) ++
            file("sbt/boot/scala-" + buildScalaVersion + "/org.scala-tools.sbt/sbt/" + buildSbtVersion + "/xsbti").listFiles.filter(isJar) ++
            Seq(file("sbt/boot/scala-" + buildScalaVersion + "/lib/jline.jar"))
        }
        
        val compilerJar:java.io.File = {
          file("sbt/boot/scala-" + buildScalaVersion + "/lib/scala-compiler.jar")
        }

    }

    object Resolvers {
        import BuildSettings._
        
        val playLocalRepository = Resolver.file("Play Local Repository", file("../repository/local"))(Resolver.ivyStylePatterns) 
        
        val typesafe = "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
        
        val typesafeReleases = "Typesafe Releases Repository" at "http://repo.typesafe.com/typesafe/maven-releases/"
        val typesafeSnapshot = "Typesafe Snapshots Repository" at "http://repo.typesafe.com/typesafe/maven-snapshots/"
        val playRepository = if (buildVersion.endsWith("SNAPSHOT")) typesafeSnapshot else typesafeReleases
        
        val typesafeIvyReleases = Resolver.url("Typesafe Ivy Releases Repository", url("http://repo.typesafe.com/typesafe/ivy-releases/"))(Resolver.ivyStylePatterns) 
        val typesafeIvySnapshot = Resolver.url("Typesafe Ivy Snapshots Repository", url("http://repo.typesafe.com/typesafe/ivy-snapshots/"))(Resolver.ivyStylePatterns) 
        val playIvyRepository = if (buildVersion.endsWith("SNAPSHOT")) typesafeIvySnapshot else typesafeIvyReleases
    }

    object Dependencies {

        val runtime = Seq(
            "io.netty"                          %    "netty"                    %   "3.3.0.Final",
            "org.slf4j"                         %    "slf4j-api"                %   "1.6.4",
            "org.slf4j"                         %    "jul-to-slf4j"             %   "1.6.4",
            "org.slf4j"                         %    "jcl-over-slf4j"           %   "1.6.4",
            "ch.qos.logback"                    %    "logback-core"             %   "1.0.0",
            "ch.qos.logback"                    %    "logback-classic"          %   "1.0.0",
            "com.github.scala-incubator.io"     %%   "scala-io-file"            %   "0.2.0",
            "com.typesafe.akka"                 %    "akka-actor"               %   "2.0",
            "com.typesafe.akka"                 %    "akka-slf4j"               %   "2.0",
            "com.google.guava"                  %    "guava"                    %   "10.0.1",
            
            ("org.avaje"                        %    "ebean"                    %   "2.7.3" notTransitive())
              .exclude("javax.persistence", "persistence-api")
            ,<commit_msg>upgrade akka to 2.0.1<commit_after>import sbt._
import Keys._

object PlayBuild extends Build {
  
    import Resolvers._
    import Dependencies._
    import BuildSettings._
    import Generators._
    import LocalSBT._
    import Tasks._

    lazy val TemplatesProject = Project(
        "Templates",
        file("src/templates"),
        settings = buildSettings ++ Seq(
            libraryDependencies := templatesDependencies,
            publishTo := Some(playRepository),
            publishArtifact in (Compile, packageDoc) := false,
            publishArtifact in (Compile, packageSrc) := false,
            unmanagedJars in Compile += compilerJar,
            scalacOptions ++= Seq("-encoding", "UTF-8", "-Xlint","-deprecation", "-unchecked"),
            resolvers += typesafe
        )
    ).settings(com.typesafe.sbtscalariform.ScalariformPlugin.defaultScalariformSettings: _*)

    lazy val AnormProject = Project(
        "Anorm",
        file("src/anorm"),
        settings = buildSettings ++ Seq(
            libraryDependencies := anormDependencies,
            publishTo := Some(playRepository),
            scalacOptions ++= Seq("-encoding", "UTF-8", "-Xlint","-deprecation", "-unchecked"),
            publishArtifact in (Compile, packageDoc) := false,
            publishArtifact in (Compile, packageSrc) := true
        )
    ).settings(com.typesafe.sbtscalariform.ScalariformPlugin.defaultScalariformSettings: _*)

    lazy val PlayProject = Project(
        "Play",
        file("src/play"),
        settings = buildSettings ++ Seq(
            libraryDependencies := runtime,
            sourceGenerators in Compile <+= sourceManaged in Compile map PlayVersion,
            publishTo := Some(playRepository),
            scalacOptions ++= Seq("-encoding", "UTF-8", "-Xlint","-deprecation", "-unchecked"),
            javacOptions ++= Seq("-encoding", "UTF-8"),
            publishArtifact in (Compile, packageDoc) := false,
            publishArtifact in (Compile, packageSrc) := true,
            resolvers += typesafe,
            sourceGenerators in Compile <+= (dependencyClasspath in TemplatesProject in Runtime, packageBin in TemplatesProject in Compile, scalaSource in Compile, sourceManaged in Compile, streams) map ScalaTemplates,
            compile in (Compile) <<= PostCompile
        )
    ).settings(com.typesafe.sbtscalariform.ScalariformPlugin.defaultScalariformSettings: _*).dependsOn(TemplatesProject, AnormProject)
    
    lazy val PlayTestProject = Project(
      "Play-Test",
      file("src/play-test"),
      settings = buildSettings ++ Seq(
        libraryDependencies := testDependencies,
        publishTo := Some(playRepository),
        scalacOptions ++= Seq("-encoding", "UTF-8", "-Xlint","-deprecation", "-unchecked"),
        javacOptions  ++= Seq("-encoding", "UTF-8","-Xlint:unchecked", "-Xlint:deprecation"),
        publishArtifact in (Compile, packageDoc) := false,
        publishArtifact in (Compile, packageSrc) := true,
        resolvers += typesafe
      )
    ).settings(com.typesafe.sbtscalariform.ScalariformPlugin.defaultScalariformSettings: _*).dependsOn(PlayProject)

    lazy val SbtPluginProject = Project(
      "SBT-Plugin",
      file("src/sbt-plugin"),
      settings = buildSettings ++ Seq(
        sbtPlugin := true,
        publishMavenStyle := false,
        libraryDependencies := sbtDependencies,
        addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-core" % "2.0.0"),
        addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.1.0-M1-TYPESAFE"),
        unmanagedJars in Compile ++= sbtJars,
        publishTo := Some(playIvyRepository),
        scalacOptions ++= Seq("-encoding", "UTF-8", "-Xlint","-deprecation", "-unchecked"),
        publishArtifact in (Compile, packageDoc) := false,
        publishArtifact in (Compile, packageSrc) := false,
        resolvers += typesafe
      )
    ).settings(com.typesafe.sbtscalariform.ScalariformPlugin.defaultScalariformSettings: _*).dependsOn(PlayProject, TemplatesProject, ConsoleProject)

    lazy val ConsoleProject = Project(
      "Console",
      file("src/console"),
      settings = buildSettings ++ Seq(
        libraryDependencies := consoleDependencies,
        sourceGenerators in Compile <+= sourceManaged in Compile map PlayVersion,
        unmanagedJars in Compile ++=  sbtJars,
        publishTo := Some(playRepository),
        scalacOptions ++= Seq("-encoding", "UTF-8", "-Xlint","-deprecation", "-unchecked"),
        publishArtifact in (Compile, packageDoc) := false,
        publishArtifact in (Compile, packageSrc) := true,
        resolvers += typesafe
      )
    ).settings(com.typesafe.sbtscalariform.ScalariformPlugin.defaultScalariformSettings: _*)

    val Root = Project(
        "Root",
        file("."),
        settings = buildSettings ++ Seq(
            libraryDependencies := runtime,
            cleanFiles ++= Seq(file("../dist"), file("../repository/local")),
            resetRepositoryTask,
            buildRepositoryTask,
            distTask,
            generateAPIDocsTask,
            publish <<= (publish in PlayProject, publish in TemplatesProject, publish in AnormProject, publish in SbtPluginProject, publish in ConsoleProject, publish in PlayTestProject) map { (_,_,_,_,_,_) => },
            publishLocal <<= (publishLocal in PlayProject, publishLocal in TemplatesProject, publishLocal in AnormProject, publishLocal in SbtPluginProject, publishLocal in ConsoleProject, publishLocal in PlayTestProject) map { (_,_,_,_,_,_) => }
        )
    ).settings(com.typesafe.sbtscalariform.ScalariformPlugin.defaultScalariformSettings: _*)
     .dependsOn(PlayProject).aggregate(AnormProject, TemplatesProject, PlayProject, SbtPluginProject, ConsoleProject, PlayTestProject)

    object BuildSettings {

        val buildOrganization = "play"
        val buildVersion      = Option(System.getProperty("play.version")).filterNot(_.isEmpty).getOrElse("2.0-unknown")
        val buildScalaVersion = "2.9.1"
        val buildSbtVersion   = "0.11.2"

        val buildSettings = Defaults.defaultSettings ++ Seq (
            organization   := buildOrganization,
            version        := buildVersion,
            scalaVersion   := buildScalaVersion,
            logManager <<= extraLoggers(PlayLogManager.default),
            ivyLoggingLevel := UpdateLogging.DownloadOnly
        )

    }

    object LocalSBT {

        import BuildSettings._

        def isJar(f:java.io.File) = f.getName.endsWith(".jar")

        val sbtJars:Seq[java.io.File] = {
            file("sbt/boot/scala-" + buildScalaVersion + "/org.scala-tools.sbt/sbt/" + buildSbtVersion).listFiles.filter(isJar) ++
            file("sbt/boot/scala-" + buildScalaVersion + "/org.scala-tools.sbt/sbt/" + buildSbtVersion + "/xsbti").listFiles.filter(isJar) ++
            Seq(file("sbt/boot/scala-" + buildScalaVersion + "/lib/jline.jar"))
        }
        
        val compilerJar:java.io.File = {
          file("sbt/boot/scala-" + buildScalaVersion + "/lib/scala-compiler.jar")
        }

    }

    object Resolvers {
        import BuildSettings._
        
        val playLocalRepository = Resolver.file("Play Local Repository", file("../repository/local"))(Resolver.ivyStylePatterns) 
        
        val typesafe = "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
        
        val typesafeReleases = "Typesafe Releases Repository" at "http://repo.typesafe.com/typesafe/maven-releases/"
        val typesafeSnapshot = "Typesafe Snapshots Repository" at "http://repo.typesafe.com/typesafe/maven-snapshots/"
        val playRepository = if (buildVersion.endsWith("SNAPSHOT")) typesafeSnapshot else typesafeReleases
        
        val typesafeIvyReleases = Resolver.url("Typesafe Ivy Releases Repository", url("http://repo.typesafe.com/typesafe/ivy-releases/"))(Resolver.ivyStylePatterns) 
        val typesafeIvySnapshot = Resolver.url("Typesafe Ivy Snapshots Repository", url("http://repo.typesafe.com/typesafe/ivy-snapshots/"))(Resolver.ivyStylePatterns) 
        val playIvyRepository = if (buildVersion.endsWith("SNAPSHOT")) typesafeIvySnapshot else typesafeIvyReleases
    }

    object Dependencies {

        val runtime = Seq(
            "io.netty"                          %    "netty"                    %   "3.3.0.Final",
            "org.slf4j"                         %    "slf4j-api"                %   "1.6.4",
            "org.slf4j"                         %    "jul-to-slf4j"             %   "1.6.4",
            "org.slf4j"                         %    "jcl-over-slf4j"           %   "1.6.4",
            "ch.qos.logback"                    %    "logback-core"             %   "1.0.0",
            "ch.qos.logback"                    %    "logback-classic"          %   "1.0.0",
            "com.github.scala-incubator.io"     %%   "scala-io-file"            %   "0.2.0",
            "com.typesafe.akka"                 %    "akka-actor"               %   "2.0.1",
            "com.typesafe.akka"                 %    "akka-slf4j"               %   "2.0.1",
            "com.google.guava"                  %    "guava"                    %   "10.0.1",
            
            ("org.avaje"                        %    "ebean"                    %   "2.7.3" notTransitive())
              .exclude("javax.persistence", "persistence-api")
            ,
{'fraction_non_alphanumeric': 0.12296834901625321, 'fraction_numerical': 0.007003849443969205, 'mean_word_length': 2.3449570815450644, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5805199', 'n_tokens_mistral': 5525, 'n_tokens_neox': 5288, 'n_words': 999}