diffplug / gradle-and-eclipse-rcp

Gradle and Eclipse RCP
Apache License 2.0
45 stars 9 forks source link

Support for Reproducible Version Qualifiers? #6

Closed elmsley closed 7 years ago

elmsley commented 8 years ago

Can this somehow support Reproducible Version Qualifiers (https://wiki.eclipse.org/Tycho/Reproducible_Version_Qualifiers) ?

nedtwigg commented 8 years ago

I haven't used RVQ before, but from reading that document it appears that RVQ has these features:

  1. Generate the same version qualifier when building from the same git commit.
  2. Only produce new artifact version when there are changes.
  3. Guarantee consistent artifact id, version and contents.

Satisfying 1 can easily be done by generating the qualifier from the git commit SHA. Satisfying 2 would be harder, but possible, by generating the qualifier from a hash of the jar file's content. I think that 3 is ill-defined.

The qualifier is generated by the bndmanifest plugin, whose javadoc are here.

The current logic for generating the qualifier is here.

Depending on your requirements, we could add a flag to the existing bndmanifest plugin, something like qualifierFromGitHash = true, to easily meet requirement 1. If you need something more complicated, then it would probably make sense to make a new plugin.

nedtwigg commented 7 years ago

Feel free to reopen if there's future interest.