Skip to content

Commit a7b035f

Browse files
committed
wip Scala 3
1 parent abfc4b2 commit a7b035f

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

build.sbt

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ val setMimaVersion: State => State = { st =>
3535
}
3636

3737
val commonSettings = Def.settings(
38+
Test / sources := {
39+
CrossVersion.partialVersion(scalaVersion.value) match {
40+
case Some((2, _)) =>
41+
(Test / sources).value
42+
case _ =>
43+
Nil // TODO https://github.com/msgpack4z/msgpack4z-core/issues/134
44+
}
45+
},
3846
ReleasePlugin.extraReleaseCommands,
3947
scalapropsCoreSettings,
4048
publishTo := sonatypePublishToBundle.value,
@@ -115,7 +123,7 @@ val commonSettings = Def.settings(
115123
.toList
116124
.flatten,
117125
scalaVersion := Scala211,
118-
crossScalaVersions := Scala211 :: "2.12.13" :: "2.13.4" :: Nil,
126+
crossScalaVersions := Scala211 :: "2.12.13" :: "2.13.4" :: "3.0.0-M3" :: Nil,
119127
scalacOptions in (Compile, doc) ++= {
120128
val tag = tagOrHash.value
121129
Seq(
@@ -166,11 +174,19 @@ lazy val msgpack4zCore = CrossProject(
166174
Generator.settings,
167175
name := msgpack4zCoreName,
168176
libraryDependencies ++= Seq(
169-
"org.scalaz" %%% "scalaz-core" % ScalazVersion,
170-
"com.github.xuwei-k" %% "zeroapply-scalaz" % "0.4.1" % "provided",
171-
"com.github.scalaprops" %%% "scalaprops" % scalapropsVersion % "test",
172-
"com.github.scalaprops" %%% "scalaprops-scalaz" % scalapropsVersion % "test",
173-
)
177+
"org.scalaz" %%% "scalaz-core" % ScalazVersion withDottyCompat scalaVersion.value,
178+
"com.github.scalaprops" %%% "scalaprops" % scalapropsVersion % "test" withDottyCompat scalaVersion.value,
179+
"com.github.scalaprops" %%% "scalaprops-scalaz" % scalapropsVersion % "test" withDottyCompat scalaVersion.value,
180+
),
181+
libraryDependencies += {
182+
val x = "com.github.xuwei-k" %% "zeroapply-scalaz" % "0.4.1"
183+
CrossVersion.partialVersion(scalaVersion.value) match {
184+
case Some((2, _)) =>
185+
x % "provided"
186+
case _ =>
187+
x // https://github.com/xuwei-k/zeroapply/issues/104
188+
}
189+
}
174190
).enablePlugins(
175191
MimaPlugin,
176192
sbtbuildinfo.BuildInfoPlugin
@@ -179,7 +195,7 @@ lazy val msgpack4zCore = CrossProject(
179195
libraryDependencies ++= Seq(
180196
"com.github.xuwei-k" % "msgpack4z-api" % "0.2.0",
181197
"com.github.xuwei-k" % "msgpack4z-java06" % "0.2.0" % "test",
182-
"com.github.xuwei-k" %% "msgpack4z-native" % msgpack4zNativeVersion % "test",
198+
"com.github.xuwei-k" %% "msgpack4z-native" % msgpack4zNativeVersion % "test" withDottyCompat scalaVersion.value,
183199
)
184200
).jsSettings(
185201
scalacOptions += {
@@ -195,7 +211,7 @@ lazy val msgpack4zCore = CrossProject(
195211
scalaJSLinkerConfig ~= { _.withSemantics(_.withStrictFloats(true)) },
196212
).platformsSettings(NativePlatform, JSPlatform)(
197213
libraryDependencies ++= Seq(
198-
"com.github.xuwei-k" %%% "msgpack4z-native" % msgpack4zNativeVersion,
214+
"com.github.xuwei-k" %%% "msgpack4z-native" % msgpack4zNativeVersion withDottyCompat scalaVersion.value,
199215
)
200216
)
201217

@@ -212,7 +228,8 @@ lazy val noPublish = Seq(
212228
lazy val msgpack4zCoreJVM = msgpack4zCore.jvm
213229
lazy val msgpack4zCoreJS = msgpack4zCore.js
214230
lazy val msgpack4zCoreNative = msgpack4zCore.native.settings(
215-
scalapropsNativeSettings
231+
scalapropsNativeSettings,
232+
crossScalaVersions ~= (_.filter(_ startsWith "2.1"))
216233
)
217234

218235
val subProjects = List(

project/plugin.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.1")
12
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.1.1")
23
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13")
34
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")

0 commit comments

Comments
 (0)