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

Allow one build info object per configuration. (new feature) #61

Merged
merged 1 commit into from
Jul 9, 2015
Merged

Allow one build info object per configuration. (new feature) #61

merged 1 commit into from
Jul 9, 2015

Conversation

asflierl
Copy link
Contributor

@asflierl asflierl commented Jun 3, 2015

It's been useful in the past to have seperate build info objects for different configurations (like - keep test API keys for test and things like that). So far, I've always duplicated the plug-in code in my projects when I had to do that so I'd like to propose this change to make this feature possible without much overhead.

Example usage:

lazy val root = (project in file(".")).enablePlugins(BuildInfoPlugin)

name := "meep"
version := "1.0"
scalaVersion := "2.11.6"

addBuildInfoToConfig(Test)

buildInfoObject := "Meep"
buildInfoPackage in Test := "meep"
buildInfoKeys in Compile := Seq(name, version)
buildInfoKeys in Test  := Seq(scalaVersion)

The buildInfoObject setting here works for both configs, since it's the default fallback. The others were adapted per-config. Hope it's clear what I mean. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants