Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If generating resources, put them into resourceManaged #94

Merged
merged 1 commit into from
Jun 9, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/main/scala/sbtbuildinfo/BuildInfoPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,18 @@ 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("/"))
buildInfoPackage.value match {
case "" => parentDir
case packageName =>
new File(parentDir, packageName.split('.').mkString("/"))
}
else
sourceManaged.value / "sbt-buildinfo"
parentDir / "sbt-buildinfo"
},
buildInfoRenderer.value,
buildInfoObject.value,
Expand Down