11import sbt ._
22import java .io .File
33
4+ import sbtbuildinfo .BuildInfoPlugin .autoImport ._
5+
46maintainer
:= " Mandar Chandorkar <[email protected] >" 57
68packageSummary := " Scala Library/REPL for Machine Learning Research"
@@ -10,16 +12,17 @@ packageDescription := "DynaML is a scala library/repl for implementing and worki
1012 " which can be extended easily to implement advanced models for small and large scale applications.\n\n " +
1113 " But the library can also be used as an educational/research tool for data analysis."
1214
15+ val mainVersion = " v1.4-beta.8"
16+
1317val dataDirectory = settingKey[File ](" The directory holding the data files for running example scripts" )
1418
15- lazy val commonSettings = Seq (
16- name := " DynaML" ,
19+ val baseSettings = Seq (
1720 organization := " io.github.mandar2812" ,
18- version := " v1.4-beta.7" ,
1921 scalaVersion in ThisBuild := " 2.11.7" ,
20- mainClass in Compile := Some (" io.github.mandar2812.dynaml.DynaML" ),
21- fork in run := true ,
22- resolvers in ThisBuild ++= Seq (" jzy3d-releases" at " http://maven.jzy3d.org/releases" ),
22+ resolvers in ThisBuild ++= Seq (" jzy3d-releases" at " http://maven.jzy3d.org/releases" )
23+ )
24+
25+ lazy val commonSettings = Seq (
2326 libraryDependencies ++= Seq (
2427 " org.scala-lang" % " scala-compiler" % scalaVersion.value % " compile" ,
2528 " org.scala-lang" % " scala-library" % scalaVersion.value % " compile" ,
@@ -42,15 +45,42 @@ lazy val commonSettings = Seq(
4245 " com.quantifind" % " wisp_2.11" % " 0.0.4" % " compile" ,
4346 " org.jzy3d" % " jzy3d-api" % " 0.9.1" % " compile" ,
4447 " com.lihaoyi" % " ammonite-repl_2.11.7" % " 0.5.8"
45- ),
46- dataDirectory := new File (" data/" ),
47- initialCommands in console := """ io.github.mandar2812.dynaml.DynaML.run(banner="""" +
48- target.value.getPath + """ /universal/stage/conf/banner.txt");"""
48+ )
4949)
5050
51+ lazy val pipes = (project in file(" dynaml-pipes" )).settings(baseSettings:_* )
52+ .settings(
53+ name := " dynaml-pipes" ,
54+ version := " 1.0"
55+ )
56+
57+ lazy val core = (project in file(" dynaml-core" )).settings(baseSettings)
58+ .settings(commonSettings:_* )
59+ .enablePlugins(JavaAppPackaging , BuildInfoPlugin )
60+ .dependsOn(pipes)
61+ .settings(
62+ name := " dynaml-core" ,
63+ version := mainVersion
64+ )
65+
66+ lazy val examples = (project in file(" dynaml-examples" ))
67+ .settings(baseSettings:_* )
68+ .settings(commonSettings:_* )
69+ .settings(
70+ name := " dynaml-examples" ,
71+ version := " 1.0"
72+ ).dependsOn(pipes, core)
73+
5174lazy val DynaML = (project in file(" ." )).enablePlugins(JavaAppPackaging , BuildInfoPlugin )
75+ .settings(baseSettings:_* )
5276 .settings(commonSettings : _* )
77+ .dependsOn(core, examples, pipes)
5378 .settings(
79+ // aggregate in update := false,
80+ name := " DynaML" ,
81+ version := mainVersion,
82+ fork in run := true ,
83+ mainClass in Compile := Some (" io.github.mandar2812.dynaml.DynaML" ),
5484 buildInfoKeys := Seq [BuildInfoKey ](name, version, scalaVersion, sbtVersion),
5585 buildInfoPackage := " io.github.mandar2812.dynaml.repl" ,
5686 buildInfoUsePackageAsPath := true ,
@@ -67,6 +97,10 @@ lazy val DynaML = (project in file(".")).enablePlugins(JavaAppPackaging, BuildIn
6797 // -J params will be added as jvm parameters
6898 " -J-Xmx2048m" ,
6999 " -J-Xms64m"
70- )
71- )
100+ ),
101+ dataDirectory := new File (" data/" ),
102+ initialCommands in console := """ io.github.mandar2812.dynaml.DynaML.run(banner="""" +
103+ target.value.getPath + """ /universal/stage/conf/banner.txt");"""
104+
105+ )
72106
0 commit comments