-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.sbt
204 lines (158 loc) · 6.21 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
import sbt._
import Keys._
//import execnpm.ExecNpmPlugin.autoImport._
//import execnpm.NpmDeps._
val aceVersion = "1.4.3"
val aceDiffVersion = "2.3.0"
val bootstrapNativeVersion = "3.0.14-f"
val bootstrapIcons = "1.4.0"
val bootstrapSliderVersion = "10.4.0"
val nouiSliderVersion = "15.5.0"
val highlightVersion = "10.4.1"
val lunrVersion = "2.1.5"
//2.13
val jsextVersion = "0.10"
val laminarVersion = "15.0.1"
val scalaJSdomVersion = "2.0.0"
val sourceCodeVersion = "0.2.7"
val scalaJSortableVersion = "0.8"
ThisBuild / organization := "org.openmole.scaladget"
name := "scaladget"
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
ThisBuild / scalaVersion := "3.3.3"
//ThisBuild / crossScalaVersions := Seq("2.13.8", "3.0.0")
ThisBuild / pomIncludeRepository := { _ => false }
resolvers += Resolver.sonatypeRepo("releases")
ThisBuild / licenses := Seq("Affero GPLv3" -> url("http://www.gnu.org/licenses/"))
ThisBuild / homepage := Some(url("https://github.com/openmole/scala-js-plotlyjs"))
ThisBuild / scmInfo := Some(ScmInfo(url("https://github.com/openmole/scaladget.git"), "git@github.com:openmole/scaladget.git"))
ThisBuild / pomExtra := (
<developers>
<developer>
<id>mathieu.leclaire</id>
<name>Mathieu Leclaire</name>
</developer>
</developers>
)
ThisBuild / releasePublishArtifactsAction := PgpKeys.publishSigned.value
releaseVersionBump := sbtrelease.Version.Bump.Minor
releaseTagComment := s"Releasing ${(ThisBuild / version).value}"
releaseCommitMessage := s"Bump version to ${(ThisBuild / version).value}"
sonatypeProfileName := "org.openmole"
ThisBuild / publishConfiguration := publishConfiguration.value.withOverwrite(true)
ThisBuild / publishTo := sonatypePublishToBundle.value
ThisBuild / publishMavenStyle := true
ThisBuild / releaseCrossBuild := true
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
setReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
)
lazy val scalaJsDom = libraryDependencies += "org.scala-js" %%% "scalajs-dom" % scalaJSdomVersion
lazy val laminar = libraryDependencies += "com.raquo" %%% "laminar" % laminarVersion
lazy val sourceCode = libraryDependencies += "com.lihaoyi" %%% "sourcecode" % sourceCodeVersion
lazy val jsext = libraryDependencies += "org.querki" %%% "querki-jsext" % jsextVersion cross (CrossVersion.for3Use2_13)
lazy val ace = project.in(file("ace")) enablePlugins (ScalaJSBundlerPlugin) settings(
scalaJsDom,
jsext,
Compile / npmDependencies += "ace-builds" -> aceVersion
) dependsOn (bootstrapnative)
//
//lazy val aceDiff = project.in(file("acediff")) enablePlugins (ScalaJSBundlerPlugin) dependsOn (ace) settings(
// scalaJsDom,
// jsext,
// npmDeps in Compile += Dep("ace-diff", aceDiffVersion, List("ace-diff.min.js", "ace-diff.min.css"), true)
//)
//
lazy val nouislider = project.in(file("nouislider")) enablePlugins (ScalaJSBundlerPlugin) settings(
scalaJsDom,
jsext,
laminar,
Compile / npmDependencies += "nouislider"-> nouiSliderVersion
)
//
lazy val bootstrapnative = project.in(file("bootstrapnative")) enablePlugins (ScalaJSBundlerPlugin) settings(
scalaJsDom,
// libraryDependencies += "org.openmole" %%% "sortable-js-facade" % scalaJSortableVersion,
laminar,
Compile / npmDependencies += "bootstrap.native" -> bootstrapNativeVersion,
//npmDependencies in Compile += "sortablejs" -> sortableVersion
) dependsOn (tools)
//
//
lazy val highlightjs = project.in(file("highlightjs")) enablePlugins (ScalaJSBundlerPlugin) settings(
jsext,
scalaJsDom,
Compile / npmDependencies += "highlight.js" -> highlightVersion
)
lazy val lunr = project.in(file("lunr")) enablePlugins (ScalaJSBundlerPlugin) settings (
Compile / npmDependencies += "lunr" -> lunrVersion
)
lazy val svg = project.in(file("svg")) enablePlugins (ScalaJSPlugin) settings(
laminar,
scalaJsDom
) dependsOn (tools)
lazy val tools = project.in(file("tools")) enablePlugins (ScalaJSBundlerPlugin) settings(
scalaJsDom,
laminar
)
lazy val runBootstrapDemo = taskKey[Unit]("runBootsrapDemo")
lazy val bootstrapDemo = project.in(file("bootstrapDemo")) enablePlugins (ScalaJSBundlerPlugin) settings(
publishArtifact := false,
publish := {},
publishLocal := {},
test := println("Tests disabled"),
laminar,
sourceCode,
scalaJSLinkerConfig := scalaJSLinkerConfig.value.withSourceMap(false),
scalaJSUseMainModuleInitializer := true,
webpackNodeArgs := Seq("--openssl-legacy-provider"),
Test / requireJsDomEnv := true,
runBootstrapDemo := {
val demoResource = (Compile / resourceDirectory).value
val jsBuild = (Compile / fastOptJS / webpack).value.head.data
IO.copyFile(jsBuild, target.value / "js/demobootstrapnative.js")
IO.copyDirectory(demoResource, target.value)
}
) dependsOn(ace, bootstrapnative, tools, highlightjs, nouislider, lunr)
lazy val runSVGDemo = taskKey[Unit]("runSVGDemo")
lazy val svgDemo = project.in(file("svgDemo")) enablePlugins (ScalaJSBundlerPlugin) settings(
publishArtifact := false,
publish := {},
publishLocal := {},
test := println("Tests disabled"),
laminar,
sourceCode,
scalaJSUseMainModuleInitializer := true,
Test / requireJsDomEnv := true,
runSVGDemo := {
val demoResource = (Compile / resourceDirectory).value
val jsBuild = (Compile / fastOptJS / webpack).value.head.data
IO.copyFile(jsBuild, target.value / "js/demosvg.js")
IO.copyDirectory(demoResource, target.value)
}
) dependsOn(svg, tools, bootstrapnative, highlightjs)
lazy val runFlowchartDemo = taskKey[Unit]("runFlowchartDemo")
lazy val flowchartDemo = project.in(file("flowchartDemo")) enablePlugins (ScalaJSBundlerPlugin) settings(
publishArtifact := false,
publish := {},
publishLocal := {},
test := println("Tests disabled"),
laminar,
sourceCode,
scalaJSUseMainModuleInitializer := true,
Test / requireJsDomEnv := true,
runFlowchartDemo := {
val demoResource = (Compile / resourceDirectory).value
val jsBuild = (Compile / fastOptJS / webpack).value.head.data
IO.copyFile(jsBuild, target.value / "js/flowchart.js")
IO.copyDirectory(demoResource, target.value)
}
) dependsOn(svg, tools, bootstrapnative)