-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sbt
137 lines (123 loc) · 4.11 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
import laika.helium.config.HeliumIcon
import laika.helium.config.IconLink
import laika.helium.Helium
import laika.format.Markdown
import laika.config.SyntaxHighlighting
val globalScalaVersion = "3.3.4"
ThisBuild / organization := "ai.dragonfly"
ThisBuild / organizationName := "dragonfly.ai"
ThisBuild / startYear := Some(2023)
ThisBuild / licenses := Seq(License.Apache2)
ThisBuild / developers := List( tlGitHubDev("dragonfly-ai", "dragonfly.ai") )
ThisBuild / scalaVersion := globalScalaVersion
ThisBuild / scalacOptions := Seq("semantic-db")
//ThisBuild / authors := List( "Someone" )
ThisBuild / tlFatalWarnings := false
ThisBuild / tlSitePublishBranch := Some("main")
ThisBuild / tlBaseVersion := "0.3" // this isn't used yet, until MIMA gets enabled by changing tlVersionIntroduced
ThisBuild / tlVersionIntroduced := Map("3" -> "1.0.0")
ThisBuild / tlCiReleaseBranches := Seq()
ThisBuild / tlSonatypeUseLegacyHost := false
ThisBuild / nativeConfig ~= {
_.withLTO(scala.scalanative.build.LTO.thin)
.withMode(scala.scalanative.build.Mode.releaseFast)
.withGC(scala.scalanative.build.GC.commix)
}
lazy val slash = crossProject(
JSPlatform,
JVMPlatform,
NativePlatform
)
.crossType(CrossType.Full)
.settings(
description := "High performance, low footprint, cross platform, Linear Algebra and Statistics Hacks!",
libraryDependencies += "ai.dragonfly" %%% "narr" % "1.0"
)
.jvmSettings(
libraryDependencies ++= Seq( "org.scala-js" %% "scalajs-stubs" % "1.1.0" )
)
.jsSettings()
.nativeSettings()
lazy val verification = project // should move verification into JVM only tests.
.dependsOn( slash.projects( JVMPlatform ) )
.enablePlugins(NoPublishPlugin)
.settings(
name := "verification",
Compile / mainClass := Some("verification.Verify"),
libraryDependencies ++= Seq(
"org.apache.commons" % "commons-math3" % "3.6.1",
"gov.nist.math" % "jama" % "1.0.3"
)
)
lazy val root = tlCrossRootProject.aggregate(slash, tests).settings(name := "slash")
lazy val jsdocs = project
.in(file("jsdocs"))
.settings(
scalaJSUseMainModuleInitializer := true,
libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "2.4.0",
libraryDependencies += ("org.scala-js" %%% "scalajs-java-securerandom" % "1.0.0").cross(CrossVersion.for3Use2_13),
libraryDependencies += "io.github.quafadas" %%% "dedav_laminar" % "0.9.2",
)
.dependsOn(slash.js)
.enablePlugins(ScalaJSPlugin)
.enablePlugins(NoPublishPlugin)
lazy val docs = project
.in(file("site"))
.dependsOn(slash.jvm)
.settings(
mdocJS := Some(jsdocs),
laikaExtensions := Seq(Markdown.GitHubFlavor, SyntaxHighlighting),
laikaConfig ~= { _.withRawContent },
//tlSiteHeliumExtensions := Seq(GitHubFlavor, SyntaxHighlighting),
tlSiteHelium := {
Helium.defaults.site.metadata(
title = Some("S"),
language = Some("en"),
description = Some("S"),
authors = Seq("one"),
)
.site
.topNavigationBar(
homeLink = IconLink.internal(laika.ast.Path(List("index.md")), HeliumIcon.home),
navLinks = Seq(IconLink.external("https://github.com/dragonfly-ai/slash", HeliumIcon.github))
)
.site
.externalJS(
url = "https://cdn.jsdelivr.net/npm/vega@5"
)
.site
.externalJS(
url = "https://cdn.jsdelivr.net/npm/vega-lite@5"
)
.site
.externalJS(
url = "https://cdn.jsdelivr.net/npm/vega-embed@6"
)
}
)
.enablePlugins(TypelevelSitePlugin)
.enablePlugins(NoPublishPlugin)
lazy val unidocs = project
.in(file("unidocs"))
.enablePlugins(TypelevelUnidocPlugin) // also enables the ScalaUnidocPlugin
.settings(
name := "slash-docs",
ScalaUnidoc / unidoc / unidocProjectFilter :=
inProjects(
slash.jvm,
slash.js,
slash.native
)
)
lazy val tests = crossProject(
JVMPlatform,
JSPlatform,
NativePlatform
)
.in(file("tests"))
.enablePlugins(NoPublishPlugin)
.dependsOn(slash)
.settings(
name := "slash-tests",
libraryDependencies += "org.scalameta" %%% "munit" % "1.1.0" % Test
)