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

Update build for 2.13.0 final #51

Merged
merged 1 commit into from
Jul 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
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ scala:
- 2.10.7
- 2.11.12
- 2.12.8
- 2.13.0-RC2
- 2.13.0

jdk:
- oraclejdk8
- openjdk8

branches:
only:
Expand Down
18 changes: 15 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ lazy val catsTests = crossProject(JSPlatform, JVMPlatform).in(file("cats-tests")
if (scalaVersion.value.startsWith("2.10."))
"org.typelevel" %%% "cats-core" % "1.2.0"
else
"org.typelevel" %%% "cats-core" % "2.0.0-M2"
"org.typelevel" %%% "cats-core" % "2.0.0-M4"
}
)

Expand Down Expand Up @@ -100,6 +100,7 @@ lazy val defaultSettings = Seq(
"-Ymacro-annotations"
)
}.toList.flatten,
macrocompatDependency,
defaultLibraryDependencies,
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
Expand Down Expand Up @@ -136,12 +137,23 @@ lazy val defaultScalacOptions = scalacOptions ++= Seq(
Seq("-Xlint:-unused,_")
})

// Only include for 2.10; see https://github.com/milessabin/macro-compat/pull/85 for discussion
lazy val macrocompatDependency = libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, v)) if v < 11 =>
Seq(
"org.typelevel" %% "macro-compat" % "1.1.1"
)
case _ =>
Nil
}
}

lazy val defaultLibraryDependencies = libraryDependencies ++= Seq(
"org.typelevel" %% "macro-compat" % "1.1.1",
scalaOrganization.value % "scala-reflect" % scalaVersion.value % Provided,
scalaOrganization.value % "scala-compiler" % scalaVersion.value % Provided,
"org.scalacheck" %%% "scalacheck" % "1.14.0" % Test,
"org.scalatest" %%% "scalatest" % "3.0.8-RC4" % Test
"org.scalatest" %%% "scalatest" % "3.0.8" % Test
)

def scalaPartV = Def.setting(CrossVersion.partialVersion(scalaVersion.value))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package io.estatico.newtype

package object macros extends ScalaVersionSpecifics

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package io.estatico.newtype.macros

trait ScalaVersionSpecifics
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package io.estatico.newtype.macros

trait ScalaVersionSpecifics {
object macrocompat {
class bundle extends annotation.Annotation
}
}