Skip to content

Commit

Permalink
update sbt settings to new syntax - other version bumps
Browse files Browse the repository at this point in the history
  • Loading branch information
jbwheatley committed Oct 6, 2021
1 parent 719d193 commit 4c9a43b
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 39 deletions.
8 changes: 4 additions & 4 deletions broker-integration-tests/provider/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ libraryDependencies ++= {
//A hack so we don't have to manually update the scala-pact version for the examples
lazy val pactVersion = IO.read(pactVersionFile.value).split('"')(1)
Seq(
"org.http4s" %% "http4s-blaze-server" % "0.23.1",
"org.http4s" %% "http4s-dsl" % "0.23.1",
"org.http4s" %% "http4s-circe" % "0.23.1",
"org.slf4j" % "slf4j-simple" % "1.6.4",
"org.http4s" %% "http4s-blaze-server" % "0.23.4",
"org.http4s" %% "http4s-dsl" % "0.23.4",
"org.http4s" %% "http4s-circe" % "0.23.4",
"org.slf4j" % "slf4j-simple" % "1.7.32",
"org.scalatest" %% "scalatest" % "3.2.9" % "test",
"com.itv" %% "scalapact-scalatest-suite" % pactVersion % "test",
"org.scalaj" %% "scalaj-http" % "2.4.2" % "test",
Expand Down
30 changes: 15 additions & 15 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ lazy val commonSettings = Seq(
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.9" % "test"
),
parallelExecution in Test := false,
Test / parallelExecution := false,
// javaOptions in Test ++= Seq(
// "-XX:+UnlockCommercialFeatures", "-XX:+FlightRecorder"
// ),
test in assembly := {}
assembly / test := {}
)

lazy val scala212OnlySettings = Seq(
Expand All @@ -27,7 +27,7 @@ lazy val scala3Settings = Seq(
)

lazy val mockSettings = Seq(
libraryDependencies += "org.scalamock" %% "scalamock" % "4.0.0" % Test
libraryDependencies += "org.scalamock" %% "scalamock" % "5.1.0" % Test
)

// Everything blows up if the plugin uses scala-xml 2.x
Expand All @@ -48,7 +48,7 @@ lazy val publishSettings = Seq(
},
publishTo := sonatypePublishToBundle.value,
publishMavenStyle := true,
publishArtifact in Test := false,
Test / publishArtifact := false,
pomIncludeRepository := { _ =>
false
},
Expand Down Expand Up @@ -154,7 +154,7 @@ lazy val testShared =
.settings(scala3Settings: _*)
.settings(
name := "scalapact-test-shared",
skip in publish := true
publish / skip := true
)
.dependsOn(shared)

Expand Down Expand Up @@ -245,7 +245,7 @@ lazy val framework =
.settings(publishSettings: _*)
.settings(
name := "scalapact-scalatest",
mappings in (Compile, packageBin) ~= {
Compile / packageBin / mappings ~= {
_.filterNot { case (_, fileName) => fileName == "logback.xml" || fileName == "log4j.properties" }
}
)
Expand All @@ -258,7 +258,7 @@ lazy val frameworkWithDeps =
.settings(publishSettings: _*)
.settings(
name := "scalapact-scalatest-suite",
mappings in (Compile, packageBin) ~= {
Compile / packageBin / mappings ~= {
_.filterNot { case (_, fileName) => fileName == "logback.xml" || fileName == "log4j.properties" }
}
)
Expand All @@ -272,11 +272,11 @@ lazy val standalone =
.settings(
name := "scalapact-standalone-stubber",
publish := {},
assemblyJarName in assembly := "pactstubber.jar",
assembly / assemblyJarName := "pactstubber.jar",
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.6"
),
skip in publish := true
publish / skip := true
)
.dependsOn(core)
.dependsOn(circe13)
Expand All @@ -287,7 +287,7 @@ lazy val pactSpec =
.settings(commonSettings: _*)
.settings(
name := "pact-spec-tests",
skip in publish := true
publish / skip := true
)
.settings(scala212OnlySettings)
.dependsOn(core)
Expand All @@ -303,9 +303,9 @@ lazy val testsWithDeps =
"org.json4s" %% "json4s-native" % "4.0.2" % "test",
"com.github.tomakehurst" % "wiremock" % "2.27.2" % "test",
"fr.hmil" %% "roshttp" % "2.1.0" % "test",
"io.argonaut" %% "argonaut" % "6.3.6"
"io.argonaut" %% "argonaut" % "6.3.7"
),
skip in publish := true
publish / skip := true
)
.settings(scala212OnlySettings)
.dependsOn(framework)
Expand All @@ -322,16 +322,16 @@ lazy val docs =
paradoxTheme := Some(builtinParadoxTheme("generic")),
name := "scalapact-docs",
git.remoteRepo := "[email protected]:ITV/scala-pact.git",
sourceDirectory in Paradox := sourceDirectory.value / "main" / "paradox",
skip in publish := true
Paradox / sourceDirectory := sourceDirectory.value / "main" / "paradox",
publish / skip := true
)
.settings(scala212OnlySettings)

lazy val scalaPactProject =
(project in file("."))
.settings(commonSettings: _*)
.settings(
skip in publish := true,
publish / skip := true,
crossScalaVersions := Nil
)
.aggregate(shared, core, pluginShared, plugin, pluginNoDeps, framework, testShared)
Expand Down
8 changes: 4 additions & 4 deletions example/consumer/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name := "consumer"

organization := "com.example"

scalaVersion := "2.13.3"
scalaVersion := "2.13.6"

enablePlugins(ScalaPactPlugin)

Expand All @@ -21,9 +21,9 @@ libraryDependencies ++= {
"com.itv" %% "scalapact-http4s-0-23" % pactVersion % "test",
"com.itv" %% "scalapact-scalatest" % pactVersion % "test",
"org.scalaj" %% "scalaj-http" % "2.4.2",
"org.slf4j" % "slf4j-simple" % "1.6.4",
"org.json4s" %% "json4s-native" % "3.6.9",
"org.scalatest" %% "scalatest" % "3.0.8" % "test"
"org.slf4j" % "slf4j-simple" % "1.7.32",
"org.json4s" %% "json4s-native" % "4.0.2",
"org.scalatest" %% "scalatest" % "3.2.9" % "test"
)
}

Expand Down
2 changes: 1 addition & 1 deletion example/consumer/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.3.2
sbt.version = 1.5.5
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import com.itv.scalapact.{ScalaPactMockConfig, ScalaPactMockServer}
import com.itv.scalapact.model.ScalaPactDescription
import org.json4s.DefaultFormats
import org.json4s.native.Serialization._
import org.scalatest.{BeforeAndAfterAll, FunSpec, Matchers}
import org.scalatest.BeforeAndAfterAll
import org.scalatest.funspec.AnyFunSpec
import org.scalatest.matchers.should.Matchers

/** Stands up the stub service with all stubs prior to running tests and shuts it down afterwards. */
class SingletonStubProviderClientSpec extends FunSpec with Matchers with BeforeAndAfterAll {
class SingletonStubProviderClientSpec extends AnyFunSpec with Matchers with BeforeAndAfterAll {

// The import contains two things:
// 1. The consumer test DSL/Builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package com.example.consumer

import org.json4s.DefaultFormats
import org.json4s.native.Serialization._
import org.scalatest.{FunSpec, Matchers}
import org.scalatest.funspec.AnyFunSpec
import org.scalatest.matchers.should.Matchers

/** Stands up a stub service per test case. */
class StubPerTestProviderClientSpec extends FunSpec with Matchers {
class StubPerTestProviderClientSpec extends AnyFunSpec with Matchers {

// The import contains two things:
// 1. The consumer test DSL/Builder
Expand Down
6 changes: 3 additions & 3 deletions example/provider/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ version := "0.0.1"
scalaVersion := "2.13.6"

libraryDependencies ++= Seq(
"org.http4s" %% "http4s-blaze-server" % "0.23.1",
"org.http4s" %% "http4s-dsl" % "0.23.1",
"org.http4s" %% "http4s-circe" % "0.23.1",
"org.http4s" %% "http4s-blaze-server" % "0.23.4",
"org.http4s" %% "http4s-dsl" % "0.23.4",
"org.http4s" %% "http4s-circe" % "0.23.4",
"org.slf4j" % "slf4j-simple" % "1.7.32"
)
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"version" : "2.0.0"
},
"scala-pact" : {
"version" : "4.1.1-SNAPSHOT"
"version" : "4.2.0"
}
}
}
2 changes: 1 addition & 1 deletion example/provider/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.3.2
sbt.version = 1.5.5
8 changes: 4 additions & 4 deletions example/provider_pact-for-verification/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ organization := "com.example"

name := "provider_pacts-for-verification"

scalaVersion := "2.13.3"
scalaVersion := "2.13.6"

enablePlugins(ScalaPactPlugin)

Expand All @@ -15,9 +15,9 @@ libraryDependencies ++= {
//A hack so we don't have to manually update the scala-pact version for the examples
lazy val pactVersion = IO.read(pactVersionFile.value).split('"')(1)
Seq(
"org.http4s" %% "http4s-blaze-server" % "0.23.1",
"org.http4s" %% "http4s-dsl" % "0.23.1",
"org.http4s" %% "http4s-circe" % "0.23.1",
"org.http4s" %% "http4s-blaze-server" % "0.23.4",
"org.http4s" %% "http4s-dsl" % "0.23.4",
"org.http4s" %% "http4s-circe" % "0.23.4",
"org.slf4j" % "slf4j-simple" % "1.7.32",
"org.scalatest" %% "scalatest" % "3.2.9" % "test",
"com.itv" %% "scalapact-scalatest-suite" % pactVersion % "test",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.3.2
sbt.version = 1.5.5
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"version" : "2.0.0"
},
"scala-pact" : {
"version" : "4.1.1-SNAPSHOT"
"version" : "4.2.0"
}
}
}

0 comments on commit 4c9a43b

Please sign in to comment.