Skip to content

Commit d0d449a

Browse files
committed
Separated org.scalatest.compatible.Assertion java class from scalatest jar, for JVM and dotty.
1 parent 0dca538 commit d0d449a

File tree

6 files changed

+67
-18
lines changed

6 files changed

+67
-18
lines changed

README.md

Lines changed: 1 addition & 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
@@ -173,7 +174,6 @@ To publish scalactic, scalatest and scalatest-app use the following command:
173174

174175
To publish scalatest modules for jvm, use the following commands:
175176

176-
$ sbt scalatestCompatible/clean scalatestCompatible/publishSigned
177177
$ sbt scalatestModules/clean
178178
$ sbt +scalatestModules/publishSigned
179179

project/DottyBuild.scala

Lines changed: 1 addition & 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)

project/GenModules.scala

Lines changed: 0 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")

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

Lines changed: 65 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,67 @@ object ScalatestBuild extends BuildCommons with DottyBuild with NativeBuild with
8989
}
9090
}
9191

92-
def sharedSettings: Seq[Setting[_]] = Seq(
92+
def commonSharedSettings: Seq[Setting[_]] = Seq(
93+
javaHome := getJavaHome(scalaBinaryVersion.value),
94+
version := releaseVersion,
95+
resolvers += "Sonatype Public" at "https://oss.sonatype.org/content/groups/public",
96+
publishTo := {
97+
val nexus = "https://oss.sonatype.org/"
98+
if (version.value.trim.endsWith("SNAPSHOT"))
99+
Some("publish-snapshots" at nexus + "content/repositories/snapshots")
100+
else
101+
Some("publish-releases" at nexus + "service/local/staging/deploy/maven2")
102+
},
103+
publishMavenStyle := true,
104+
publishArtifact in Test := false,
105+
pomIncludeRepository := { _ => false },
106+
pomExtra := (
107+
<url>http://www.scalatest.org</url>
108+
<licenses>
109+
<license>
110+
<name>the Apache License, ASL Version 2.0</name>
111+
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
112+
<distribution>repo</distribution>
113+
</license>
114+
</licenses>
115+
<scm>
116+
<url>https://github.com/scalatest/scalatest</url>
117+
<connection>scm:git:git@github.com:scalatest/scalatest.git</connection>
118+
<developerConnection>
119+
scm:git:git@github.com:scalatest/scalatest.git
120+
</developerConnection>
121+
</scm>
122+
<developers>
123+
<developer>
124+
<id>bvenners</id>
125+
<name>Bill Venners</name>
126+
<email>bill@artima.com</email>
127+
</developer>
128+
<developer>
129+
<id>gcberger</id>
130+
<name>George Berger</name>
131+
<email>george.berger@gmail.com</email>
132+
</developer>
133+
<developer>
134+
<id>cheeseng</id>
135+
<name>Chua Chee Seng</name>
136+
<email>cheeseng@amaseng.com</email>
137+
</developer>
138+
</developers>
139+
),
140+
credentials += getNexusCredentials,
141+
pgpSecretRing := file(getGPGFilePath),
142+
pgpPassphrase := getGPGPassphase
143+
)
144+
145+
def sharedSettings: Seq[Setting[_]] =
146+
commonSharedSettings ++ Seq(
147+
scalaVersion := "2.13.0",
148+
crossScalaVersions := supportedScalaVersions,
149+
libraryDependencies ++= scalaLibraries(scalaVersion.value)
150+
)
151+
152+
/*Seq(
93153
javaHome := getJavaHome(scalaBinaryVersion.value),
94154
scalaVersion := "2.13.0",
95155
crossScalaVersions := supportedScalaVersions,
@@ -149,7 +209,7 @@ object ScalatestBuild extends BuildCommons with DottyBuild with NativeBuild with
149209
credentials += getNexusCredentials,
150210
pgpSecretRing := file(getGPGFilePath),
151211
pgpPassphrase := getGPGPassphase
152-
)
212+
)*/
153213

154214
lazy val scalatestDocSettings = Seq(
155215
docsrcDirSetting,
@@ -392,7 +452,6 @@ object ScalatestBuild extends BuildCommons with DottyBuild with NativeBuild with
392452
).settings(osgiSettings: _*).settings(
393453
OsgiKeys.exportPackage := Seq(
394454
"org.scalatest",
395-
"org.scalatest.compatible",
396455
"org.scalatest.concurrent",
397456
"org.scalatest.check",
398457
"org.scalatest.diagrams",
@@ -438,7 +497,7 @@ object ScalatestBuild extends BuildCommons with DottyBuild with NativeBuild with
438497
"Bundle-Vendor" -> "Artima, Inc.",
439498
"Main-Class" -> "org.scalatest.tools.Runner"
440499
)
441-
).dependsOn(scalacticMacro % "compile-internal, test-internal", scalactic)
500+
).dependsOn(scalatestCompatible, scalacticMacro % "compile-internal, test-internal", scalactic)
442501

443502
lazy val scalatestTest = Project("scalatest-test", file("scalatest-test"))
444503
.settings(sharedSettings: _*)
@@ -543,9 +602,9 @@ object ScalatestBuild extends BuildCommons with DottyBuild with NativeBuild with
543602

544603
lazy val rootProject = scalatestApp
545604

546-
lazy val scalatestCompatible = Project("scalatestCompatible", file("modules/jvm/scalatest-compatible"))
605+
lazy val scalatestCompatible = Project("scalatestCompatible", file("scalatest-compatible"))
547606
.enablePlugins(SbtOsgi)
548-
.settings(sharedSettings: _*)
607+
.settings(commonSharedSettings: _*)
549608
.settings(scalatestDocSettings: _*)
550609
.settings(
551610
projectTitle := "ScalaTest Compatible",
@@ -561,11 +620,6 @@ object ScalatestBuild extends BuildCommons with DottyBuild with NativeBuild with
561620
Seq.empty[File]
562621
}.taskValue
563622
},
564-
sourceGenerators in Compile += {
565-
Def.task{
566-
GenModules.genScalaTestCompatible((javaSourceManaged in Compile).value, version.value, scalaVersion.value)
567-
}.taskValue
568-
},
569623
scalatestDocSettings,
570624
mimaPreviousArtifacts := Set(organization.value %% name.value % previousReleaseVersion),
571625
mimaCurrentClassfiles := (classDirectory in Compile).value.getParentFile / (name.value + "_" + scalaBinaryVersion.value + "-" + releaseVersion + ".jar")
File renamed without changes.

0 commit comments

Comments
 (0)