-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sbt
63 lines (57 loc) · 2.72 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//val dottyVersion = "3.0.0-RC2-bin-SNAPSHOT"
val dottyVersion = "3.3.1"
//val dottyVersion = "3.1.3-RC1-bin-SNAPSHOT"
//val dottyVersion = dottyLatestNightlyBuild.get
ThisBuild/version := "4.0.3"
ThisBuild/versionScheme := Some("semver-spec")
val sharedSettings = Seq(
organization := "com.github.rssh",
scalaVersion := dottyVersion,
name := "scala-gopher",
//resolvers += "Local Ivy Repository" at "file://"+Path.userHome.absolutePath+"/.ivy2/local",
libraryDependencies += "com.github.rssh" %%% "dotty-cps-async" % "0.9.20",
libraryDependencies += "org.scalameta" %%% "munit" % "1.0.0-M10" % Test,
)
lazy val root = project
.in(file("."))
.aggregate(gopher.js, gopher.jvm)
.settings(
git.remoteRepo := "git@github.com:rssh/scala-gopher.git",
SiteScaladocPlugin.scaladocSettings(GopherJVM, gopher.jvm / Compile / packageDoc / mappings, "api/jvm"),
SiteScaladocPlugin.scaladocSettings(GopherJS, gopher.js / Compile / packageDoc / mappings, "api/js"),
siteDirectory := baseDirectory.value / "target" / "site",
publishArtifact := false,
).enablePlugins(GhpagesPlugin, SiteScaladocPlugin)
// for scala-native support we need munit
lazy val gopher = crossProject(JSPlatform, JVMPlatform)
.in(file("."))
.settings(sharedSettings)
.disablePlugins(SitePlugin)
.disablePlugins(SitePreviewPlugin)
.jvmSettings(
//scalacOptions ++= Seq( "-unchecked", "-Xcheck-macros", "-Ycheck:macro", "-uniqid", "-Xprint:types", "-explain" ),
// Error in dotty
scalacOptions ++= Seq( "-unchecked", "-Xprint:types" ),
fork := true,
/*
javaOptions ++= Seq(
"--add-opens",
"java.base/java.lang=ALL-UNNAMED",
s"-javaagent:${System.getProperty("user.home")}/.ivy2/local/com.github.rssh/trackedfuture_3/0.5.0/jars/trackedfuture_3-assembly.jar"
)
*/
Compile / doc / scalacOptions := Seq("-groups",
"-source-links:shared=github://rssh/scala-gopher/master#shared",
"-source-links:jvm=github://rssh/scala-gopher/master#jvm"),
mimaPreviousArtifacts := Set( "com.github.rssh" %% "scala-gopher" % "4.0.0" )
).jsSettings(
libraryDependencies += ("org.scala-js" %%% "scalajs-java-logging" % "1.0.0").cross(CrossVersion.for3Use2_13),
// TODO: switch to ModuleES ?
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.CommonJSModule) },
scalaJSUseMainModuleInitializer := true,
Compile / doc / scalacOptions := Seq("-groups",
"-source-links:shared=github://rssh/scala-gopher/master#shared",
"-source-links:js=github://rssh/scala-gopher/master#js"),
)
lazy val GopherJVM = config("gopher.jvm")
lazy val GopherJS = config("gopher.js")