Closed alaendle closed 8 years ago
well, I'm kind of undecided on that one. What are pro's and con's for including the generated java files?
Con : disk space usage. Pro: you can make a minimal stand - alone Jar from that (provided you do have the java artifacts of the standard library and other dependencies)
For the gradle plugin we also have to consider that it will (I'm tempted to add "typically") be used together with Java code and then we may interfere with the jarring of .java source files...
I advise not to act on this issue before the next release is out. The compiler will then have an option to remove the java files.
Another advantage for retaining Java sources is to be able to debug in IDEs. I have debugged successfully in IntelliJ and I find it often very useful.
O.k. - interesting discussion of pro/con. Thanks for you comments! From a frege beginners point of view it seems to be just redundant to have java sources and resulting il-code in one distributable. But I can understand that it might be valuable during debugging. Since it is very easy to exclude generated java code - and there are scenarios where it might be better to have the sources included - I'm fine if this issue gets closed - or keep it open with very low priority.
This issue will become obsolete as soon as the compiler allows removal of the .java files and we expose this option in the compileFrege task.
Is this necessary? Or could/should java sources not be included?
Workaround - add this to your gradle file:
jar { exclude('**/*.java') }