Skip to content

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

Merged
eed3si9n merged 1 commit intosbt:masterfrom
axos88:master
Apr 20, 2017
Merged

Add option for Scala case class, and easy configuration of other renderers.#98
eed3si9n merged 1 commit intosbt:masterfrom
axos88:master

Conversation

@axos88
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

axos88 commented Jan 6, 2017

Might be related: #95

@axos88
Copy link
Copy Markdown
Contributor Author

axos88 commented Jan 6, 2017

Also: #47

@damdev
Copy link
Copy Markdown

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
Copy Markdown
Member

The change looks nice. Sorry about the late response.

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

axos88 commented Apr 21, 2017

thx

@tobyweston
Copy link
Copy Markdown

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

@marko-asplund
Copy link
Copy Markdown

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
Copy Markdown

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