Skip to content

Commit 9205d9b

Browse files
committed
Bumped up to use Scala 2.12.9, fixed scalactic-macro dependency problem and added scalatest-funspec to the modules deployment.
1 parent 91400bf commit 9205d9b

File tree

13 files changed

+183
-15
lines changed

13 files changed

+183
-15
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ Before publishing any patch release, binary compatibility with previous version
145145
$ sbt ++2.10.7 scalacticJS/package scalacticJS/mimaReportBinaryIssues
146146
$ sbt ++2.10.7 scalatestJS/package scalatestJS/mimaReportBinaryIssues
147147

148-
$ sbt ++2.12.8 scalactic/package scalactic/mimaReportBinaryIssues
149-
$ sbt ++2.12.8 scalatest/package scalatest/mimaReportBinaryIssues
150-
$ sbt ++2.12.8 scalacticJS/package scalacticJS/mimaReportBinaryIssues
151-
$ sbt ++2.12.8 scalatestJS/package scalatestJS/mimaReportBinaryIssues
148+
$ sbt ++2.12.9 scalactic/package scalactic/mimaReportBinaryIssues
149+
$ sbt ++2.12.9 scalatest/package scalatest/mimaReportBinaryIssues
150+
$ sbt ++2.12.9 scalacticJS/package scalacticJS/mimaReportBinaryIssues
151+
$ sbt ++2.12.9 scalatestJS/package scalatestJS/mimaReportBinaryIssues
152152

153153
$ sbt ++2.13.0 scalactic/package scalactic/mimaReportBinaryIssues
154154
$ sbt ++2.13.0 scalatest/package scalatest/mimaReportBinaryIssues
@@ -160,7 +160,7 @@ To publish scalactic, scalatest and scalatest-app use the following command:
160160
$ export SCALAJS_VERSION=0.6.28
161161
$ sbt ++2.10.7 clean publishSigned "project scalatestAppJS" clean publishSigned
162162
$ sbt ++2.11.12 clean publishSigned "project scalatestAppJS" clean publishSigned
163-
$ sbt ++2.12.8 "project scalatestApp" clean publishSigned "project scalatestAppJS" clean publishSigned
163+
$ sbt ++2.12.9 "project scalatestApp" clean publishSigned "project scalatestAppJS" clean publishSigned
164164
$ sbt ++2.13.0 "project scalatestApp" clean publishSigned "project scalatestAppJS" clean publishSigned
165165
$ sbt ++2.11.12 "project scalatestAppNative" clean publishSigned
166166
$ export SCALAJS_VERSION=1.0.0-M3

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.8", "2.11.12", "2.10.7")
99

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

1212
val previousReleaseVersion = "3.0.8"
1313

project/DottyBuild.scala

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ object GenModules {
7777
def genScalaTestFunSuite(targetDir: File, version: String, scalaVersion: String): Seq[File] =
7878
copyDir("scalatest/src/main/scala/org/scalatest/funsuite", "org/scalatest/funsuite", targetDir, List.empty)
7979

80+
def genScalaTestFunSpec(targetDir: File, version: String, scalaVersion: String): Seq[File] =
81+
copyDir("scalatest/src/main/scala/org/scalatest/funspec", "org/scalatest/funspec", targetDir, List.empty)
82+
8083
def genScalaTestPropSpec(targetDir: File, version: String, scalaVersion: String): Seq[File] =
8184
copyDir("scalatest/src/main/scala/org/scalatest/propspec", "org/scalatest/propspec", targetDir, List.empty)
8285

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/JsBuild.scala

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,38 @@ trait JsBuild { this: BuildCommons =>
611611
)
612612
).dependsOn(scalatestCoreJS).enablePlugins(ScalaJSPlugin)
613613

614+
lazy val scalatestFunSpecJS = Project("scalatestFunSpecJS", file("modules/js/scalatest-funspec.js"))
615+
.enablePlugins(SbtOsgi)
616+
.settings(sharedSettings: _*)
617+
.settings(
618+
projectTitle := "ScalaTest FunSpec JS",
619+
organization := "org.scalatest",
620+
name := "scalatest-funspec",
621+
scalacOptions ++= Seq("-P:scalajs:mapSourceURI:" + rootProject.base.toURI + "->https://raw.githubusercontent.com/scalatest/scalatest/v" + version.value + "/"),
622+
Compile / sourceGenerators += {
623+
Def.task {
624+
GenModulesJS.genScalaTestFunSpec((sourceManaged in Compile).value / "scala", version.value, scalaVersion.value)
625+
}
626+
},
627+
scalacOptions ++= (if (scalaBinaryVersion.value == "2.10" || scalaVersion.value.startsWith("2.13")) Seq.empty[String] else Seq("-Ypartial-unification")),
628+
mimaPreviousArtifacts := Set(organization.value %%% moduleName.value % previousReleaseVersion),
629+
mimaCurrentClassfiles := (classDirectory in Compile).value.getParentFile / (moduleName.value + "_" + "sjs0.6_" + scalaBinaryVersion.value + "-" + releaseVersion + ".jar")
630+
).settings(osgiSettings: _*).settings(
631+
OsgiKeys.exportPackage := Seq(
632+
"org.scalatest.funspec"
633+
),
634+
OsgiKeys.importPackage := Seq(
635+
"org.scalatest.*",
636+
"*;resolution:=optional"
637+
),
638+
OsgiKeys.additionalHeaders:= Map(
639+
"Bundle-Name" -> "ScalaTest FunSpec JS",
640+
"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.",
641+
"Bundle-DocURL" -> "http://www.scalatest.org/",
642+
"Bundle-Vendor" -> "Artima, Inc."
643+
)
644+
).dependsOn(scalatestCoreJS, scalacticMacroJS % "compile-internal, test-internal").enablePlugins(ScalaJSPlugin)
645+
614646
lazy val scalatestPropSpecJS = Project("scalatestPropSpecJS", file("modules/js/scalatest-propspec.js"))
615647
.enablePlugins(SbtOsgi)
616648
.settings(sharedSettings: _*)
@@ -818,6 +850,7 @@ trait JsBuild { this: BuildCommons =>
818850
scalatestFlatSpecJS,
819851
scalatestFreeSpecJS,
820852
scalatestFunSuiteJS,
853+
scalatestFunSpecJS,
821854
scalatestPropSpecJS,
822855
scalatestWordSpecJS,
823856
scalatestDiagramsJS,

project/NativeBuild.scala

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,35 @@ trait NativeBuild { this: BuildCommons =>
451451
)
452452
).dependsOn(scalatestCoreNative).enablePlugins(ScalaNativePlugin)
453453

454+
lazy val scalatestFunSpecNative = Project("scalatestFunSpecNative", file("modules/native/scalatest-funspec.native"))
455+
.enablePlugins(SbtOsgi)
456+
.settings(sharedSettings: _*)
457+
.settings(scalatestDocSettings: _*)
458+
.settings(
459+
projectTitle := "ScalaTest FunSpec Native",
460+
organization := "org.scalatest",
461+
moduleName := "scalatest-funspec",
462+
sourceGenerators in Compile += {
463+
Def.task {
464+
GenModulesNative.genScalaTestFunSpec((sourceManaged in Compile).value / "scala", version.value, scalaVersion.value)
465+
}.taskValue
466+
}
467+
).settings(osgiSettings: _*).settings(
468+
OsgiKeys.exportPackage := Seq(
469+
"org.scalatest.funspec"
470+
),
471+
OsgiKeys.importPackage := Seq(
472+
"org.scalatest.*",
473+
"*;resolution:=optional"
474+
),
475+
OsgiKeys.additionalHeaders:= Map(
476+
"Bundle-Name" -> "ScalaTest FunSpec Native",
477+
"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.",
478+
"Bundle-DocURL" -> "http://www.scalatest.org/",
479+
"Bundle-Vendor" -> "Artima, Inc."
480+
)
481+
).dependsOn(scalatestCoreNative, scalacticMacroNative % "compile-internal, test-internal").enablePlugins(ScalaNativePlugin)
482+
454483
lazy val scalatestPropSpecNative = Project("scalatestPropSpecNative", file("modules/native/scalatest-propspec.native"))
455484
.enablePlugins(SbtOsgi)
456485
.settings(sharedSettings: _*)
@@ -751,6 +780,7 @@ trait NativeBuild { this: BuildCommons =>
751780
scalatestFlatSpecNative,
752781
scalatestFreeSpecNative,
753782
scalatestFunSuiteNative,
783+
scalatestFunSpecNative,
754784
scalatestPropSpecNative,
755785
scalatestWordSpecNative,
756786
scalatestDiagramsNative,

0 commit comments

Comments
 (0)