Cleanup & simplify actions/generator

This commit is contained in:
Dale Wijnand
2018-03-06 11:59:48 +00:00
parent 3791e489b2
commit 359a0109fd
2 changed files with 12 additions and 14 deletions
@@ -1,8 +1,8 @@
lazy val a = project.settings(
scalaVersion := "2.12.2",
scalaInstance in (Compile,doc) := (scalaInstance in b).value,
scalaInstance in (Compile, doc) := (scalaInstance in b).value,
// 2.10.1-only, so this will only succeed if `doc` recognizes the more specific scalaInstance scoped to `doc`
scalacOptions in (Compile,doc) += "-implicits"
scalacOptions in (Compile, doc) += "-implicits"
)
lazy val b = project.settings(
+10 -12
View File
@@ -1,13 +1,11 @@
lazy val buildInfo = taskKey[Seq[File]]("The task that generates the build info.")
scalaVersion := "2.11.8"
lazy val root = (project in file("."))
.settings(
scalaVersion := "2.11.8",
buildInfo := {
val x = sourceManaged.value / "BuildInfo.scala"
IO.write(x, """object BuildInfo""")
x :: Nil
},
sourceGenerators in Compile += buildInfo,
sourceGenerators in Compile += Def.task { Nil }
)
val buildInfo = taskKey[Seq[File]]("generates the build info")
buildInfo := {
val file = sourceManaged.value / "BuildInfo.scala"
IO.write(file, "object BuildInfo")
file :: Nil
}
sourceGenerators in Compile += buildInfo
sourceGenerators in Compile += Def.task { Nil }