Skip to content

Java Renderers (code generators for Java only sbt projects)#167

Merged
eed3si9n merged 2 commits intosbt:masterfrom
arixmkii:java-renderer
Jan 17, 2021
Merged

Java Renderers (code generators for Java only sbt projects)#167
eed3si9n merged 2 commits intosbt:masterfrom
arixmkii:java-renderer

Conversation

@arixmkii
Copy link
Copy Markdown
Contributor

Java Renderers coming in 2 flavors - with static field and with simple singleton class. Java code requires Java version 1.8. Code was formatted with Google java format.

Additionally I changed ScalaCaseObjectRenderer to public from package private, because I see no reasons why it should be package private.

Scala code was formatted with some scalafmt config I used for different project, because no default scalafmt was found in the repo.

No tests, because I'm not familiar how to write tests for SBT plugins.

@eed3si9n
Copy link
Copy Markdown
Member

Thanks for the contribution. Testing is documented here https://www.scala-sbt.org/1.x/docs/Testing-sbt-plugins.html.
See also some of the examples here - https://github.com/sbt/sbt-buildinfo/tree/master/src/sbt-test/sbt-buildinfo

@arixmkii
Copy link
Copy Markdown
Contributor Author

Thank you for the links! They were really helpful. I added tests for both renderers. Mostly a copy from your ScalaCaseClassRenderer, but with Scala specific parts removed.

@arixmkii
Copy link
Copy Markdown
Contributor Author

Increased stack for tests (because it was what made them pass on my machine), but it is a separate commit if someone wants to take a look at the stack issue in details.

@eed3si9n eed3si9n merged commit d4958c3 into sbt:master Jan 17, 2021
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