forked from lucidd/scala-js-chrome
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.sbt
83 lines (77 loc) · 2.17 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
inThisBuild(
List(
organization := "com.alexitc",
homepage := Some(url("https://github.com/AlexITC/scala-js-chrome")),
licenses := List("MIT" -> url("http://www.opensource.org/licenses/mit-license.html")),
developers := List(
Developer(
"AlexITC",
"Alexis Hernandez",
"alexis22229@gmail.com",
url("https://wiringbits.net")
)
)
)
)
ThisBuild / versionScheme := Some("early-semver")
publish / skip := true
lazy val commonSettings = Seq(
scalacOptions ++= {
Seq(
"-encoding",
"UTF-8",
"-feature",
"-language:implicitConversions"
// "-Xfatal-warnings"
) ++
(CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) =>
Seq(
"-unchecked",
"-source:3.0-migration"
)
case _ =>
Seq(
"-Xlint",
"-deprecation"
)
})
},
Compile / unmanagedSourceDirectories ++= Seq(
baseDirectory.value.getParentFile / "shared" / "src" / "main" / "scala"
)
)
lazy val commonPlugins = Seq()
lazy val bindings = project
.in(file("bindings"))
.settings(commonSettings: _*)
.settings(
name := "scala-js-chrome",
scalaVersion := "3.1.1",
crossScalaVersions ++= Seq("2.12.15", "2.13.8", "3.1.1"),
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "2.6.0"
),
scalaJSUseMainModuleInitializer := true
)
.enablePlugins(commonPlugins: _*)
.enablePlugins(ScalaJSPlugin)
.enablePlugins(ScalaJSBundlerPlugin)
lazy val plugin = project
.in(file("sbt-plugin"))
.settings(commonSettings: _*)
.settings(
sbtPlugin := true,
name := "sbt-chrome-plugin",
libraryDependencies ++= {
// NOTE: Avoid circe as it doesn't respect binary compatibility which causes lots of issues
Seq(
"com.lihaoyi" %%% "upickle" % "1.5.0",
"org.scalactic" %% "scalactic" % "3.2.16" % "test",
"org.scalatest" %% "scalatest" % "3.2.11" % "test"
)
},
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.1"),
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.21.1")
)
.enablePlugins(commonPlugins: _*)