@@ -183,6 +183,89 @@ trait DottyBuild { this: BuildCommons =>
183
183
)
184
184
).dependsOn(scalacticDotty)
185
185
186
+ lazy val scalatestCoreDotty = Project (" scalatestCoreDotty" , file(" modules/dotty/scalatest-core" ))
187
+ .enablePlugins(SbtOsgi )
188
+ .settings(sharedSettings : _* )
189
+ .settings(dottySettings : _* )
190
+ .settings(
191
+ projectTitle := " ScalaTest" ,
192
+ organization := " org.scalatest" ,
193
+ moduleName := " scalatest-core" ,
194
+ initialCommands in console := """ |import org.scalatest._
195
+ |import org.scalactic._
196
+ |import Matchers._""" .stripMargin,
197
+ libraryDependencies ++= scalaXmlDependency(scalaVersion.value),
198
+ libraryDependencies ++= scalatestLibraryDependencies,
199
+ sourceGenerators in Compile += {
200
+ Def .task {
201
+ GenModulesDotty .genScalaTestCore((sourceManaged in Compile ).value, version.value, scalaVersion.value) ++
202
+ GenVersions .genScalaTestVersions((sourceManaged in Compile ).value / " org" / " scalatest" , version.value, scalaVersion.value) ++
203
+ ScalaTestGenResourcesJVM .genResources((sourceManaged in Compile ).value / " org" / " scalatest" , version.value, scalaVersion.value) ++
204
+ ScalaTestGenResourcesJVM .genFailureMessages((sourceManaged in Compile ).value / " org" / " scalatest" , version.value, scalaVersion.value) ++
205
+ GenConfigMap .genMain((sourceManaged in Compile ).value / " org" / " scalatest" , version.value, scalaVersion.value)
206
+ }.taskValue
207
+ },
208
+ javaSourceManaged := target.value / " java" ,
209
+ managedSourceDirectories in Compile += javaSourceManaged.value,
210
+ sourceGenerators in Compile += {
211
+ Def .task{
212
+ GenScalaTestDotty .genJava((javaSourceManaged in Compile ).value, version.value, scalaVersion.value)
213
+ }.taskValue
214
+ },
215
+ resourceGenerators in Compile += {
216
+ Def .task {
217
+ GenScalaTestDotty .genHtml((resourceManaged in Compile ).value, version.value, scalaVersion.value)
218
+ }.taskValue
219
+ },
220
+ sourceGenerators in Compile += {
221
+ Def .task{
222
+ GenTable .genMain((sourceManaged in Compile ).value / " org" / " scalatest" , version.value, scalaVersion.value) ++
223
+ GenCompatibleClasses .genMain((sourceManaged in Compile ).value / " org" / " scalatest" / " tools" , version.value, scalaVersion.value)
224
+ // GenSafeStyles.genMain((sourceManaged in Compile).value / "org" / "scalatest", version.value, scalaVersion.value)
225
+ }.taskValue
226
+ },
227
+ // scalatestJSDocTaskSetting,
228
+ publishArtifact in (Compile , packageDoc) := false , // Temporary disable publishing of doc, can't get it to build.
229
+ mimaPreviousArtifacts := Set (organization.value %% name.value % previousReleaseVersion),
230
+ mimaCurrentClassfiles := (classDirectory in Compile ).value.getParentFile / (name.value + " _" + scalaBinaryVersion.value + " -" + releaseVersion + " .jar" ),
231
+ mimaBinaryIssueFilters ++= {
232
+ Seq (
233
+ exclude[MissingClassProblem ](" org.scalatest.tools.SbtCommandParser$" ),
234
+ exclude[MissingClassProblem ](" org.scalatest.tools.SbtCommandParser" )
235
+ )
236
+ }
237
+ ).settings(osgiSettings : _* ).settings(
238
+ OsgiKeys .exportPackage := Seq (
239
+ " org.scalatest" ,
240
+ " org.scalatest.concurrent" ,
241
+ " org.scalatest.enablers" ,
242
+ " org.scalatest.exceptions" ,
243
+ " org.scalatest.events" ,
244
+ " org.scalatest.fixture" ,
245
+ " org.scalatest.prop" ,
246
+ " org.scalatest.tags" ,
247
+ " org.scalatest.tagobjects" ,
248
+ " org.scalatest.time" ,
249
+ " org.scalatest.tools" ,
250
+ " org.scalatest.verbs"
251
+ ),
252
+ OsgiKeys .importPackage := Seq (
253
+ " org.scalatest.*" ,
254
+ " org.scalactic.*" ,
255
+ " scala.util.parsing.*;version=\" $<range;[==,=+);$<replace;1.0.4;-;.>>\" " ,
256
+ " scala.xml.*;version=\" $<range;[==,=+);$<replace;1.0.4;-;.>>\" " ,
257
+ " scala.*;version=\" $<range;[==,=+);$<replace;" + scalaBinaryVersion.value+ " ;-;.>>\" " ,
258
+ " *;resolution:=optional"
259
+ ),
260
+ OsgiKeys .additionalHeaders:= Map (
261
+ " Bundle-Name" -> " ScalaTest" ,
262
+ " 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." ,
263
+ " Bundle-DocURL" -> " http://www.scalatest.org/" ,
264
+ " Bundle-Vendor" -> " Artima, Inc." ,
265
+ " Main-Class" -> " org.scalatest.tools.Runner"
266
+ )
267
+ ).dependsOn(/* scalatestCompatible, */ scalacticDotty)
268
+
186
269
lazy val commonTestDotty = Project (" commonTestDotty" , file(" common-test.dotty" ))
187
270
.settings(sharedSettings : _* )
188
271
.settings(dottySettings : _* )
0 commit comments