Skip to content

Commit f44551e

Browse files
committed
Merge branch 'mockito-3.4/3.2.0.x' of https://github.com/diversit/scalatestplus-mockito into mockito-3.4/3.2.1.x
2 parents ca295f3 + 30981c7 commit f44551e

File tree

3 files changed

+35
-21
lines changed

3 files changed

+35
-21
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*.class
22
*.log
33
target/
4-
_site/
4+
_site/
5+
.idea/

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ ScalaTest + Mockito provides integration support between ScalaTest and Mockito.
33

44
**Usage**
55

6-
To use it for ScalaTest 3.2.1 and Mockito 3.3.x:
6+
To use it for ScalaTest 3.2.1 and Mockito 3.4.x:
77

88
SBT:
99

1010
```
11-
libraryDependencies += "org.scalatestplus" %% "mockito-3-3" % "3.2.1.0" % "test"
11+
libraryDependencies += "org.scalatestplus" %% "mockito-3-4" % "3.2.1.0" % "test"
1212
```
1313

1414
Maven:
1515

1616
```
1717
<dependency>
1818
<groupId>org.scalatestplus</groupId>
19-
<artifactId>mockito-3-3</artifactId>
19+
<artifactId>mockito-3-4</artifactId>
2020
<version>3.2.1.0</version>
2121
<scope>test</scope>
2222
</dependency>

build.sbt

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
name := "mockito-3.3"
1+
name := "mockito-3.4"
22

33
organization := "org.scalatestplus"
44

55
version := "3.2.1.0"
66

77
homepage := Some(url("https://github.com/scalatest/scalatestplus-mockito"))
88

9-
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
9+
licenses := List(
10+
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
11+
)
1012

1113
developers := List(
1214
Developer(
@@ -26,12 +28,14 @@ developers := List(
2628
crossScalaVersions := List("2.10.7", "2.11.12", "2.12.12", "2.13.3", "0.26.0-RC1")
2729

2830
libraryDependencies ++= Seq(
29-
"org.mockito" % "mockito-core" % "3.3.3",
30-
"org.scalatest" %% "scalatest-core" % "3.2.1",
31+
"org.mockito" % "mockito-core" % "3.4.6",
32+
"org.scalatest" %% "scalatest-core" % "3.2.1",
3133
"org.scalatest" %% "scalatest-funsuite" % "3.2.1" % "test"
3234
)
3335

34-
Test / scalacOptions ++= (if (isDotty.value) Seq("-language:implicitConversions") else Nil)
36+
Test / scalacOptions ++= (if (isDotty.value)
37+
Seq("-language:implicitConversions")
38+
else Nil)
3539

3640
import scala.xml.{Node => XmlNode, NodeSeq => XmlNodeSeq, _}
3741
import scala.xml.transform.{RewriteRule, RuleTransformer}
@@ -40,10 +44,19 @@ import scala.xml.transform.{RewriteRule, RuleTransformer}
4044
pomPostProcess := { (node: XmlNode) =>
4145
new RuleTransformer(new RewriteRule {
4246
override def transform(node: XmlNode): XmlNodeSeq = node match {
43-
case e: Elem if e.label == "dependency"
44-
&& e.child.exists(child => child.label == "scope") =>
45-
def txt(label: String): String = "\"" + e.child.filter(_.label == label).flatMap(_.text).mkString + "\""
46-
Comment(s""" scoped dependency ${txt("groupId")} % ${txt("artifactId")} % ${txt("version")} % ${txt("scope")} has been omitted """)
47+
case e: Elem
48+
if e.label == "dependency"
49+
&& e.child.exists(child => child.label == "scope") =>
50+
def txt(label: String): String =
51+
"\"" + e.child
52+
.filter(_.label == label)
53+
.flatMap(_.text)
54+
.mkString + "\""
55+
Comment(
56+
s""" scoped dependency ${txt("groupId")} % ${txt("artifactId")} % ${txt(
57+
"version"
58+
)} % ${txt("scope")} has been omitted """
59+
)
4760
case _ => node
4861
}
4962
}).transform(node).head
@@ -53,18 +66,16 @@ enablePlugins(SbtOsgi)
5366

5467
osgiSettings
5568

56-
OsgiKeys.exportPackage := Seq(
57-
"org.scalatestplus.mockito.*"
58-
)
69+
OsgiKeys.exportPackage := Seq("org.scalatestplus.mockito.*")
5970

6071
OsgiKeys.importPackage := Seq(
6172
"org.scalatest.*",
62-
"org.scalactic.*",
63-
"scala.*;version=\"$<range;[==,=+);$<replace;"+scalaBinaryVersion.value+";-;.>>\"",
73+
"org.scalactic.*",
74+
"scala.*;version=\"$<range;[==,=+);$<replace;" + scalaBinaryVersion.value + ";-;.>>\"",
6475
"*;resolution:=optional"
6576
)
6677

67-
OsgiKeys.additionalHeaders:= Map(
78+
OsgiKeys.additionalHeaders := Map(
6879
"Bundle-Name" -> "ScalaTestPlusMockito",
6980
"Bundle-Description" -> "ScalaTest+Mockito is an open-source integration library between ScalaTest and Mockito for Scala projects.",
7081
"Bundle-DocURL" -> "http://www.scalatest.org/",
@@ -80,7 +91,9 @@ publishMavenStyle := true
8091

8192
publishArtifact in Test := false
8293

83-
pomIncludeRepository := { _ => false }
94+
pomIncludeRepository := { _ =>
95+
false
96+
}
8497

8598
pomExtra := (
8699
<scm>
@@ -92,4 +105,4 @@ pomExtra := (
92105
</scm>
93106
)
94107

95-
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")
108+
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")

0 commit comments

Comments
 (0)