-
Notifications
You must be signed in to change notification settings - Fork 13
Multiproject build setup
ComFreek edited this page Mar 13, 2019
·
2 revisions
Target audience: Programmers who want to develop an application using MMT, but also regularly edit MMT itself (e.g. add documentation, fix things) and want these updates to be immediately visible in their own project without tedious repackaging a self-contained mmt.jar.
- Clone the MMT repository somewhere:
git clone ...
, preferably as a submodule - Use this build.sbt:
import sbt.Keys.libraryDependencies
lazy val mmt = RootProject(file("<path-to-mmt-clone>/src"))
lazy val playground = Project(id = "playground", base = file(".")).settings(
name := "playground",
version := "0.1",
scalaVersion := "2.12.8",
scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation"),
// Add further desired libraryDependencies here
// e.g. libraryDependencies += "org.jgrapht" % "jgrapht-core" % "1.3.0",
).dependsOn(mmt)
- You're ready to go!
Caveat with IntelliJ: Compiling in IntelliJ and in the SBT Shell (started from your project directory and (!) started from within IntelliJ) are not the same! Even if you have MMT compile in one of them, you need to compile it as well in the other if you want to use your project in the other. When creating a new run configuration based on an SBT Task from within IntelliJ, be sure to uncheck "SBT shell"