Skip to content

Commit ad84ea0

Browse files
committed
Merge branch 'cheeseng-feature-3.1.0-RC1' into 3.1.x
2 parents 60bed21 + 81f311e commit ad84ea0

File tree

17 files changed

+264
-54
lines changed

17 files changed

+264
-54
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ Before publishing any patch release, binary compatibility with previous version
157157

158158
To publish scalactic, scalatest and scalatest-app use the following command:
159159

160+
$ sbt scalatestCompatible/clean scalatestCompatible/publishSigned
160161
$ export SCALAJS_VERSION=0.6.28
161162
$ sbt ++2.10.7 clean publishSigned "project scalatestAppJS" clean publishSigned
162163
$ sbt ++2.11.12 clean publishSigned "project scalatestAppJS" clean publishSigned
@@ -168,10 +169,11 @@ To publish scalactic, scalatest and scalatest-app use the following command:
168169
$ sbt ++2.12.6 "project scalatestAppJS" clean publishSigned
169170
$ export SCALAJS_VERSION=1.0.0-M8
170171
$ sbt ++2.13.0 "project scalatestAppJS" clean publishSigned
172+
$ sbt scalacticDotty/clean scalacticDotty/publishSigned
173+
$ sbt scalatestDotty/clean scalatestDotty/publishSigned
171174

172175
To publish scalatest modules for jvm, use the following commands:
173176

174-
$ sbt scalatestCompatible/clean scalatestCompatible/publishSigned
175177
$ sbt scalatestModules/clean
176178
$ sbt +scalatestModules/publishSigned
177179

build.sbt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ lazy val scalatestFeatureSpec = ScalatestBuild.scalatestFeatureSpec
5353
lazy val scalatestFlatSpec = ScalatestBuild.scalatestFlatSpec
5454
lazy val scalatestFreeSpec = ScalatestBuild.scalatestFreeSpec
5555
lazy val scalatestFunSuite = ScalatestBuild.scalatestFunSuite
56+
lazy val scalatestFunSpec = ScalatestBuild.scalatestFunSpec
5657
lazy val scalatestPropSpec = ScalatestBuild.scalatestPropSpec
5758
lazy val scalatestRefSpec = ScalatestBuild.scalatestRefSpec
5859
lazy val scalatestWordSpec = ScalatestBuild.scalatestWordSpec
@@ -66,6 +67,7 @@ lazy val scalatestFeatureSpecJS = ScalatestBuild.scalatestFeatureSpecJS
6667
lazy val scalatestFlatSpecJS = ScalatestBuild.scalatestFlatSpecJS
6768
lazy val scalatestFreeSpecJS = ScalatestBuild.scalatestFreeSpecJS
6869
lazy val scalatestFunSuiteJS = ScalatestBuild.scalatestFunSuiteJS
70+
lazy val scalatestFunSpecJS = ScalatestBuild.scalatestFunSpecJS
6971
lazy val scalatestPropSpecJS = ScalatestBuild.scalatestPropSpecJS
7072
lazy val scalatestWordSpecJS = ScalatestBuild.scalatestWordSpecJS
7173
lazy val scalatestDiagramsJS = ScalatestBuild.scalatestDiagramsJS
@@ -78,6 +80,7 @@ lazy val scalatestFeatureSpecNative = ScalatestBuild.scalatestFeatureSpecNative
7880
lazy val scalatestFlatSpecNative = ScalatestBuild.scalatestFlatSpecNative
7981
lazy val scalatestFreeSpecNative = ScalatestBuild.scalatestFreeSpecNative
8082
lazy val scalatestFunSuiteNative = ScalatestBuild.scalatestFunSuiteNative
83+
lazy val scalatestFunSpecNative = ScalatestBuild.scalatestFunSpecNative
8184
lazy val scalatestPropSpecNative = ScalatestBuild.scalatestPropSpecNative
8285
lazy val scalatestWordSpecNative = ScalatestBuild.scalatestWordSpecNative
8386
lazy val scalatestDiagramsNative = ScalatestBuild.scalatestDiagramsNative
@@ -90,6 +93,7 @@ lazy val scalatestFeatureSpecDotty = ScalatestBuild.scalatestFeatureSpecDotty
9093
lazy val scalatestFlatSpecDotty = ScalatestBuild.scalatestFlatSpecDotty
9194
lazy val scalatestFreeSpecDotty = ScalatestBuild.scalatestFreeSpecDotty
9295
lazy val scalatestFunSuiteDotty = ScalatestBuild.scalatestFunSuiteDotty
96+
lazy val scalatestFunSpecDotty = ScalatestBuild.scalatestFunSpecDotty
9397
lazy val scalatestPropSpecDotty = ScalatestBuild.scalatestPropSpecDotty
9498
lazy val scalatestRefSpecDotty = ScalatestBuild.scalatestRefSpecDotty
9599
lazy val scalatestWordSpecDotty = ScalatestBuild.scalatestWordSpecDotty

project/BuildCommons.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ trait BuildCommons {
77

88
lazy val supportedScalaVersions = List("2.13.0", "2.12.9", "2.11.12", "2.10.7")
99

10-
val releaseVersion = "3.1.0-M1"
10+
val releaseVersion = "3.1.0-RC1"
1111

1212
val previousReleaseVersion = "3.0.8"
1313

project/DottyBuild.scala

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ trait DottyBuild { this: BuildCommons =>
181181
"Bundle-Vendor" -> "Artima, Inc.",
182182
"Main-Class" -> "org.scalatest.tools.Runner"
183183
)
184-
).dependsOn(scalacticDotty)
184+
).dependsOn(scalatestCompatible, scalacticDotty)
185185

186186
lazy val scalatestCoreDotty = Project("scalatestCoreDotty", file("modules/dotty/scalatest-core"))
187187
.enablePlugins(SbtOsgi)
@@ -386,6 +386,36 @@ trait DottyBuild { this: BuildCommons =>
386386
)
387387
).dependsOn(scalatestCoreDotty)
388388

389+
lazy val scalatestFunSpecDotty = Project("scalatestFunSpecDotty", file("modules/dotty/scalatest-funspec"))
390+
.enablePlugins(SbtOsgi)
391+
.settings(sharedSettings: _*)
392+
.settings(dottySettings: _*)
393+
.settings(
394+
projectTitle := "ScalaTest FunSpec Dotty",
395+
organization := "org.scalatest",
396+
moduleName := "scalatest-funspec",
397+
sourceGenerators in Compile += {
398+
Def.task {
399+
GenModulesDotty.genScalaTestFunSpec((sourceManaged in Compile).value, version.value, scalaVersion.value)
400+
}.taskValue
401+
},
402+
publishArtifact in (Compile, packageDoc) := false, // Temporary disable publishing of doc, can't get it to build.
403+
).settings(osgiSettings: _*).settings(
404+
OsgiKeys.exportPackage := Seq(
405+
"org.scalatest.funspec"
406+
),
407+
OsgiKeys.importPackage := Seq(
408+
"org.scalatest.*",
409+
"*;resolution:=optional"
410+
),
411+
OsgiKeys.additionalHeaders:= Map(
412+
"Bundle-Name" -> "ScalaTest FunSpec Dotty",
413+
"Bundle-Description" -> "ScalaTest is an open-source test framework for the Javascript Platform designed to increase your productivity by letting you write fewer lines of test code that more clearly reveal your intent.",
414+
"Bundle-DocURL" -> "http://www.scalatest.org/",
415+
"Bundle-Vendor" -> "Artima, Inc."
416+
)
417+
).dependsOn(scalatestCoreDotty)
418+
389419
lazy val scalatestPropSpecDotty = Project("scalatestPropSpecDotty", file("modules/dotty/scalatest-propspec"))
390420
.enablePlugins(SbtOsgi)
391421
.settings(sharedSettings: _*)
@@ -612,6 +642,7 @@ trait DottyBuild { this: BuildCommons =>
612642
scalatestFlatSpecDotty,
613643
scalatestFreeSpecDotty,
614644
scalatestFunSuiteDotty,
645+
scalatestFunSpecDotty,
615646
scalatestPropSpecDotty,
616647
scalatestRefSpecDotty,
617648
scalatestWordSpecDotty,

project/GenModules.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ object GenModules {
3434
}
3535
}
3636

37-
def genScalaTestCompatible(targetDir: File, version: String, scalaVersion: String): Seq[File] = {
38-
copyDir("scalatest/src/main/java/org/scalatest/compatible", "org/scalatest/compatible", targetDir,List.empty)
39-
}
40-
4137
def genScalaTestCore(targetDir: File, version: String, scalaVersion: String): Seq[File] = {
4238
copyDir("scalatest/src/main/scala/org/scalatest", "org/scalatest", targetDir,
4339
List("package.scala")
@@ -77,6 +73,9 @@ object GenModules {
7773
def genScalaTestFunSuite(targetDir: File, version: String, scalaVersion: String): Seq[File] =
7874
copyDir("scalatest/src/main/scala/org/scalatest/funsuite", "org/scalatest/funsuite", targetDir, List.empty)
7975

76+
def genScalaTestFunSpec(targetDir: File, version: String, scalaVersion: String): Seq[File] =
77+
copyDir("scalatest/src/main/scala/org/scalatest/funspec", "org/scalatest/funspec", targetDir, List.empty)
78+
8079
def genScalaTestPropSpec(targetDir: File, version: String, scalaVersion: String): Seq[File] =
8180
copyDir("scalatest/src/main/scala/org/scalatest/propspec", "org/scalatest/propspec", targetDir, List.empty)
8281

project/GenModulesDotty.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,15 @@ object GenModulesDotty {
121121
copyDir("scalatest/src/main/scala/" + packagePath, packagePath, targetDir, skipList)
122122
}.toList
123123

124+
def genScalaTestFunSpec(targetDir: File, version: String, scalaVersion: String): Seq[File] =
125+
GenScalaTestDotty.genScalaPackages.filter { case (packagePath, skipList) =>
126+
List(
127+
"org/scalatest/funspec"
128+
).contains(packagePath)
129+
}.flatMap { case (packagePath, skipList) =>
130+
copyDir("scalatest/src/main/scala/" + packagePath, packagePath, targetDir, skipList)
131+
}.toList
132+
124133
def genScalaTestPropSpec(targetDir: File, version: String, scalaVersion: String): Seq[File] =
125134
GenScalaTestDotty.genScalaPackages.filter { case (packagePath, skipList) =>
126135
List(

project/GenModulesJS.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,15 @@ object GenModulesJS {
119119
copyDir("scalatest/src/main/scala/" + packagePath, packagePath, targetDir, skipList)
120120
}.toList
121121

122+
def genScalaTestFunSpec(targetDir: File, version: String, scalaVersion: String): Seq[File] =
123+
GenScalaTestJS.genScalaPackages.filter { case (packagePath, skipList) =>
124+
List(
125+
"org/scalatest/funspec"
126+
).contains(packagePath)
127+
}.flatMap { case (packagePath, skipList) =>
128+
copyDir("scalatest/src/main/scala/" + packagePath, packagePath, targetDir, skipList)
129+
}.toList
130+
122131
def genScalaTestPropSpec(targetDir: File, version: String, scalaVersion: String): Seq[File] =
123132
GenScalaTestJS.genScalaPackages.filter { case (packagePath, skipList) =>
124133
List(

project/GenModulesNative.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,15 @@ object GenModulesNative {
112112
copyDir("scalatest/src/main/scala/" + packagePath, packagePath, targetDir, skipList)
113113
}.toList
114114

115+
def genScalaTestFunSpec(targetDir: File, version: String, scalaVersion: String): Seq[File] =
116+
GenScalaTestNative.genScalaPackages.filter { case (packagePath, skipList) =>
117+
List(
118+
"org/scalatest/funspec"
119+
).contains(packagePath)
120+
}.flatMap { case (packagePath, skipList) =>
121+
copyDir("scalatest/src/main/scala/" + packagePath, packagePath, targetDir, skipList)
122+
}.toList
123+
115124
def genScalaTestPropSpec(targetDir: File, version: String, scalaVersion: String): Seq[File] =
116125
GenScalaTestNative.genScalaPackages.filter { case (packagePath, skipList) =>
117126
List(

project/GenScalaTestDotty.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ object GenScalaTestDotty {
117117
"DoNotDiscover.java",
118118
"Ignore.java"
119119
)) ++
120-
copyDir("scalatest/src/main/java/org/scalatest/compatible", "org/scalatest/compatible", targetDir, List.empty) ++
121120
copyDir("scalatest/src/main/java/org/scalatest/tags", "org/scalatest/tags", targetDir, List.empty)
122121
}
123122

project/JsBuild.scala

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ trait JsBuild { this: BuildCommons =>
514514
"Bundle-DocURL" -> "http://www.scalatest.org/",
515515
"Bundle-Vendor" -> "Artima, Inc."
516516
)
517-
).dependsOn(scalatestCoreJS).enablePlugins(ScalaJSPlugin)
517+
).dependsOn(scalatestCoreJS, scalacticMacroJS % "compile-internal, test-internal").enablePlugins(ScalaJSPlugin)
518518

519519
lazy val scalatestFlatSpecJS = Project("scalatestFlatSpecJS", file("modules/js/scalatest-flatspec.js"))
520520
.enablePlugins(SbtOsgi)
@@ -546,7 +546,7 @@ trait JsBuild { this: BuildCommons =>
546546
"Bundle-DocURL" -> "http://www.scalatest.org/",
547547
"Bundle-Vendor" -> "Artima, Inc."
548548
)
549-
).dependsOn(scalatestCoreJS).enablePlugins(ScalaJSPlugin)
549+
).dependsOn(scalatestCoreJS, scalacticMacroJS % "compile-internal, test-internal").enablePlugins(ScalaJSPlugin)
550550

551551
lazy val scalatestFreeSpecJS = Project("scalatestFreeSpecJS", file("modules/js/scalatest-freespec.js"))
552552
.enablePlugins(SbtOsgi)
@@ -578,7 +578,7 @@ trait JsBuild { this: BuildCommons =>
578578
"Bundle-DocURL" -> "http://www.scalatest.org/",
579579
"Bundle-Vendor" -> "Artima, Inc."
580580
)
581-
).dependsOn(scalatestCoreJS).enablePlugins(ScalaJSPlugin)
581+
).dependsOn(scalatestCoreJS, scalacticMacroJS % "compile-internal, test-internal").enablePlugins(ScalaJSPlugin)
582582

583583
lazy val scalatestFunSuiteJS = Project("scalatestFunSuiteJS", file("modules/js/scalatest-funsuite.js"))
584584
.enablePlugins(SbtOsgi)
@@ -610,7 +610,39 @@ trait JsBuild { this: BuildCommons =>
610610
"Bundle-DocURL" -> "http://www.scalatest.org/",
611611
"Bundle-Vendor" -> "Artima, Inc."
612612
)
613-
).dependsOn(scalatestCoreJS).enablePlugins(ScalaJSPlugin)
613+
).dependsOn(scalatestCoreJS, scalacticMacroJS % "compile-internal, test-internal").enablePlugins(ScalaJSPlugin)
614+
615+
lazy val scalatestFunSpecJS = Project("scalatestFunSpecJS", file("modules/js/scalatest-funspec.js"))
616+
.enablePlugins(SbtOsgi)
617+
.settings(sharedSettings: _*)
618+
.settings(
619+
projectTitle := "ScalaTest FunSpec JS",
620+
organization := "org.scalatest",
621+
name := "scalatest-funspec",
622+
scalacOptions ++= Seq("-P:scalajs:mapSourceURI:" + rootProject.base.toURI + "->https://raw.githubusercontent.com/scalatest/scalatest/v" + version.value + "/"),
623+
Compile / sourceGenerators += {
624+
Def.task {
625+
GenModulesJS.genScalaTestFunSpec((sourceManaged in Compile).value / "scala", version.value, scalaVersion.value)
626+
}
627+
},
628+
scalacOptions ++= (if (scalaBinaryVersion.value == "2.10" || scalaVersion.value.startsWith("2.13")) Seq.empty[String] else Seq("-Ypartial-unification")),
629+
mimaPreviousArtifacts := Set(organization.value %%% moduleName.value % previousReleaseVersion),
630+
mimaCurrentClassfiles := (classDirectory in Compile).value.getParentFile / (moduleName.value + "_" + "sjs0.6_" + scalaBinaryVersion.value + "-" + releaseVersion + ".jar")
631+
).settings(osgiSettings: _*).settings(
632+
OsgiKeys.exportPackage := Seq(
633+
"org.scalatest.funspec"
634+
),
635+
OsgiKeys.importPackage := Seq(
636+
"org.scalatest.*",
637+
"*;resolution:=optional"
638+
),
639+
OsgiKeys.additionalHeaders:= Map(
640+
"Bundle-Name" -> "ScalaTest FunSpec JS",
641+
"Bundle-Description" -> "ScalaTest.js is an open-source test framework for the Javascript Platform designed to increase your productivity by letting you write fewer lines of test code that more clearly reveal your intent.",
642+
"Bundle-DocURL" -> "http://www.scalatest.org/",
643+
"Bundle-Vendor" -> "Artima, Inc."
644+
)
645+
).dependsOn(scalatestCoreJS, scalacticMacroJS % "compile-internal, test-internal").enablePlugins(ScalaJSPlugin)
614646

615647
lazy val scalatestPropSpecJS = Project("scalatestPropSpecJS", file("modules/js/scalatest-propspec.js"))
616648
.enablePlugins(SbtOsgi)
@@ -642,7 +674,7 @@ trait JsBuild { this: BuildCommons =>
642674
"Bundle-DocURL" -> "http://www.scalatest.org/",
643675
"Bundle-Vendor" -> "Artima, Inc."
644676
)
645-
).dependsOn(scalatestCoreJS).enablePlugins(ScalaJSPlugin)
677+
).dependsOn(scalatestCoreJS, scalacticMacroJS % "compile-internal, test-internal").enablePlugins(ScalaJSPlugin)
646678

647679
lazy val scalatestWordSpecJS = Project("scalatestWordSpecJS", file("modules/js/scalatest-wordspec.js"))
648680
.enablePlugins(SbtOsgi)
@@ -674,7 +706,7 @@ trait JsBuild { this: BuildCommons =>
674706
"Bundle-DocURL" -> "http://www.scalatest.org/",
675707
"Bundle-Vendor" -> "Artima, Inc."
676708
)
677-
).dependsOn(scalatestCoreJS).enablePlugins(ScalaJSPlugin)
709+
).dependsOn(scalatestCoreJS, scalacticMacroJS % "compile-internal, test-internal").enablePlugins(ScalaJSPlugin)
678710

679711
lazy val scalatestDiagramsJS = Project("scalatestDiagramsJS", file("modules/js/scalatest-diagrams.js"))
680712
.enablePlugins(SbtOsgi)
@@ -819,6 +851,7 @@ trait JsBuild { this: BuildCommons =>
819851
scalatestFlatSpecJS,
820852
scalatestFreeSpecJS,
821853
scalatestFunSuiteJS,
854+
scalatestFunSpecJS,
822855
scalatestPropSpecJS,
823856
scalatestWordSpecJS,
824857
scalatestDiagramsJS,

0 commit comments

Comments
 (0)