Skip to content

Commit 3dc334f

Browse files
authored
Merge pull request #19 from mcsherrylabs/cross-build-scala213
Cross compile for 2.13 from 2.12.
2 parents 720916e + cf95b07 commit 3dc334f

10 files changed

Lines changed: 55 additions & 39 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ language: scala
44
scala:
55
- 2.12.10
66
- 2.11.12
7+
- 2.13.1
78
jdk:
89
- oraclejdk8
910
cache:

build.sbt

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ organization := "org.scorexfoundation"
77

88
lazy val scala212 = "2.12.10"
99
lazy val scala211 = "2.11.12"
10-
crossScalaVersions := Seq(scala212, scala211)
10+
lazy val scala213 = "2.13.1"
11+
crossScalaVersions := Seq(scala212, scala211, scala213)
1112
scalaVersion := scala212
1213

1314
javacOptions ++=
14-
"-source" :: "1.7" ::
15-
"-target" :: "1.7" ::
15+
"-source" :: "1.8" ::
16+
"-target" :: "1.8" ::
1617
Nil
1718

1819
resolvers ++= Seq("Sonatype Releases" at "https://oss.sonatype.org/content/repositories/releases/",
@@ -22,10 +23,13 @@ resolvers ++= Seq("Sonatype Releases" at "https://oss.sonatype.org/content/repos
2223
)
2324

2425
libraryDependencies ++= Seq(
25-
"org.rudogma" %% "supertagged" % "1.4",
26+
"org.rudogma" %% "supertagged" % "1.5",
2627
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.2",
27-
"org.scalatest" %% "scalatest" % "3.0.3" % "test",
28-
"org.scalacheck" %% "scalacheck" % "1.13.+" % "test"
28+
"org.scalatest" %% "scalatest" % "3.1.1" % Test,
29+
"org.scalacheck" %% "scalacheck" % "1.14.+" % Test,
30+
// https://mvnrepository.com/artifact/org.scalatestplus/scalatestplus-scalacheck
31+
"org.scalatestplus" %% "scalatestplus-scalacheck" % "3.1.0.0-RC2" % Test
32+
2933
)
3034

3135
publishMavenStyle in ThisBuild := true
@@ -44,13 +48,13 @@ pomIncludeRepository in ThisBuild := { _ => false }
4448
licenses := Seq("CC0" -> url("https://creativecommons.org/publicdomain/zero/1.0/legalcode"))
4549
homepage := Some(url("https://github.com/ScorexFoundation/scorex-util"))
4650
pomExtra :=
47-
<developers>
48-
<developer>
49-
<id>kushti</id>
50-
<name>Alexander Chepurnoy</name>
51-
<url>http://chepurnoy.org/</url>
52-
</developer>
53-
</developers>
51+
<developers>
52+
<developer>
53+
<id>kushti</id>
54+
<name>Alexander Chepurnoy</name>
55+
<url>http://chepurnoy.org/</url>
56+
</developer>
57+
</developers>
5458

5559
enablePlugins(GitVersioning)
5660

@@ -89,3 +93,4 @@ pgpPublicRing := file("ci/pubring.asc")
8993
pgpSecretRing := file("ci/secring.asc")
9094
pgpPassphrase := sys.env.get("PGP_PASSPHRASE").map(_.toArray)
9195
usePgpKeyHex("9D73AA38C08FD6AE5A51D3C11E4BF6F443599431")
96+

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
1+
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
22
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.7")
33
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.9.2")
44
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")

src/main/scala/scorex/util/encode/Base58.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ object Base58 extends BytesEncoder {
2121
if (bi > 0) {
2222
while (bi >= Base) {
2323
val (newBi, mod) = bi /% Base
24-
s.insert(0, Alphabet.charAt(mod.intValue()))
24+
s.insert(0, Alphabet.charAt(mod.intValue))
2525
bi = newBi
2626
}
27-
s.insert(0, Alphabet.charAt(bi.intValue()))
27+
s.insert(0, Alphabet.charAt(bi.intValue))
2828
}
2929
// Convert leading zeros too.
3030
input.takeWhile(_ == 0).foldLeft(s) { case (ss, _) =>

src/test/scala/scorex/ModifierIdSpec.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package scorex
22

3+
import org.scalatest.matchers.should.Matchers
4+
import org.scalatest.flatspec.AnyFlatSpec
35
import scorex.util._
4-
import org.scalatest.{FlatSpec, Matchers}
56

6-
class ModifierIdSpec extends FlatSpec with Matchers {
7+
8+
class ModifierIdSpec extends AnyFlatSpec with Matchers {
79

810
"ModifierId" should "convert to/from bytes" in {
911
val bytes = Array.fill[Byte](32)(1)

src/test/scala/scorex/util/ExtensionsSpecification.scala

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package scorex.util
22

3-
import org.scalatest.{Matchers, PropSpec}
4-
import org.scalatest.prop.{GeneratorDrivenPropertyChecks, PropertyChecks}
3+
import org.scalatest.matchers.should.Matchers
4+
import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks
55
import Extensions._
66
import org.scalacheck.Gen
7+
import org.scalatest.propspec.AnyPropSpec
78

8-
class ExtensionsSpecification extends PropSpec
9-
with GeneratorDrivenPropertyChecks
9+
class ExtensionsSpecification extends AnyPropSpec
10+
with ScalaCheckDrivenPropertyChecks
1011
with Matchers {
1112

1213
property("ByteOps.toUByte") {
@@ -103,7 +104,7 @@ class ExtensionsSpecification extends PropSpec
103104

104105
property("TraversableOps.cast") {
105106
List(1,2,3,4).cast[Int] shouldBe List(1,2,3,4)
106-
an[IllegalArgumentException] should be thrownBy List(1,"2",3,4).cast
107+
an[IllegalArgumentException] should be thrownBy List(1,"2",3,4).cast[Int]
107108
}
108109

109110
}

src/test/scala/scorex/util/encode/BytesEncoderSpecification.scala

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
package scorex.util.encode
22

3-
import org.scalatest.prop.{GeneratorDrivenPropertyChecks, PropertyChecks}
4-
import org.scalatest.{Matchers, PropSpec}
3+
import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks
4+
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
5+
import org.scalatest.matchers.should.Matchers
6+
import org.scalatest.propspec.AnyPropSpec
57

6-
trait BytesEncoderSpecification extends PropSpec
7-
with PropertyChecks
8-
with GeneratorDrivenPropertyChecks
8+
trait BytesEncoderSpecification extends AnyPropSpec
9+
with ScalaCheckPropertyChecks
10+
with ScalaCheckDrivenPropertyChecks
911
with Matchers {
1012

1113
val encoder: BytesEncoder

src/test/scala/scorex/util/encode/ZigZagSpecification.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
package scorex.util.encode
22

33
import org.scalacheck.Gen
4-
import org.scalatest.prop.PropertyChecks
5-
import org.scalatest.{Matchers, PropSpec}
4+
import org.scalatest.propspec.AnyPropSpec
5+
import org.scalatest.matchers.should.Matchers
6+
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
67
import scorex.util.Generators
78
import scorex.util.encode.ZigZagEncoder._
89

9-
class ZigZagSpecification extends PropSpec
10+
class ZigZagSpecification extends AnyPropSpec
1011
with Generators
11-
with PropertyChecks
12+
with ScalaCheckPropertyChecks
1213
with Matchers {
1314

1415
property("ZigZag encoding format") {

src/test/scala/scorex/util/serialization/ByteArrayBuilderTests.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package scorex.util.serialization
22

3-
import org.scalatest.prop.PropertyChecks
4-
import org.scalatest.{Matchers, PropSpec}
3+
4+
import org.scalatest.matchers.should.Matchers
5+
import org.scalatest.propspec.AnyPropSpec
6+
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
57
import scorex.util.ByteArrayBuilder
68

7-
class ByteArrayBuilderTests extends PropSpec with PropertyChecks with Matchers {
9+
class ByteArrayBuilderTests extends AnyPropSpec with ScalaCheckPropertyChecks with Matchers {
810

911
property("Append basic types") {
1012
val b = new ByteArrayBuilder(1)

src/test/scala/scorex/util/serialization/VLQReaderWriterSpecification.scala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
package scorex.util.serialization
22

33
import org.scalacheck.{Arbitrary, Gen}
4-
import org.scalatest.prop.PropertyChecks
5-
import org.scalatest.{Assertion, Matchers, PropSpec}
4+
import org.scalatest.Assertion
5+
import org.scalatest.propspec.AnyPropSpec
6+
import org.scalatest.matchers.should.Matchers
7+
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
68
import scorex.util.TestHelpers._
79
import scorex.util.Generators
810

9-
trait VLQReaderWriterSpecification extends PropSpec
11+
trait VLQReaderWriterSpecification extends AnyPropSpec
1012
with Generators
11-
with PropertyChecks
13+
with ScalaCheckPropertyChecks
1214
with Matchers {
1315

1416
def byteBufReader(bytes: Array[Byte]): VLQReader

0 commit comments

Comments
 (0)