mirror of https://github.com/sbt/sbt.git
Cleanup & simplify actions/generator
This commit is contained in:
parent
3791e489b2
commit
359a0109fd
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
|
|
|
|||
Loading…
Reference in New Issue