<commit_before>/*
 * Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com>
 */

import sbt.ScriptedPlugin._
import sbt._
import Keys._
import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
import com.typesafe.tools.mima.plugin.MimaKeys.{
  previousArtifact, binaryIssueFilters, reportBinaryIssues
}
import com.typesafe.tools.mima.core._

import com.typesafe.sbt.SbtScalariform.scalariformSettings

import play.twirl.sbt.SbtTwirl
import play.twirl.sbt.Import.TwirlKeys

import sbtdoge.CrossPerProjectPlugin

import bintray.BintrayPlugin.autoImport._

import interplay._
import interplay.Omnidoc.autoImport._
import interplay.PlayBuildBase.autoImport._

import scala.util.control.NonFatal

object BuildSettings {

  // Binary compatibility is tested against this version
  val previousVersion = "3.0.0"

  // Argument for setting size of permgen space or meta space for all forked processes
  val maxMetaspace = s"-XX:MaxMetaspaceSize=384m"

  val snapshotBranch = {
    try {
      val branch = "git rev-parse --abbrev-ref HEAD".!!.trim
      if (branch == "HEAD") {
        // not on a branch, get the hash
        "git rev-parse HEAD".!!.trim
      } else branch
    } catch {
      case NonFatal(_) => "unknown"
    }
  }

  /**
   * These settings are used by all projects
   */
  def playCommonSettings: Seq[Setting[_]] = scalariformSettings ++ Seq(
    homepage := Some(url("https://playframework.com")),
    ivyLoggingLevel := UpdateLogging.DownloadOnly,
    resolvers ++= Seq(
      "Scalaz Bintray Repo" at "https://dl.bintray.com/scalaz/releases"
    ),
    fork in Test := true,
    parallelExecution in Test := false,
    testListeners in (Test,test) := Nil,
    javaOptions in Test += maxMetaspace,
    testOptions += Tests.Argument(TestFrameworks.JUnit, "-v"),
    bintrayPackage := "play-sbt-plugin"
  )

  /**
   * These settings are used by all projects that are part of the runtime, as opposed to development, mode of Play.
   */
  def playRuntimeSettings: Seq[Setting[_]] = playCommonSettings ++ mimaDefaultSettings ++ Seq(
    previousArtifact := {
      if (crossPaths.value) {
        Some(organization.value % s"${moduleName.value}_${scalaBinaryVersion.value}" % previousVersion)<commit_msg>Reinstate typesafe repos<commit_after>/*
 * Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com>
 */

import sbt.ScriptedPlugin._
import sbt._
import Keys._
import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
import com.typesafe.tools.mima.plugin.MimaKeys.{
  previousArtifact, binaryIssueFilters, reportBinaryIssues
}
import com.typesafe.tools.mima.core._

import com.typesafe.sbt.SbtScalariform.scalariformSettings

import play.twirl.sbt.SbtTwirl
import play.twirl.sbt.Import.TwirlKeys

import sbtdoge.CrossPerProjectPlugin

import bintray.BintrayPlugin.autoImport._

import interplay._
import interplay.Omnidoc.autoImport._
import interplay.PlayBuildBase.autoImport._

import scala.util.control.NonFatal

object BuildSettings {

  // Binary compatibility is tested against this version
  val previousVersion = "3.0.0"

  // Argument for setting size of permgen space or meta space for all forked processes
  val maxMetaspace = s"-XX:MaxMetaspaceSize=384m"

  val snapshotBranch = {
    try {
      val branch = "git rev-parse --abbrev-ref HEAD".!!.trim
      if (branch == "HEAD") {
        // not on a branch, get the hash
        "git rev-parse HEAD".!!.trim
      } else branch
    } catch {
      case NonFatal(_) => "unknown"
    }
  }

  /**
   * These settings are used by all projects
   */
  def playCommonSettings: Seq[Setting[_]] = scalariformSettings ++ Seq(
    homepage := Some(url("https://playframework.com")),
    ivyLoggingLevel := UpdateLogging.DownloadOnly,
    resolvers ++= Seq(
      "Scalaz Bintray Repo" at "https://dl.bintray.com/scalaz/releases",
      Resolver.typesafeRepo("releases"),
      Resolver.typesafeIvyRepo("releases")
    ),
    fork in Test := true,
    parallelExecution in Test := false,
    testListeners in (Test,test) := Nil,
    javaOptions in Test += maxMetaspace,
    testOptions += Tests.Argument(TestFrameworks.JUnit, "-v"),
    bintrayPackage := "play-sbt-plugin"
  )

  /**
   * These settings are used by all projects that are part of the runtime, as opposed to development, mode of Play.
   */
  def playRuntimeSettings: Seq[Setting[_]] = playCommonSettings ++ mimaDefaultSettings ++ Seq(
    previousArtifact := {
      if (crossPaths.value) {
        Some(organization.value % s"${moduleName.value}_${scalaBinaryVersion.value}" % previousVersion)
{'fraction_non_alphanumeric': 0.11242344706911636, 'fraction_numerical': 0.006124234470691163, 'mean_word_length': 3.6426395939086293, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, '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': '3195152', 'n_tokens_mistral': 1492, 'n_tokens_neox': 1416, 'n_words': 349}