Skip to content

Commit 91400bf

Browse files
committed
Merge branch 'cheeseng-feature-3.1.0-M1-adjustments' into 3.1.x
2 parents 0aa543c + 9446b15 commit 91400bf

File tree

5 files changed

+44
-11
lines changed

5 files changed

+44
-11
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,30 @@ To publish scalactic, scalatest and scalatest-app use the following command:
168168
$ sbt ++2.12.6 "project scalatestAppJS" clean publishSigned
169169
$ export SCALAJS_VERSION=1.0.0-M8
170170
$ sbt ++2.13.0 "project scalatestAppJS" clean publishSigned
171+
172+
To publish scalatest modules for jvm, use the following commands:
173+
174+
$ sbt scalatestCompatible/clean scalatestCompatible/publishSigned
175+
$ sbt scalatestModules/clean
176+
$ sbt +scalatestModules/publishSigned
177+
178+
To publish scalatest modules for js, use the following commands:
179+
180+
$ export SCALAJS_VERSION=0.6.28
181+
$ sbt scalatestModulesJS/clean
182+
$ sbt +scalatestModulesJS/publishSigned
183+
$ export SCALAJS_VERSION=1.0.0-M3
184+
$ sbt ++2.11.12 "project scalatestModulesJS" clean publishSigned
185+
$ sbt ++2.12.6 "project scalatestModulesJS" clean publishSigned
186+
$ export SCALAJS_VERSION=1.0.0-M8
187+
$ sbt ++2.13.0 "project scalatestModulesJS" clean publishSigned
188+
189+
To publish scalatest modules for native, use the following commands:
190+
191+
$ sbt ++2.11.12 scalatestModulesNative/clean
192+
$ sbt ++2.11.12 scalatestModulesNative/publishSigned
193+
194+
To publish scalatest modules for Dotty, use the following commands:
195+
196+
$ sbt scalatestModulesDotty/clean
197+
$ sbt scalatestModulesDotty/publishSigned

project/BuildCommons.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ 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-SNAP13"
10+
val releaseVersion = "3.1.0-M1"
1111

12-
val previousReleaseVersion = "3.0.5"
12+
val previousReleaseVersion = "3.0.8"
1313

1414
def rootProject: Project
1515

project/JavaTagDocumenter.scala

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ object JavaTagDocumenter {
4949

5050
topDocMat.find()
5151

52-
val bodyPat = Pattern.compile("""(?sm)(.*? @interface """ + className +
52+
val bodyPat = Pattern.compile("""(?sm)(.*? @?interface """ + className +
5353
""") *(\{.*\})""")
5454
val bodyMat = bodyPat.matcher(topDocMat.group(2))
5555

@@ -137,10 +137,14 @@ object JavaTagDocumenter {
137137
fileContents.contains(
138138
"Note: This is actually an annotation defined in Java")
139139

140+
def isMarkerAssertion(fileContents: String): Boolean =
141+
fileContents.contains(
142+
"Marker trait for ScalaTest-compatible assertion types")
143+
140144
for {
141145
srcFile <- javaSources
142146
val contents = Source.fromFile(srcFile).mkString
143-
if isAnnotation(contents)
147+
if isAnnotation(contents) || isMarkerAssertion(contents)
144148
} yield {
145149
val filename = srcFile.getName
146150
val className = filename.replaceFirst("""\.java$""", "")
@@ -155,11 +159,14 @@ object JavaTagDocumenter {
155159
val newTop = genNewTop(top)
156160
val newBody = genNewBody(body)
157161
val newContents =
158-
newTop
159-
.replaceFirst(className + "$",
160-
"trait "+ className +
161-
" extends java.lang.annotation.Annotation "+ newBody +
162-
"\n")
162+
if (isMarkerAssertion(contents))
163+
newTop.replaceAllLiterally("public interface ", "trait ")
164+
else
165+
newTop
166+
.replaceFirst(className + "$",
167+
"trait "+ className +
168+
" extends java.lang.annotation.Annotation "+ newBody +
169+
"\n")
163170

164171
if (!destFile.exists || (srcFile.lastModified > destFile.lastModified)) {
165172
createDirectory(file(destFile.getParent))

project/scalatest.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,6 @@ object ScalatestBuild extends BuildCommons with DottyBuild with NativeBuild with
10931093
publishLocal := {},
10941094
scalacOptions in (Compile, doc) := List.empty
10951095
).aggregate(
1096-
scalatestCompatible,
10971096
scalatestCore,
10981097
scalatestFeatureSpec,
10991098
scalatestFlatSpec,

scalatest/src/main/scala/org/scalatest/package.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ package object scalatest {
8383
* trait <code>Assertions</code>, which return its only instance, the <code>Succeeded</code> singleton, or throw
8484
* an exception that indicates a failed, canceled, or pending test.
8585
*/
86-
type Assertion = compatible.Assertion
86+
type Assertion = org.scalatest.compatible.Assertion
8787

8888
/**
8989
* <strong>The name <code>org.scalatest.FunSuiteLike</code> has been deprecated and will be removed in a future version of ScalaTest. Please use

0 commit comments

Comments
 (0)