summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Zeiger <szeiger@novocode.com>2016-03-08 14:29:11 +0100
committerStefan Zeiger <szeiger@novocode.com>2016-03-17 18:55:03 +0100
commit696784054a5e3e39096f395b4757a0e466b37672 (patch)
tree9bd772d657e23e43eeb0a49d0bfbac089315dc49
parent99a82be91cbb85239f70508f6695c6b21fd3558c (diff)
downloadscala-696784054a5e3e39096f395b4757a0e466b37672.tar.gz
scala-696784054a5e3e39096f395b4757a0e466b37672.tar.bz2
scala-696784054a5e3e39096f395b4757a0e466b37672.zip
Add a `genprod` command to the sbt build
-rw-r--r--build.sbt9
-rw-r--r--project/build.sbt2
2 files changed, 10 insertions, 1 deletions
diff --git a/build.sbt b/build.sbt
index 4600f46840..a78cf530c6 100644
--- a/build.sbt
+++ b/build.sbt
@@ -649,7 +649,14 @@ lazy val root = (project in file("."))
publishArtifact := false,
publish := {},
publishLocal := {},
- commands ++= ScriptCommands.all
+ commands ++= ScriptCommands.all,
+ // Generate (Product|TupleN|Function|AbstractFunction)*.scala files. Once the ANT build is gone,
+ // we should move them into a managedSources dir instead of overwriting sources checked into git.
+ commands += Command.command("genprod") { state =>
+ val dir = (((baseDirectory in ThisBuild).value) / "src" / "library" / "scala").getPath
+ genprod.main(Array(dir))
+ state
+ }
)
.aggregate(library, reflect, compiler, interactive, repl, replJline, replJlineEmbedded,
scaladoc, scalap, partestExtras, junit, libraryAll, scalaDist).settings(
diff --git a/project/build.sbt b/project/build.sbt
new file mode 100644
index 0000000000..b19238f577
--- /dev/null
+++ b/project/build.sbt
@@ -0,0 +1,2 @@
+// Add genprod to the build; It should be moved from `src/build` to `project` once the ANT build is gone
+sources in Compile += ((baseDirectory).value.getParentFile / "src" / "build" / "genprod.scala")