<commit_before>import ReleaseKeys._
import ReleaseTransformations._

Jvm.`1.8`.required

inThisBuild(
  Def.settings(
    organization := "com.mediative",
    scalaVersion := "2.11.11",
    crossScalaVersions := Seq(scalaVersion.value, "2.12.2"),
    scalacOptions += "-Ywarn-unused-import",
    publishArtifact in (Compile, packageDoc) := false,
    publishArtifact in (Compile, packageSrc) := false,
    doctestTestFramework := DoctestTestFramework.ScalaTest,
    doctestWithDependencies := false
  ))

lazy val macroAnnotationSettings = Seq(
  resolvers += Resolver.sonatypeRepo("releases"),
  resolvers += Resolver.bintrayRepo("scalameta", "maven"),
  addCompilerPlugin("org.scalameta" % "paradise" % "3.0.0-M9" cross CrossVersion.full),
  scalacOptions += "-Xplugin-require:macroparadise",
  scalacOptions in (Compile, console) ~= (_ filterNot (_ contains "paradise")) // macroparadise plugin doesn't work in repl yet.
)

lazy val root = Project(id = "sangria-codegen-root", base = file("."))
  .enablePlugins(
    MediativeGitHubPlugin,
    MediativeReleasePlugin,
    CrossPerProjectPlugin,
    SiteScaladocPlugin)
  .aggregate(codegen, cli, sbtPlugin)
  .settings(
    noPublishSettings,
    releaseCrossBuild := false,
    releaseProcess := Seq[ReleaseStep](
      checkSnapshotDependencies, { st: State =>
        val v = sys.props.get("version").getOrElse {
          st.log.error("No version specified, rerun with `-Dversion=x.y.z`")
          sys.exit(1)
        }
        st.put(versions, (v, v))
      },
      runClean,
      releaseStepCommandAndRemaining("+test"),
      setReleaseVersion,
      tagRelease,
      releaseStepCommandAndRemaining("+publish"),
      pushChanges
    ) ++ postReleaseSteps.value,
    // Ignore the macro part when generating the API docs with sbt-unidoc
    sources in (ScalaUnidoc, unidoc) ~= { _.filter(_.getName != "GraphQLDomain.scala") },
    // Separate API docs for the sbt-plugin
    unidocProjectFilter in (ScalaUnidoc, unidoc) := inAnyProject -- inProjects(sbtPlugin),
    siteSubdirName in (sbtPlugin, SiteScaladoc) := "sbt-plugin",
    addMappingsToSiteDir(
      mappings in (sbtPlugin, Compile, packageDoc),
      siteSubdirName in (sbtPlugin, SiteScaladoc)
    )
  )

val codegen = project("sangria-codegen")
  .enablePlugins(MediativeBintrayPlugin)
  .settings(
    macroAnnotationSettings,
    libraryDependencies ++= Seq(
      "org.scalatest"       %% "scalatest" % "3.0.3" % Test,
      "org.scalameta"       %% "scalameta" % "1.8.0",
      "org.sangria-graphql" %% "sangria"   % "1.2.1",
      "org.typelevel"       %% "cats"      % "0.9.0"
    )
  )

val cli = project("sangria-codegen-cli")
  .enablePlugins(MediativeBintrayPlugin, BuildInfoPlugin)
  .dependsOn(codegen)
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest"              %% "scalatest"     % "3.0.3" % Test,
      "com.github.alexarchambault" %% "case-app"      % "1.2.0-M3",
      "io.circe"                   %% "circe-jawn"    % "0.8.0",
      "org.sangria-graphql"        %% "sangria-circe" % "1.1.0"
    ),
    buildInfoKeys := Seq[BuildInfoKey](version),
    buildInfoPackage := "com.mediative.sangria.codegen.cli"
  )

val sbtPlugin = project("sbt-sangria-codegen")
  .enablePlugins(MediativeBintrayPlugin, BuildInfoPlugin)
  .settings(
    scalaVersion := "2.10.6",
    crossScalaVersions := Seq(scalaVersion.value),
    scalacOptions ~= { _.filterNot(Set("-Ywarn-unused-import")) },
    publishLocal := publishLocal
      .dependsOn(publishLocal in codegen)
      .dependsOn(publishLocal in cli)
      .value,
    sbt.Keys.sbtPlugin := true,
    bintrayRepository := "sbt-plugins",
    scriptedSettings,
    // scriptedBufferLog := false,
    scriptedLaunchOpts += "-Dproject.version=" + version.value,
    buildInfoKeys := Seq[BuildInfoKey](version, scalaVersion),
    buildInfoPackage := "com.mediative.sangria.codegen.sbt"
  )

def project(name: String) = Project(id = name, base = file(name))<commit_msg>Do not include scalaVersion in the sbt plugin build info<commit_after>import ReleaseKeys._
import ReleaseTransformations._

Jvm.`1.8`.required

inThisBuild(
  Def.settings(
    organization := "com.mediative",
    scalaVersion := "2.11.11",
    crossScalaVersions := Seq(scalaVersion.value, "2.12.2"),
    scalacOptions += "-Ywarn-unused-import",
    publishArtifact in (Compile, packageDoc) := false,
    publishArtifact in (Compile, packageSrc) := false,
    doctestTestFramework := DoctestTestFramework.ScalaTest,
    doctestWithDependencies := false
  ))

lazy val macroAnnotationSettings = Seq(
  resolvers += Resolver.sonatypeRepo("releases"),
  resolvers += Resolver.bintrayRepo("scalameta", "maven"),
  addCompilerPlugin("org.scalameta" % "paradise" % "3.0.0-M9" cross CrossVersion.full),
  scalacOptions += "-Xplugin-require:macroparadise",
  scalacOptions in (Compile, console) ~= (_ filterNot (_ contains "paradise")) // macroparadise plugin doesn't work in repl yet.
)

lazy val root = Project(id = "sangria-codegen-root", base = file("."))
  .enablePlugins(
    MediativeGitHubPlugin,
    MediativeReleasePlugin,
    CrossPerProjectPlugin,
    SiteScaladocPlugin)
  .aggregate(codegen, cli, sbtPlugin)
  .settings(
    noPublishSettings,
    releaseCrossBuild := false,
    releaseProcess := Seq[ReleaseStep](
      checkSnapshotDependencies, { st: State =>
        val v = sys.props.get("version").getOrElse {
          st.log.error("No version specified, rerun with `-Dversion=x.y.z`")
          sys.exit(1)
        }
        st.put(versions, (v, v))
      },
      runClean,
      releaseStepCommandAndRemaining("+test"),
      setReleaseVersion,
      tagRelease,
      releaseStepCommandAndRemaining("+publish"),
      pushChanges
    ) ++ postReleaseSteps.value,
    // Ignore the macro part when generating the API docs with sbt-unidoc
    sources in (ScalaUnidoc, unidoc) ~= { _.filter(_.getName != "GraphQLDomain.scala") },
    // Separate API docs for the sbt-plugin
    unidocProjectFilter in (ScalaUnidoc, unidoc) := inAnyProject -- inProjects(sbtPlugin),
    siteSubdirName in (sbtPlugin, SiteScaladoc) := "sbt-plugin",
    addMappingsToSiteDir(
      mappings in (sbtPlugin, Compile, packageDoc),
      siteSubdirName in (sbtPlugin, SiteScaladoc)
    )
  )

val codegen = project("sangria-codegen")
  .enablePlugins(MediativeBintrayPlugin)
  .settings(
    macroAnnotationSettings,
    libraryDependencies ++= Seq(
      "org.scalatest"       %% "scalatest" % "3.0.3" % Test,
      "org.scalameta"       %% "scalameta" % "1.8.0",
      "org.sangria-graphql" %% "sangria"   % "1.2.1",
      "org.typelevel"       %% "cats"      % "0.9.0"
    )
  )

val cli = project("sangria-codegen-cli")
  .enablePlugins(MediativeBintrayPlugin, BuildInfoPlugin)
  .dependsOn(codegen)
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest"              %% "scalatest"     % "3.0.3" % Test,
      "com.github.alexarchambault" %% "case-app"      % "1.2.0-M3",
      "io.circe"                   %% "circe-jawn"    % "0.8.0",
      "org.sangria-graphql"        %% "sangria-circe" % "1.1.0"
    ),
    buildInfoKeys := Seq[BuildInfoKey](version),
    buildInfoPackage := "com.mediative.sangria.codegen.cli"
  )

val sbtPlugin = project("sbt-sangria-codegen")
  .enablePlugins(MediativeBintrayPlugin, BuildInfoPlugin)
  .settings(
    scalaVersion := "2.10.6",
    crossScalaVersions := Seq(scalaVersion.value),
    scalacOptions ~= { _.filterNot(Set("-Ywarn-unused-import")) },
    publishLocal := publishLocal
      .dependsOn(publishLocal in codegen)
      .dependsOn(publishLocal in cli)
      .value,
    sbt.Keys.sbtPlugin := true,
    bintrayRepository := "sbt-plugins",
    scriptedSettings,
    // scriptedBufferLog := false,
    scriptedLaunchOpts += "-Dproject.version=" + version.value,
    buildInfoKeys := Seq[BuildInfoKey](version),
    buildInfoPackage := "com.mediative.sangria.codegen.sbt"
  )

def project(name: String) = Project(id = name, base = file(name))
{'fraction_non_alphanumeric': 0.1377275580665411, 'fraction_numerical': 0.011299435028248588, 'mean_word_length': 3.3411444141689373, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '1106472', 'n_tokens_mistral': 2753, 'n_tokens_neox': 2696, 'n_words': 483}