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

Add option for Scala case class, and easy configuration of other renderers. #98

Merged
merged 1 commit into from
Apr 20, 2017

Conversation

axos88
Copy link
Contributor

@axos88 axos88 commented Jan 6, 2017

One can now use

  buildInfoRenderFactory := ScalaCaseClassRenderer.apply,

To switch to another Renderer. Also added a Case Class renderer, which will create a case class AND an object that inherits the class. This makes it easy to use a jsonFormatter with the output.

@axos88 axos88 force-pushed the master branch 2 times, most recently from 0f74e82 to f91ec29 Compare January 6, 2017 13:01
@axos88
Copy link
Contributor Author

axos88 commented Jan 6, 2017

Might be related: #95

@axos88
Copy link
Contributor Author

axos88 commented Jan 6, 2017

Also: #47

@damdev
Copy link

damdev commented Jan 31, 2017

Hi, is there any reason to not merge this PR? It will be pretty useful since the #95 issue it's fixed too

@eed3si9n
Copy link
Member

The change looks nice. Sorry about the late response.

@eed3si9n eed3si9n merged commit 205ba0e into sbt:master Apr 20, 2017
@axos88
Copy link
Contributor Author

axos88 commented Apr 21, 2017

thx

@tobyweston
Copy link

👍 I was justing thinking the same when I saw this! thanks 😄

@marko-asplund
Copy link

I've added the below line in build.sbt

buildInfoRenderer := ScalaCaseObjectRenderer.apply

and get the following compile error:

buildInfoRenderer := ScalaCaseObjectRenderer.apply
                     ^
[error] Type error in expression```

What's the correct way to configure an alternative renderer?

@damdev
Copy link

damdev commented Oct 3, 2018

@marko-asplund here https://github.com/sbt/sbt-buildinfo/blob/master/src/sbt-test/sbt-buildinfo/caseclassrenderer/build.sbt#L25 you have a example build with the ScalaCaseObjectRenderer configured. I think you are using the wrong setting key.

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.

5 participants