Cleanup & simplify actions/generator

This commit is contained in:
Dale Wijnand 2018-02-01 17:00:45 +00:00
parent 3791e489b2
commit 359a0109fd
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF
2 changed files with 12 additions and 14 deletions

View File

@ -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(

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 }