Skip to content

Commit

Permalink
If generating resources, put them into resourceManaged, not sourceMan…
Browse files Browse the repository at this point in the history
…aged
  • Loading branch information
alexeyr committed Jun 9, 2016
1 parent 20a5d0b commit 0c7b90b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/scala/sbtbuildinfo/BuildInfoPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@ object BuildInfoPlugin extends sbt.AutoPlugin {

def buildInfoScopedSettings(conf: Configuration): Seq[Def.Setting[_]] = inConfig(conf)(Seq(
buildInfo := Seq(BuildInfo({
val parentDir = buildInfoRenderer.value.fileType match {
case BuildInfoType.Source => sourceManaged.value
case BuildInfoType.Resource => resourceManaged.value
}
if (buildInfoUsePackageAsPath.value)
new File(sourceManaged.value, buildInfoPackage.value.split('.').mkString("/"))
new File(parentDir, buildInfoPackage.value.split('.').mkString("/"))
else
sourceManaged.value / "sbt-buildinfo"
parentDir / "sbt-buildinfo"
},
buildInfoRenderer.value,
buildInfoObject.value,
Expand Down

0 comments on commit 0c7b90b

Please sign in to comment.