<commit_before>import scalapb.compiler.Version.scalapbVersion
import scalajsbundler.util.JSON._
import sbtcrossproject.{crossProject, CrossType}

lazy val Version = new {
  def scala212 = "2.12.7"
  def scala211 = "2.11.12"
  def scalameta = "4.1.0"
}

inThisBuild(
  List(
    organization := "org.scalameta",
    licenses := Seq(
      "Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
    ),
    homepage := Some(url("https://github.com/scalameta/metabrowse")),
    autoAPIMappings := true,
    apiURL := Some(url("https://scalameta.github.io/metabrowse")),
    developers := List(
      Developer(
        "olafurpg",
        "<NAME>",
        "<EMAIL>",
        url("https://geirsson.com")
      ),
      Developer(
        "jonas",
        "<NAME>",
        "<EMAIL>",
        url("https://github.com/jonas")
      )
    ),
    scalaVersion := Version.scala212,
    crossScalaVersions := Seq(Version.scala212, Version.scala211),
    scalacOptions := Seq(
      "-deprecation",
      "-encoding",
      "UTF-8",
      "-feature",
      "-unchecked"
    )
  )
)

cancelable.in(Global) := true

skip in publish := true
crossScalaVersions := Nil

lazy val example = project
  .in(file("paiges") / "core")
  .settings(
    skip in publish := true,
    addCompilerPlugin(
      "org.scalameta" % "semanticdb-scalac" % Version.scalameta cross CrossVersion.full
    ),
    scalacOptions ++= Seq(
      "-Yrangepos",
      "-Xplugin-require:semanticdb"
    ),
    libraryDependencies ++= List(
      "org.scalatest" %% "scalatest" % "3.0.6" % Test,
      "org.scalacheck" %% "scalacheck" % "1.14.0" % Test
    ),
    test := {} // no need to run paiges tests.
  )

lazy val server = project
  .in(file("metabrowse-server"))
  .settings(
    moduleName := "metabrowse-server",
    resolvers += Resolver.sonatypeRepo("releases"),
    resolvers += Resolver.sonatypeRepo("snapshots"),
    libraryDependencies ++= List(
      "io.undertow" % "undertow-core" % "2.0.27.Final",
      "org.slf4j" % "slf4j-api" % "1.8.0-beta4",
      "org.jboss.xnio" % "xnio-nio" % "3.7.5.Final",
      "org.scalameta" % "interactive" % "4.1.4" cross CrossVersion.full,
      "org.scalameta" %% "mtags" % "0.4.4"
    )
  )
  .dependsOn(cli)

lazy val cli = project
  .in(file("metabrowse-cli"))
  .settings(
    moduleName := "metabrowse-cli",
    mainClass.in(assembly) := Some("metabrowse.cli.MetabrowseCli"),
    assemblyJarName.in(assembly) := "metabrowse.jar",
    scalacOptions ++= {
      CrossVersion.partialVersion(scalaBinaryVersion.value) match {
        case Some((2, 11)) =>
          Seq("-Xexperimental")
        case _ =>
          Nil
      }
    },
    libraryDependencies ++= List(
      "com.thesamet.scalapb" %% "scalapb-json4s" % "0.10.0",
      "com.github.alexarchambault" %% "case-app" % "1.2.0",
      "com.github.pathikrit" %% "better-files" % "3.7.1"
    ),
    resourceGenerators in Compile += Def.task {
      val zip = (resourceManaged in Compile).value / "metabrowse-assets.zip"
      val _ = (webpack in (js, Compile, fullOptJS)).value<commit_msg>Update undertow-core to 2.0.28.Final<commit_after>import scalapb.compiler.Version.scalapbVersion
import scalajsbundler.util.JSON._
import sbtcrossproject.{crossProject, CrossType}

lazy val Version = new {
  def scala212 = "2.12.7"
  def scala211 = "2.11.12"
  def scalameta = "4.1.0"
}

inThisBuild(
  List(
    organization := "org.scalameta",
    licenses := Seq(
      "Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
    ),
    homepage := Some(url("https://github.com/scalameta/metabrowse")),
    autoAPIMappings := true,
    apiURL := Some(url("https://scalameta.github.io/metabrowse")),
    developers := List(
      Developer(
        "olafurpg",
        "<NAME>",
        "<EMAIL>",
        url("https://geirsson.com")
      ),
      Developer(
        "jonas",
        "<NAME>",
        "<EMAIL>",
        url("https://github.com/jonas")
      )
    ),
    scalaVersion := Version.scala212,
    crossScalaVersions := Seq(Version.scala212, Version.scala211),
    scalacOptions := Seq(
      "-deprecation",
      "-encoding",
      "UTF-8",
      "-feature",
      "-unchecked"
    )
  )
)

cancelable.in(Global) := true

skip in publish := true
crossScalaVersions := Nil

lazy val example = project
  .in(file("paiges") / "core")
  .settings(
    skip in publish := true,
    addCompilerPlugin(
      "org.scalameta" % "semanticdb-scalac" % Version.scalameta cross CrossVersion.full
    ),
    scalacOptions ++= Seq(
      "-Yrangepos",
      "-Xplugin-require:semanticdb"
    ),
    libraryDependencies ++= List(
      "org.scalatest" %% "scalatest" % "3.0.6" % Test,
      "org.scalacheck" %% "scalacheck" % "1.14.0" % Test
    ),
    test := {} // no need to run paiges tests.
  )

lazy val server = project
  .in(file("metabrowse-server"))
  .settings(
    moduleName := "metabrowse-server",
    resolvers += Resolver.sonatypeRepo("releases"),
    resolvers += Resolver.sonatypeRepo("snapshots"),
    libraryDependencies ++= List(
      "io.undertow" % "undertow-core" % "2.0.28.Final",
      "org.slf4j" % "slf4j-api" % "1.8.0-beta4",
      "org.jboss.xnio" % "xnio-nio" % "3.7.5.Final",
      "org.scalameta" % "interactive" % "4.1.4" cross CrossVersion.full,
      "org.scalameta" %% "mtags" % "0.4.4"
    )
  )
  .dependsOn(cli)

lazy val cli = project
  .in(file("metabrowse-cli"))
  .settings(
    moduleName := "metabrowse-cli",
    mainClass.in(assembly) := Some("metabrowse.cli.MetabrowseCli"),
    assemblyJarName.in(assembly) := "metabrowse.jar",
    scalacOptions ++= {
      CrossVersion.partialVersion(scalaBinaryVersion.value) match {
        case Some((2, 11)) =>
          Seq("-Xexperimental")
        case _ =>
          Nil
      }
    },
    libraryDependencies ++= List(
      "com.thesamet.scalapb" %% "scalapb-json4s" % "0.10.0",
      "com.github.alexarchambault" %% "case-app" % "1.2.0",
      "com.github.pathikrit" %% "better-files" % "3.7.1"
    ),
    resourceGenerators in Compile += Def.task {
      val zip = (resourceManaged in Compile).value / "metabrowse-assets.zip"
      val _ = (webpack in (js, Compile, fullOptJS)).value
{'fraction_non_alphanumeric': 0.1710761240058432, 'fraction_numerical': 0.0240220743385814, 'mean_word_length': 2.6766109785202863, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '159849', 'n_tokens_mistral': 2323, 'n_tokens_neox': 2248, 'n_words': 370}