Skip to content

Commit da2173a

Browse files
Fixes #204: require explicitly enabling ScalaPactPlugin on projects. (#210)
* Fixes #204: require explicitly enabling ScalaPactPlugin on projects.
1 parent 69bd4c3 commit da2173a

File tree

8 files changed

+11
-5
lines changed

8 files changed

+11
-5
lines changed

broker-integration-tests/provider/build.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ name := "provider"
44

55
scalaVersion := "2.13.3"
66

7+
enablePlugins(ScalaPactPlugin)
8+
79
lazy val pactVersionFile: SettingKey[File] = settingKey[File]("location of scala-pact version for these tests")
810
pactVersionFile := baseDirectory.value.getParentFile.getParentFile / "version.sbt"
911

example/provider/delivered_pacts/scala-pact-consumer_scala-pact-provider.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"version" : "2.0.0"
6767
},
6868
"scala-pact" : {
69-
"version" : "2.4.1-SNAPSHOT"
69+
"version" : "3.0.2-SNAPSHOT"
7070
}
7171
}
7272
}

example/provider/pact.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import com.itv.scalapact.shared.ProviderStateResult
77

88
import scala.concurrent.duration._
99

10+
enablePlugins(ScalaPactPlugin)
11+
1012
scalaPactEnv :=
1113
ScalaPactEnv.defaults
1214
.withPort(8080)

example/provider_pact-for-verification/build.sbt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ organization := "com.example"
44

55
name := "provider_pacts-for-verification"
66

7-
87
scalaVersion := "2.13.3"
98

9+
enablePlugins(ScalaPactPlugin)
10+
1011
lazy val pactVersionFile: SettingKey[File] = settingKey[File]("location of scala-pact version for examples")
1112
pactVersionFile := baseDirectory.value.getParentFile.getParentFile / "version.sbt"
1213

example/provider_tests/build.sbt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ organization := "com.example"
44

55
name := "provider_tests"
66

7-
87
scalaVersion := "2.13.3"
98

109
lazy val pactVersionFile: SettingKey[File] = settingKey[File]("location of scala-pact version for examples")

example/provider_tests/delivered_pacts/scala-pact-consumer_scala-pact-provider.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"version" : "2.0.0"
6767
},
6868
"scala-pact" : {
69-
"version" : "2.4.1-SNAPSHOT"
69+
"version" : "3.0.2-SNAPSHOT"
7070
}
7171
}
7272
}

sbt-scalapact/src/main/scala/com/itv/scalapact/plugin/ScalaPactPlugin.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import scala.language.implicitConversions
1515

1616
object ScalaPactPlugin extends AutoPlugin {
1717
override def requires: JvmPlugin.type = plugins.JvmPlugin
18-
override def trigger: PluginTrigger = allRequirements
18+
override def trigger: PluginTrigger = noTrigger
1919

2020
@SuppressWarnings(Array("org.wartremover.warts.ImplicitConversion"))
2121
implicit def booleanToProviderStateResult(bool: Boolean): ProviderStateResult = ProviderStateResult(bool)

scripts/test-verifier.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ echo "addSbtPlugin(\"com.itv\" % \"sbt-scalapact\" % \"$CORE_VERSION\")" >> $PLU
1515
cat > $PACT_CONFIG_FILE <<EOL
1616
import com.itv.scalapact.plugin.ScalaPactPlugin._
1717
18+
enablePlugins(ScalaPactPlugin)
19+
1820
providerStates := Seq(
1921
("Resource with ID 1234 exists", (_: String) => {
2022
println("Injecting key 1234 into the database...")

0 commit comments

Comments
 (0)