This repository has been archived by the owner on Aug 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
76 lines (67 loc) · 2.51 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
val appVersion:String = "0.101"
val globalScalaVersion = "3.2.2"
ThisBuild / organization := "ai.dragonfly"
ThisBuild / organizationName := "dragonfly.ai"
ThisBuild / resolvers := Resolver.sonatypeOssRepos("releases")
ThisBuild / startYear := Some(2023)
ThisBuild / licenses := Seq(License.Apache2)
ThisBuild / developers := List( tlGitHubDev("dragonfly-ai", "dragonfly.ai") )
ThisBuild / scalaVersion := globalScalaVersion
ThisBuild / tlBaseVersion := appVersion
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 matrix = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.crossType(CrossType.Full)
.settings(
description := "High performance, low footprint, cross platform, matrix math and machine learning library!",
libraryDependencies += "ai.dragonfly" %%% "vector" % "0.101",
)
.jvmSettings(
libraryDependencies ++= Seq("org.scala-js" %% "scalajs-stubs" % "1.1.0")
)
.jsSettings()
.nativeSettings()
lazy val verification = project
.dependsOn(matrix.projects(JVMPlatform))
.enablePlugins(NoPublishPlugin)
.settings(
name := "verification",
Compile / mainClass := Some("verification.Verify"),
libraryDependencies ++= Seq( "gov.nist.math" % "jama" % "1.0.3" )
)
lazy val demo = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.crossType(CrossType.Full)
.dependsOn(matrix)
.settings(
name := "demo",
Compile / mainClass := Some("Demo"),
libraryDependencies ++= Seq(
"ai.dragonfly" %%% "cliviz" % "0.102",
"ai.dragonfly" %%% "democrossy" % "0.102"
)
).jsSettings(
Compile / fullOptJS / artifactPath := file("./docs/js/main.js"),
scalaJSUseMainModuleInitializer := true
).jvmSettings(
libraryDependencies ++= Seq( "gov.nist.math" % "jama" % "1.0.2" )
)
lazy val root = tlCrossRootProject.aggregate(matrix).settings(name := "matrix")
lazy val docs = project.in(file("site")).enablePlugins(TypelevelSitePlugin).settings(
mdocVariables := Map(
"VERSION" -> appVersion,
"SCALA_VERSION" -> globalScalaVersion
),
laikaConfig ~= { _.withRawContent }
)
lazy val unidocs = project
.in(file("unidocs"))
.enablePlugins(TypelevelUnidocPlugin) // also enables the ScalaUnidocPlugin
.settings(
name := "matrix-docs",
ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(matrix.jvm, matrix.js, matrix.native)
)