-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
85 lines (76 loc) · 2.1 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
Global / onChangedBuildSource := ReloadOnSourceChanges
import commandmatrix.extra.*
lazy val Versions = new {
val Scala3 = "3.2.2"
val scala = List(Scala3)
val cloudflareWorkers = "3.3.0"
}
lazy val root = project
.in(file("."))
.aggregate(examples.projectRefs*)
.aggregate(cloudflare.projectRefs*)
.settings(noPublish)
lazy val examples = projectMatrix
.in(file("examples"))
.allVariations(
Versions.scala,
List(VirtualAxis.js)
)
.dependsOn(cloudflare)
.enablePlugins(ScalaJSPlugin)
.settings(noPublish)
.settings(
scalaJSLinkerConfig ~= { conf =>
conf.withModuleKind(ModuleKind.ESModule)
},
Test / scalaJSLinkerConfig ~= { conf =>
conf.withModuleKind(ModuleKind.CommonJSModule)
}
)
lazy val cloudflare = projectMatrix
.in(file("sources"))
.allVariations(
Versions.scala,
List(VirtualAxis.js)
)
.enablePlugins(ScalablyTypedConverterGenSourcePlugin)
.settings(
organization := "com.indoorvivants.cloudflare",
moduleName := "worker-types",
Compile / npmDependencies ++= Seq(
"@cloudflare/workers-types" -> Versions.cloudflareWorkers
),
stOutputPackage := "com.indoorvivants.cloudflare",
stMinimize := Selection.AllExcept("@cloudflare/workers-types"),
Compile / packageSrc / mappings ++= {
val base = (Compile / sourceManaged).value
val files = (Compile / managedSources).value
files.map { f => (f, f.relativeTo(base).get.getPath) }
}
)
inThisBuild(
Seq(
organization := "com.indoorvivants",
organizationName := "Anton Sviridov",
homepage := Some(
url("https://github.com/indoorvivants/scalajs-serverless")
),
startYear := Some(2022),
licenses := List(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
),
developers := List(
Developer(
"keynmol",
"Anton Sviridov",
url("https://blog.indoorvivants.com")
)
)
)
)
ThisBuild / concurrentRestrictions += Tags.limit(ScalablyTypedTag, 1)
val noPublish = Seq(
publish / skip := true,
publishLocal / skip := true
)