-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sbt
71 lines (62 loc) · 4.16 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
// gallia-core
// trying to keep this to a mimimum
// TODO: t210125110147 - investigate sbt alternatives, especially https://github.com/com-lihaoyi/mill
// ===========================================================================
ThisBuild / organizationName := "Gallia Project"
ThisBuild / organization := "io.github.galliaproject" // *must* match groupId for sonatype
ThisBuild / organizationHomepage := Some(url("https://github.com/galliaproject"))
ThisBuild / startYear := Some(2021)
ThisBuild / version := "0.6.1"
ThisBuild / description := "A Scala library for data manipulation"
ThisBuild / homepage := Some(url("https://github.com/galliaproject/gallia-core"))
ThisBuild / licenses := Seq("Apache 2" -> url("https://github.com/galliaproject/gallia-core/blob/master/LICENSE"))
ThisBuild / developers := List(Developer(
id = "anthony-cros",
name = "Anthony Cros",
email = "[email protected]",
url = url("https://github.com/anthony-cros")))
ThisBuild / scmInfo := Some(ScmInfo(
browseUrl = url("https://github.com/galliaproject/gallia-core"),
connection = "scm:[email protected]:galliaproject/gallia-core.git"))
// ===========================================================================
lazy val reflect = (project in file("reflect"))
.settings(
name := "gallia-reflect",
target := baseDirectory.value / ".." / "bin" / "reflect" /* TODO: t240103170440 - still leaves a reflect/target folder somehow */)
.settings(GalliaCommonSettings.mainSettings:_*)
// ---------------------------------------------------------------------------
lazy val core = (project in file("core"))
.settings(
name := "gallia-core",
target := baseDirectory.value / ".." / "bin" / "core")
.settings(GalliaCommonSettings.mainSettings:_*)
.dependsOn(reflect) // TODO: also bring in gallia-macros
// ---------------------------------------------------------------------------
lazy val root = (project in file("."))
.settings(name := "gallia-core-root") // TODO: t240209192100 - where is this name used?
.settings(GalliaCommonSettings.mainSettings:_*)
.aggregate(reflect, core)
// ===========================================================================
// see https://github.com/aptusproject/aptus-core
// our own utilities library, bundles low level library such as commons-{io,lang3,math3,csv}, gson, enumeratum, ...
lazy val aptusVersion = "0.5.2"
lazy val enumeratumVersion = "1.7.3"
lazy val uTestVersion = "0.8.1"
// ---------------------------------------------------------------------------
ThisBuild / testFrameworks += new TestFramework("utest.runner.Framework")
ThisBuild / libraryDependencies ++=
Seq("com.beachape" %% "enumeratum" % enumeratumVersion,
"com.lihaoyi" %% "utest" % uTestVersion % "test") ++ // more tests: see https://github.com/galliaproject/gallia-testing (being moved here)
(scalaBinaryVersion.value match {
case "3" => Seq(("io.github.aptusproject" %% "aptus-core" % aptusVersion).cross(CrossVersion.for3Use2_13) /* because of gallia-spark, which will bring in 2.13's scala-parallel-collections */)
case "2.13" => Seq( "io.github.aptusproject" %% "aptus-core" % aptusVersion)
case "2.12" => Seq( "io.github.aptusproject" %% "aptus-core" % aptusVersion) }) ++
(scalaBinaryVersion.value match { // OSWO dependencies (see https://github.com/galliaproject/gallia-docs/blob/master/oswo.md)
case "3" => Seq() // TODO
case "2.13" => Seq("org.scala-lang" % "scala-compiler" % scalaVersion.value, "org.scala-lang" % "scala-library" % scalaVersion.value)
case "2.12" => Seq("org.scala-lang" % "scala-compiler" % scalaVersion.value, "org.scala-lang" % "scala-library" % scalaVersion.value) }) ++
(scalaBinaryVersion.value match {
case "3" => Seq.empty
case "2.13" => Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value) /* for scala.reflect.runtime.universe */
case "2.12" => Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value) /* for scala.reflect.runtime.universe */ })
// ===========================================================================