mirror of
https://github.com/KarolS/millfork.git
synced 2024-12-22 16:31:02 +00:00
Use skipTests instead of includeTests
This commit is contained in:
parent
831be03167
commit
f39810793b
@ -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
|
||||
|
||||
|
11
build.sbt
11
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")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user