-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract deprecated IntegrationTest configuration into sbt subproject
- Loading branch information
Showing
1 changed file
with
20 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,17 +9,15 @@ lazy val itkit = | |
name := "itkit", | ||
organization := "io.moia", | ||
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")), | ||
scmInfo := Some(ScmInfo(url("https://github.com/moia-oss/itkit"), "scm:[email protected]:moia-oss/itkit.git")), | ||
homepage := Some(url("https://github.com/moia-oss/itkit")) | ||
scmInfo := Some(ScmInfo(url("https://github.com/moia-oss/itkit"), "scm:[email protected]:moia-oss/itkit.git")), | ||
homepage := Some(url("https://github.com/moia-oss/itkit")) | ||
) | ||
.enablePlugins( | ||
AutomateHeaderPlugin, | ||
GitVersioning, | ||
GitBranchPrompt | ||
) | ||
.settings(sonatypeSettings: _*) | ||
.configs(IntegrationTest) | ||
.settings(Defaults.itSettings: _*) | ||
.settings(commonSettings) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
|
@@ -43,15 +41,24 @@ lazy val itkit = | |
lazy val samples = | ||
project | ||
.in(file("samples")) | ||
.configs(IntegrationTest) | ||
.configs(IntegrationWithTest) | ||
.dependsOn(itkit) | ||
.settings(Defaults.itSettings: _*) | ||
.settings(commonSettings) | ||
.settings( | ||
fork := true, | ||
publishArtifact := false | ||
) | ||
|
||
lazy val IntegrationWithTest = config("it").extend(Test) | ||
lazy val integrationTestSettings = inConfig(IntegrationWithTest)(integrationTestConfig) | ||
lazy val integrationTestConfig = | ||
Defaults.configSettings ++ Defaults.testTasks ++ org.scalafmt.sbt.ScalafmtPlugin.scalafmtConfigSettings ++ Seq( | ||
IntegrationWithTest / publish / skip := true, | ||
IntegrationWithTest / fork := true, | ||
IntegrationWithTest / scalaSource := baseDirectory.value / "src" / "it" / "scala", | ||
IntegrationWithTest / resourceDirectory := baseDirectory.value / "src" / "it" / "resources" | ||
) | ||
|
||
// ***************************************************************************** | ||
// Dependencies | ||
// ***************************************************************************** | ||
|
@@ -67,7 +74,7 @@ lazy val library = | |
val scalaLogging = "3.9.5" | ||
val scalaTest = "3.2.17" | ||
} | ||
val akkaActor = "com.typesafe.akka" %% "akka-actor-typed" % Version.akka | ||
val akkaActor = "com.typesafe.akka" %% "akka-actor-typed" % Version.akka | ||
val akkaHttp = "com.typesafe.akka" %% "akka-http" % Version.akkaHttp | ||
val akkaHttpTestkit = "com.typesafe.akka" %% "akka-http-testkit" % Version.akkaHttp | ||
val akkaStream = "com.typesafe.akka" %% "akka-stream-typed" % Version.akka | ||
|
@@ -123,15 +130,15 @@ lazy val compilerSettings = | |
"-target", | ||
"1.8" | ||
), | ||
Compile / unmanagedSourceDirectories := Seq((Compile / scalaSource).value), | ||
Test / unmanagedSourceDirectories := Seq((Test / scalaSource).value) | ||
Compile / unmanagedSourceDirectories := Seq((Compile / scalaSource).value), | ||
Test / unmanagedSourceDirectories := Seq((Test / scalaSource).value) | ||
) | ||
|
||
lazy val gitSettings = Seq(git.useGitDescribe := true) | ||
|
||
lazy val licenseSettings = | ||
Seq( | ||
headerLicense := Some( | ||
headerLicense := Some( | ||
HeaderLicense.Custom( | ||
"""|Copyright (c) MOIA GmbH 2017 | ||
|""".stripMargin | ||
|
@@ -160,9 +167,9 @@ lazy val scapegoatSettings = Seq(ThisBuild / scapegoatVersion := "2.1.3") | |
lazy val sbtVersionRegex = "v([0-9]+.[0-9]+.[0-9]+)-?(.*)?".r | ||
|
||
lazy val sbtGitSettings = Seq( | ||
git.useGitDescribe := true, | ||
git.baseVersion := "0.0.0", | ||
git.uncommittedSignifier := None, | ||
git.useGitDescribe := true, | ||
git.baseVersion := "0.0.0", | ||
git.uncommittedSignifier := None, | ||
git.gitTagToVersionNumber := { | ||
case sbtVersionRegex(v, "") => Some(v) | ||
case sbtVersionRegex(v, "SNAPSHOT") => Some(s"$v-SNAPSHOT") | ||
|