Skip to content

Commit

Permalink
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
Browse files Browse the repository at this point in the history
saeltz committed Mar 5, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 82c071a commit b5b20db
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lazy val root = project
.in(file("."))
.configs(IntegrationTest.extend(Test))
.configs(IntegrationWithTest)
.enablePlugins(GitVersioning, GitBranchPrompt)
.settings(
name := "scynamo",
@@ -44,6 +44,13 @@ lazy val docs = project
libraryDependencies += "org.scala-lang.modules" %% "scala-java8-compat" % "1.0.2"
)

/** Introduce a configuration for integration test. The default configuration uses the compile scope and can not see test classes. With this
* scope in place, integration tests can also use test classes.
*/
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

lazy val scalacOptions_2_12 = Seq(
"-unchecked",
"-deprecation",
@@ -94,10 +101,9 @@ lazy val sbtGitSettings = Seq(
}
)

lazy val scalaFmtSettings =
Seq(
scalafmtOnCompile := true
) ++ inConfig(IntegrationTest.extend(Test))(org.scalafmt.sbt.ScalafmtPlugin.scalafmtConfigSettings)
lazy val scalaFmtSettings = Seq(
scalafmtOnCompile := true
)

lazy val sonatypeSettings = {
import xerial.sbt.Sonatype._

0 comments on commit b5b20db

Please sign in to comment.