-
Notifications
You must be signed in to change notification settings - Fork 28
/
build.sbt
63 lines (55 loc) · 2.25 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
addCommandAlias("check", ";headerCreate;dependencyUpdates;compile")
addCommandAlias("build", ";check;test;coverageAggregate;package")
addCommandAlias("rebuild", ";clean;build")
val logger = ConsoleLogger()
useGpgPinentry := true
sonatypeProfileName := "com.github.vagmcs"
lazy val root = project
.in(file("."))
.aggregate(core, oj, lpsolve, gurobi, mosek)
.settings(publish / skip := true)
// Build settings for Optimus core
lazy val core = project
.in(file("core"))
.enablePlugins(AutomateHeaderPlugin)
.settings(Test / logLevel := Level.Info)
.settings(name := "optimus")
.settings(
Seq(
libraryDependencies ++= Dependencies.Logging,
libraryDependencies ++= Dependencies.ScalaTest,
libraryDependencies ++= Dependencies.Tools
)
)
// Build settings for Optimus oj solver
lazy val oj = Project("solver-oj", file("solver-oj"))
.dependsOn(core % "compile->compile ; test->test")
.enablePlugins(AutomateHeaderPlugin)
.settings(name := "optimus-solver-oj")
.settings(libraryDependencies += Dependencies.ojAlgorithms)
// Build settings for Optimus lp solver
lazy val lpsolve = Project("solver-lp", file("solver-lp"))
.dependsOn(core % "compile->compile ; test->test")
.enablePlugins(AutomateHeaderPlugin)
.settings(name := "optimus-solver-lp")
.settings(libraryDependencies += Dependencies.LpSolve)
// Build settings for Optimus gurobi solver
lazy val gurobi = Project("solver-gurobi", file("solver-gurobi"))
.dependsOn(core % "compile->compile ; test->test")
.enablePlugins(AutomateHeaderPlugin)
.settings(name := "optimus-solver-gurobi")
.settings(libraryDependencies += Dependencies.Gurobi)
// Build settings for Optimus mosek solver
lazy val mosek =
if (file("lib/mosek.jar").exists) Project("solver-mosek", file("solver-mosek"))
.dependsOn(core % "compile->compile ; test->test")
.enablePlugins(AutomateHeaderPlugin)
.settings(name := "optimus-solver-mosek")
.settings(Compile / unmanagedJars += file("lib/mosek.jar"))
else Project("solver-mosek", file("solver-mosek"))
.settings {
logger.warn {
"Building in the absence of support for the Mosek solver [ 'mosek.jar' not found in 'lib' directory ]."
}
Seq(name := "optimus-solver-mosek", publish := {}, publishLocal := {})
}