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

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

Merged
merged 2 commits into from
Jan 17, 2021

Conversation

arixmkii
Copy link
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
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
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
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