-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
125 lines (116 loc) · 3.71 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
import complete.DefaultParsers.*
import sbt.ScriptedPlugin.autoImport.scripted
import sbt.scripted.sources.ScriptedSourcesPlugin
inThisBuild(
List(
scalaVersion := "2.12.20",
organization := "me.ptrdom",
homepage := Some(url("https://github.com/ptrdom/scalajs-esbuild")),
licenses := List(License.MIT),
developers := List(
Developer(
"ptrdom",
"Domantas Petrauskas",
url("http://ptrdom.me/")
)
),
sonatypeCredentialHost := "s01.oss.sonatype.org",
sonatypeRepository := "https://s01.oss.sonatype.org/service/local",
versionScheme := Some("semver-spec")
)
)
lazy val `scalajs-esbuild` = (project in file("."))
.settings(publish / skip := true)
.aggregate(
`sbt-scalajs-esbuild`,
`sbt-scalajs-esbuild-electron`,
`sbt-scalajs-esbuild-web`,
`sbt-web-scalajs-esbuild`,
`scala-steward-hooks`
)
lazy val commonSettings = Seq(
scriptedLaunchOpts ++= Seq(
"-Dplugin.version=" + version.value
),
scriptedBufferLog := false
)
lazy val `sbt-scalajs-esbuild` =
project
.in(file("sbt-scalajs-esbuild"))
.enablePlugins(SbtPlugin, ScriptedSourcesPlugin, ExampleVersionPlugin)
.settings(commonSettings)
.settings(
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0")
)
lazy val `sbt-scalajs-esbuild-web` = project
.in(file("sbt-scalajs-esbuild-web"))
.enablePlugins(SbtPlugin, ScriptedSourcesPlugin, ExampleVersionPlugin)
.settings(
commonSettings,
scriptedDependencies := {
val () = scriptedDependencies.value
val () = (`sbt-scalajs-esbuild` / publishLocal).value
}
)
.dependsOn(`sbt-scalajs-esbuild`)
lazy val `sbt-web-scalajs-esbuild` =
project
.in(file("sbt-web-scalajs-esbuild"))
.enablePlugins(SbtPlugin, ScriptedSourcesPlugin, ExampleVersionPlugin)
.settings(commonSettings)
.settings(
addSbtPlugin("com.vmunier" % "sbt-web-scalajs" % "1.3.0"),
scriptedDependencies := {
val () = scriptedDependencies.value
val () = (`sbt-scalajs-esbuild-web` / publishLocal).value
}
)
.dependsOn(`sbt-scalajs-esbuild-web`)
lazy val `sbt-scalajs-esbuild-electron` =
project
.in(file("sbt-scalajs-esbuild-electron"))
.enablePlugins(SbtPlugin, ScriptedSourcesPlugin, ExampleVersionPlugin)
.settings(commonSettings)
.settings(
scriptedDependencies := {
val () = scriptedDependencies.value
val () = (`sbt-scalajs-esbuild` / publishLocal).value
}
)
.dependsOn(`sbt-scalajs-esbuild-web`)
// workaround for https://github.com/sbt/sbt/issues/7431
InputKey[Unit]("scriptedSequentialPerModule") := Def.inputTaskDyn {
val args = any.*.parsed.mkString
Def.taskDyn {
val projects: Seq[ProjectReference] = `scalajs-esbuild`.aggregate
Def
.sequential(
projects.map(p =>
Def.taskDyn {
(p / scripted).?.value match {
case Some(_) => (p / scripted).toTask(args)
case None => Def.task(())
}
}
)
)
}
}.evaluated
lazy val `scala-steward-hooks` = project
.in(file("scala-steward-hooks"))
.enablePlugins(ScalaJSPlugin)
.settings(
publish / skip := true,
scalaVersion := "2.13.15",
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "2.8.0",
"org.scalatest" %% "scalatest" % "3.2.19" % "test",
"org.scalatest" %% "scalatest-shouldmatchers" % "3.2.19",
"org.scalatestplus" %% "selenium-4-9" % "3.2.16.0",
"org.seleniumhq.selenium" % "selenium-java" % "4.26.0",
"org.apache.pekko" %% "pekko-actor-typed" % "1.1.2",
"org.apache.pekko" %% "pekko-stream" % "1.1.2",
"org.apache.pekko" %% "pekko-http" % "1.1.0"
)
)