Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross Scala version 2.13 #68

Merged
merged 4 commits into from
Sep 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ jdk:
- openjdk8

scala:
- 2.10.7
- 2.11.12
- 2.12.6
- 2.12.10
- 2.13.0

before_install:
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
Expand Down Expand Up @@ -39,10 +39,9 @@ jobs:
- stage: validation
script:
- sbt ++$TRAVIS_SCALA_VERSION orgValidateFiles
- sbt ++$TRAVIS_SCALA_VERSION orgCheckSettings
- sbt ++$TRAVIS_SCALA_VERSION docs/tut
- bash <(curl -s https://codecov.io/bash)
scala: 2.12.6
scala: 2.12.10
- stage: deploy
script:
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
Expand All @@ -58,7 +57,7 @@ jobs:
sbt docs/publishMicrosite;
fi
fi
scala: 2.12.6
scala: 2.12.10

cache:
directories:
Expand Down
1 change: 0 additions & 1 deletion docs/src/main/tut/docs/datetime/granularity.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@ val prop = forAll { zdt: ZonedDateTime =>
}

prop.check
// + OK, passed 100 tests.
```

1 change: 0 additions & 1 deletion docs/src/main/tut/docs/datetime/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ val prop = forAll { dt: DateTime =>
}

prop.check
// + OK, passed 100 tests.
```

## A note on imports
Expand Down
2 changes: 0 additions & 2 deletions docs/src/main/tut/docs/datetime/range.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ val prop = forAll(genDateTimeWithinRange(from, range)) { dt =>
}

prop.check
// + OK, passed 100 tests.
```

# Using Granularity and Ranges Together
Expand All @@ -53,5 +52,4 @@ val prop = forAll(genDateTimeWithinRange(from, range)) { dt =>
}

prop.check
// + OK, passed 100 tests.
```
24 changes: 20 additions & 4 deletions project/ProjectPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ object ProjectPlugin extends AutoPlugin {

object autoImport {

lazy val V = new {
val jodaTime: String = "2.10.3"
val scalacheck: String = "1.14.1"
val scala211: String = "2.11.12"
val scala212: String = "2.12.10"
val scala213: String = "2.13.0"
}

lazy val docsMappingsAPIDir: SettingKey[String] = settingKey[String](
"Name of subdirectory in site target directory for api docs")

Expand All @@ -46,17 +54,26 @@ object ProjectPlugin extends AutoPlugin {
fork in Test := false
)

lazy val commonDeps = Seq(libraryDependencies ++= Seq(%%("scalacheck"), %("joda-time")))
lazy val commonDeps = Seq(libraryDependencies ++= Seq(%%("scalacheck", V.scalacheck), %("joda-time", V.jodaTime)))
}

import autoImport._

override def projectSettings: Seq[Def.Setting[_]] =
Seq(
name := "scalacheck-toolbox",
orgProjectName := "scalacheck-toolbox",
homepage := Option(url("https://47deg.github.io/scalacheck-toolbox/")),
description := "A helping hand for generating sensible data with ScalaCheck",
startYear := Option(2016),
crossScalaVersions := Seq(scalac.`2.10`, scalac.`2.11`, scalac.`2.12`),
crossScalaVersions := Seq(V.scala211, V.scala212, V.scala213),
scalacOptions := {
val scalacOptions213 = scalacOptions.value filterNot Set("-Xfuture").contains
CrossVersion.partialVersion(scalaBinaryVersion.value) match {
case Some((2, 13)) => scalacOptions213
case _ => scalacOptions.value
}
},
orgBadgeListSetting := List(
TravisBadge.apply(_),
CodecovBadge.apply(_),
Expand All @@ -69,8 +86,7 @@ object ProjectPlugin extends AutoPlugin {
LicenseFileType(orgGithubSetting.value, orgLicenseSetting.value, startYear.value),
ContributingFileType(
orgProjectName.value,
// Organization field can be configured with default value if we migrate it to the frees-io organization
orgGithubSetting.value.copy(project = "freestyle")),
orgGithubSetting.value),
AuthorsFileType(
name.value,
orgGithubSetting.value,
Expand Down
3 changes: 2 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
resolvers += Resolver.sonatypeRepo("releases")
addSbtPlugin("com.47deg" % "sbt-org-policies" % "0.9.2")
addSbtPlugin("com.47deg" % "sbt-microsites" % "0.9.4")
addSbtPlugin("com.47deg" % "sbt-org-policies" % "0.12.0-M2")