diff --git a/COMPILING.md b/COMPILING.md index 450907bb..5642a621 100644 --- a/COMPILING.md +++ b/COMPILING.md @@ -21,10 +21,10 @@ Setting up the test suite for Millfork is tricky, so if you don't need the tests #### Steps -* run `sbt compile` +* run `sbt -DskipTests compile` to compile the project -* run `sbt assembly` +* run `sbt -DskipTests assembly` to build the executable jar file, it should appear in `target/scala-2.12` ### Building with tests @@ -55,9 +55,9 @@ Test suite is useful if you plan on modifying the compiler. Some test dependenci * navigate to the project directory -* run `sbt -DincludeTests compile` to compile the project +* run `sbt compile` to compile the project -* run `sbt -DincludeTests assemble` to build the executable jar file, it should appear in `target/scala-2.12` +* run `sbt assemble` to build the executable jar file, it should appear in `target/scala-2.12` ### Building a native executable diff --git a/build.sbt b/build.sbt index 7be6a80e..71ea6196 100644 --- a/build.sbt +++ b/build.sbt @@ -31,22 +31,23 @@ val testDependencies = Seq( "org.graalvm.js" % "js-scriptengine" % "20.2.0" % "test" ) -val includesTests = System.getProperty("includeTests") != null +val includesTests = System.getProperty("skipTests") == null libraryDependencies ++=( if (includesTests) { println("Including test dependencies") testDependencies } else { - Seq() + Seq[ModuleID]() } ) (if (!includesTests) { // Disable assembling tests - test in assembly := {} - // SBT doesn't like returning Unit, so return Seq -} else Seq()) + sbt.internals.DslEntry.fromSettingsDef(test in assembly := {}) +} else { + sbt.internals.DslEntry.fromSettingsDef(Seq[sbt.Def.Setting[_]]()) +}) mainClass in Compile := Some("millfork.Main")