Skip to content

Commit

Permalink
Merge branch 'feature-3.2.0.0' into scalacheck-1.14/3.2.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
bvenners committed Jun 19, 2020
2 parents d6907e1 + 9e22001 commit 27b8fb1
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 83 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.log
target
.idea/
_site/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Please use the following commands to publish to Sonatype:
```
$ export SCALAJS_VERSION=0.6.33
$ sbt clean +scalatestPlusScalaCheckJS/publishSigned +scalatestPlusScalaCheckJVM/publishSigned scalatestPlusScalaCheckNative/publishSigned
$ export SCALAJS_VERSION=1.0.1
$ export SCALAJS_VERSION=1.1.0
$ sbt ++2.11.12 "project scalatestPlusScalaCheckJS" clean publishSigned
$ sbt ++2.12.11 "project scalatestPlusScalaCheckJS" clean publishSigned
$ sbt ++2.13.2 "project scalatestPlusScalaCheckJS" clean publishSigned
Expand Down
20 changes: 14 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ val sharedSettings = Seq(
url("https://github.com/cheeseng")
)
),
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
libraryDependencies ++= Seq(
"org.scalatest" %%% "scalatest-core" % "3.2.0",
"org.scalacheck" %%% "scalacheck" % "1.14.3",
("org.scalacheck" %%% "scalacheck" % "1.14.3").withDottyCompat(scalaVersion.value),
"org.scalatest" %%% "scalatest-shouldmatchers" % "3.2.0" % "test",
"org.scalatest" %%% "scalatest-funspec" % "3.2.0" % "test",
"org.scalatest" %%% "scalatest-funsuite" % "3.2.0" % "test"
Expand Down Expand Up @@ -60,9 +60,16 @@ val sharedSettings = Seq(
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),
pgpSecretRing := file((Path.userHome / ".gnupg" / "secring.gpg").getAbsolutePath),
pgpPassphrase := None
pomExtra := (
<scm>
<url>https://github.com/scalatest/scalatestplus-scalacheck</url>
<connection>scm:git:git@github.com:scalatest/scalatestplus-scalacheck.git</connection>
<developerConnection>
scm:git:git@github.com:scalatest/scalatestplus-scalacheck.git
</developerConnection>
</scm>
),
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")
)

lazy val scalatestPlusScalaCheck =
Expand Down Expand Up @@ -98,7 +105,8 @@ lazy val scalatestPlusScalaCheck =
}
)
.jvmSettings(
crossScalaVersions := List("2.10.7", "2.11.12", "2.12.11", "2.13.2"),
crossScalaVersions := List("2.10.7", "2.11.12", "2.12.11", "2.13.2", "0.24.0"),
Test / scalacOptions ++= (if (isDotty.value) Seq("-language:implicitConversions") else Nil),
sourceGenerators in Compile += {
Def.task {
GenResourcesJVM.genResources((sourceManaged in Compile).value / "org" / "scalatestplus" / "scalacheck", version.value, scalaVersion.value) ++
Expand Down
10 changes: 5 additions & 5 deletions project/GenResources.scala
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ object GenResourcesJVM extends GenResources {
|
|def bigProblems(ex: Throwable): String = {
| val message = if (ex.getMessage == null) "" else ex.getMessage.trim
| if (message.length > 0) Resources.bigProblemsWithMessage(message) else Resources.bigProblems
| if (message.length > 0) Resources.bigProblemsWithMessage(message) else Resources.bigProblems()
|}
|}
""".stripMargin
Expand Down Expand Up @@ -188,7 +188,7 @@ object GenResourcesJSVM extends GenResources {
|
|def bigProblems(ex: Throwable): String = {
| val message = if (ex.getMessage == null) "" else ex.getMessage.trim
| if (message.length > 0) Resources.bigProblemsWithMessage(message) else Resources.bigProblems
| if (message.length > 0) Resources.bigProblemsWithMessage(message) else Resources.bigProblems()
|}
|}
""".stripMargin
Expand All @@ -209,7 +209,7 @@ object GenResourcesJSVM extends GenResources {
"final val raw" + kv.key.capitalize + " = \"" + kv.value.replaceAllLiterally("\"", "\\\"").replaceAllLiterally("''", "'") + "\"\n\n" +
(
if (paramCount == 0 )
"final val " + kv.key + " = raw" + kv.key.capitalize
"final def " + kv.key + "() = raw" + kv.key.capitalize
else
"def " + kv.key + "(" + (for (i <- 0 until paramCount) yield s"param$i: Any").mkString(", ") + "): String = \n" +
" raw" + kv.key.capitalize + (for (i <- 0 until paramCount) yield ".replaceAllLiterally(\"{" + i + "}\", param" + i + " + \"\")").mkString + "\n"
Expand All @@ -223,11 +223,11 @@ object GenResourcesJSVM extends GenResources {

def failureMessagesKeyValueTemplate(kv: KeyValue, paramCount: Int): String =
if (paramCount == 0)
"final val " + kv.key + " = Resources." + kv.key
"final def " + kv.key + "() = Resources." + kv.key
else
"object " + kv.key + " { \ndef apply(" + (if (paramCount == 0) "" else "prettifier: org.scalactic.Prettifier, ") + (for (i <- 0 until paramCount) yield s"param$i: Any").mkString(", ") + "): String = \n" +
" Resources." + kv.key + "(" + (for (i <- 0 until paramCount) yield s"decorateToStringValue(prettifier, param$i)").mkString(", ") + ")" + "\n" +
"}"
//"def " + kv.key + "(" + (for (i <- 0 until paramCount) yield s"param$i: Any").mkString(", ") + "): String = Resources." + kv.key + "(" + (for (i <- 0 until paramCount) yield s"decorateToStringValue(param$i)").mkString(", ") + ")"

}
}
Loading

0 comments on commit 27b8fb1

Please sign in to comment.