<commit_before>sbtPlugin := true

name := "sbt-native-packager"
organization := "com.typesafe.sbt"

Global / scalaVersion := "2.12.6"

// crossBuildingSettings
crossSbtVersions := Vector("0.13.17", "1.1.6")

Compile / scalacOptions ++= Seq("-deprecation")
javacOptions ++= Seq("-source", "1.8", "-target", "1.8")

// put jdeb on the classpath for scripted tests
classpathTypes += "maven-plugin"
libraryDependencies ++= Seq(
  "org.apache.commons" % "commons-compress" % "1.14",
  // for jdkpackager
  "org.apache.ant" % "ant" % "1.10.1",
  "org.scalatest" %% "scalatest" % "3.0.3" % Test
)

// sbt dependend libraries
libraryDependencies ++= {
  (pluginCrossBuild / sbtVersion).value match {
    case v if v.startsWith("1.") =>
      Seq(
        "org.scala-sbt" %% "io" % "1.0.0",
        // these dependencies have to be explicitly added by the user
        // FIXME temporary remove the 'provided' scope. SBT 1.0.0-M6 changed the resolving somehow
        "com.spotify" % "docker-client" % "8.9.0" /* % "provided" */,
        "org.vafer" % "jdeb" % "1.3" /*% "provided"*/ artifacts Artifact("jdeb", "jar", "jar")
      )
    case _ =>
      Seq(
        // these dependencies have to be explicitly added by the user
        "com.spotify" % "docker-client" % "8.9.0" % Provided,
        "org.vafer" % "jdeb" % "1.3" % Provided artifacts Artifact("jdeb", "jar", "jar")
      )
  }
}

// scala version depended libraries
libraryDependencies ++= {
  scalaBinaryVersion.value match {
    case "2.10" => Nil
    case _ =>
      Seq(
        "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.6",
        "org.scala-lang.modules" %% "scala-xml" % "1.0.6"
      )
  }
}

// configure github page
enablePlugins(SphinxPlugin, SiteScaladocPlugin, GhpagesPlugin)

git.remoteRepo := "<EMAIL>:sbt/sbt-native-packager.git"

// scripted test settings
scriptedLaunchOpts += "-Dproject.version=" + version.value

// Release configuration
publishMavenStyle := false

// The release task doesn't run any tests. We rely on travis.ci and appveyor,
// because it's impossible to run all tests (linux, macosx, windows) on a single computer.
import ReleaseTransformations._
releaseProcess := Seq[ReleaseStep](
  checkSnapshotDependencies,<commit_msg>Run tests on relaese<commit_after>sbtPlugin := true

name := "sbt-native-packager"
organization := "com.typesafe.sbt"

Global / scalaVersion := "2.12.6"

// crossBuildingSettings
crossSbtVersions := Vector("0.13.17", "1.1.6")

Compile / scalacOptions ++= Seq("-deprecation")
javacOptions ++= Seq("-source", "1.8", "-target", "1.8")

// put jdeb on the classpath for scripted tests
classpathTypes += "maven-plugin"
libraryDependencies ++= Seq(
  "org.apache.commons" % "commons-compress" % "1.14",
  // for jdkpackager
  "org.apache.ant" % "ant" % "1.10.1",
  "org.scalatest" %% "scalatest" % "3.0.3" % Test
)

// sbt dependend libraries
libraryDependencies ++= {
  (pluginCrossBuild / sbtVersion).value match {
    case v if v.startsWith("1.") =>
      Seq(
        "org.scala-sbt" %% "io" % "1.0.0",
        // these dependencies have to be explicitly added by the user
        // FIXME temporary remove the 'provided' scope. SBT 1.0.0-M6 changed the resolving somehow
        "com.spotify" % "docker-client" % "8.9.0" /* % "provided" */,
        "org.vafer" % "jdeb" % "1.3" /*% "provided"*/ artifacts Artifact("jdeb", "jar", "jar")
      )
    case _ =>
      Seq(
        // these dependencies have to be explicitly added by the user
        "com.spotify" % "docker-client" % "8.9.0" % Provided,
        "org.vafer" % "jdeb" % "1.3" % Provided artifacts Artifact("jdeb", "jar", "jar")
      )
  }
}

// scala version depended libraries
libraryDependencies ++= {
  scalaBinaryVersion.value match {
    case "2.10" => Nil
    case _ =>
      Seq(
        "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.6",
        "org.scala-lang.modules" %% "scala-xml" % "1.0.6"
      )
  }
}

// configure github page
enablePlugins(SphinxPlugin, SiteScaladocPlugin, GhpagesPlugin)

git.remoteRepo := "<EMAIL>:sbt/sbt-native-packager.git"

// scripted test settings
scriptedLaunchOpts += "-Dproject.version=" + version.value

// Release configuration
publishMavenStyle := false

// The release task doesn't run any tests. We rely on travis.ci and appveyor,
// because it's impossible to run all tests (linux, macosx, windows) on a single computer.
import ReleaseTransformations._
releaseProcess := Seq[ReleaseStep](
  checkSnapshotDependencies,
  runTest,
{'fraction_non_alphanumeric': 0.16080960854092527, 'fraction_numerical': 0.023576512455516015, 'mean_word_length': 3.1832558139534886, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3330436', 'n_tokens_mistral': 1615, 'n_tokens_neox': 1528, 'n_words': 375}