-
Notifications
You must be signed in to change notification settings - Fork 89
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
Support generating simple Java class #47
Comments
+1. Or I want to know any Java-way to get the values from the Scala class generated by sbt-buildinfo. |
Oops, It seems be already generating a Java class. I can get the values by Java code such as |
@analytically Do you mean a Java source code or a compiled Java class? Currently sbt-buildinfo (version 0.5.0 as the time writing) doesn't generate Java source code containing the build information. It generates Scala source code only, which will be compiled into some Java class in the compile stage and can be used in all Java/Scala code. As noted in https://github.com/sbt/sbt-buildinfo/blob/master/notes/0.5.0.markdown, it is possible to enhance sbt-buildinfo and make it generate Java source code by providing a JavaClassRenderer, but I don't see use case for it yet. Would be great if you can provide some. |
See PR: #98. All you need to do is write your own renderer. |
It allows for sbt to be used for Java projects if it comes built-in :-). |
Awesome. I don't think anybody prevents you from creating a PR with the renderer ;) |
I created PR #167 which addresses this issue. |
looks like this was fixed a while back by #167 |
It'd be great if there would be a way to generate a simple Java class containing the build information.
The text was updated successfully, but these errors were encountered: