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

Give zinc wrapper ability to create jar files #6080

Closed
illicitonion opened this issue Jul 9, 2018 · 0 comments
Closed

Give zinc wrapper ability to create jar files #6080

illicitonion opened this issue Jul 9, 2018 · 0 comments
Assignees

Comments

@illicitonion
Copy link
Contributor

The zinc wrapper we have at https://github.com/pantsbuild/pants/tree/3dc6cce95c5e38c75b77b81ebd4ca01a74dff9ea/src/scala/org/pantsbuild/zinc/compiler currently takes a flag _classesDirectory in Settings.

We should give it a new flag, outputJar. If it is specified, we should jar up the contents of _classesDirectory (using the standard java.util.jar.JarOutputStream, unless there's a good reason not to) and output it to the path pointed to by that flag.

We should use a single, deterministic timestamp for each entry which we create, so that the jarfiles are byte-for-byte reproducible.

Maybe we want to make classesDIrectory an optional flag, such that the valid combinations are:

  1. classesDirectory set, outputJar not - the current behaviour.
  2. classesDirectory and outputJar both set - classes will be in the former, jar file at the latter
  3. outputJar set, classesDirectory not - classes will be created in a tempdir, jar'd, and then deleted.

And an error results if neither are set.

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

No branches or pull requests

2 participants