<commit_before>lazy val ScalaVersions  = Seq("2.11.8")
lazy val MetaVersion    = "2.0.0.530"
lazy val LibraryVersion = "4.0.0-SNAPSHOT"
lazy val isSnapshot     = LibraryVersion.endsWith("SNAPSHOT")
lazy val PRVersion      = latestPullRequestVersion()

// ==========================================
// Settings
// ==========================================

lazy val sharedSettings: Seq[Def.Setting[_]] =
  Defaults.defaultSettings ++
    Seq(
      scalaVersion := ScalaVersions.head,
      crossVersion := CrossVersion.full,
      version := PRVersion.getOrElse(LibraryVersion),
      organization := "org.scalameta",
      description := "Empowers production Scala compiler with latest macro developments",
      resolvers +=
          Resolver.url("scalameta-bintray", url("https://dl.bintray.com/scalameta/maven"))(Resolver.ivyStylePatterns),
      resolvers += Resolver.sonatypeRepo("releases"),
      resolvers += Resolver.url(
        "scalameta-bintray",
        url("https://dl.bintray.com/scalameta/maven"))(Resolver.ivyStylePatterns),
      publishMavenStyle := !isSnapshot,
      publishArtifact := false,
      scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked"),
      logBuffered := false,
      triggeredMessage in ThisBuild := Watched.clearWhenTriggered
    )

lazy val usePluginSettings: Seq[Def.Setting[_]] = Seq(
  scalacOptions in Compile <++= (Keys.`package` in (plugin, Compile)) map { (jar: File) =>
    System.setProperty("sbt.paths.plugin.jar", jar.getAbsolutePath)
    val addPlugin = "-Xplugin:" + jar.getAbsolutePath
    // Thanks Jason for this cool idea (taken from https://github.com/retronym/boxer)
    // add plugin timestamp to compiler options to trigger recompile of
    // main after editing the plugin. (Otherwise a 'clean' is needed.)
    val dummy = "-Jdummy=" + jar.lastModified
    Seq(addPlugin, dummy)
  }
)

lazy val testSettings: Seq[Def.Setting[_]] = Seq(
  libraryDependencies += "org.scalameta"  %% "scalameta"     % MetaVersion,
  libraryDependencies += "org.scala-lang" % "scala-reflect"  % scalaVersion.value,
  libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value,
  libraryDependencies += "org.scalatest"  % "scalatest_2.11" % "3.0.0",
  scalacOptions += "-Ywarn-unused-import",
  scalacOptions += "-Xfatal-warnings",
  scalacOptions in Compile ++= Seq()<commit_msg>Fix formatting to trigger bintray release<commit_after>lazy val ScalaVersions  = Seq("2.11.8")
lazy val MetaVersion    = "2.0.0.530"
lazy val LibraryVersion = "4.0.0-SNAPSHOT"
lazy val isSnapshot     = LibraryVersion.endsWith("SNAPSHOT")
lazy val PRVersion      = latestPullRequestVersion()

// ==========================================
// Settings
// ==========================================

lazy val sharedSettings: Seq[Def.Setting[_]] =
  Defaults.defaultSettings ++
    Seq(
      scalaVersion := ScalaVersions.head,
      crossVersion := CrossVersion.full,
      version := PRVersion.getOrElse(LibraryVersion),
      organization := "org.scalameta",
      description := "Empowers production Scala compiler with latest macro developments",
      resolvers += Resolver.url(
        "scalameta-bintray",
        url("https://dl.bintray.com/scalameta/maven"))(Resolver.ivyStylePatterns),
      resolvers += Resolver.sonatypeRepo("releases"),
      resolvers += Resolver.url(
        "scalameta-bintray",
        url("https://dl.bintray.com/scalameta/maven"))(Resolver.ivyStylePatterns),
      publishMavenStyle := !isSnapshot,
      publishArtifact := false,
      scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked"),
      logBuffered := false,
      triggeredMessage in ThisBuild := Watched.clearWhenTriggered
    )

lazy val usePluginSettings: Seq[Def.Setting[_]] = Seq(
  scalacOptions in Compile <++= (Keys.`package` in (plugin, Compile)) map { (jar: File) =>
    System.setProperty("sbt.paths.plugin.jar", jar.getAbsolutePath)
    val addPlugin = "-Xplugin:" + jar.getAbsolutePath
    // Thanks Jason for this cool idea (taken from https://github.com/retronym/boxer)
    // add plugin timestamp to compiler options to trigger recompile of
    // main after editing the plugin. (Otherwise a 'clean' is needed.)
    val dummy = "-Jdummy=" + jar.lastModified
    Seq(addPlugin, dummy)
  }
)

lazy val testSettings: Seq[Def.Setting[_]] = Seq(
  libraryDependencies += "org.scalameta"  %% "scalameta"     % MetaVersion,
  libraryDependencies += "org.scala-lang" % "scala-reflect"  % scalaVersion.value,
  libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value,
  libraryDependencies += "org.scalatest"  % "scalatest_2.11" % "3.0.0",
  scalacOptions += "-Ywarn-unused-import",
  scalacOptions += "-Xfatal-warnings",
  scalacOptions in Compile ++= Seq()
{'fraction_non_alphanumeric': 0.16782334384858044, 'fraction_numerical': 0.007991587802313354, 'mean_word_length': 3.918304033092037, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, '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': '7333316', 'n_tokens_mistral': 1516, 'n_tokens_neox': 1467, 'n_words': 309}