pgpainless / sop-java

Stateless OpenPGP Protocol API and CLI for Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add `getSopJavaVersion`?

vanitasvitae opened this issue · comments

A user recently pointed out that it might be nice to have the version of sop-java used in getExtendedVersion().
We could do something similar to what pgpainless-sop does (write out the current version to a Properties file in the gradle build script, and read the version from the file when getSopJavaVersion() (or however the method shall be named) is called.

Not sure if this is a good idea or not.

I'm wondering, whether it is possible to simply fix this in pgpainless-cli, by writing the value of sopJavaVersion to the properties file as well.
My concern is, that this fails if pgpainless-cli dynamically links against a different version of sop-java.
This has happened in the past in the debian release of pgpainless-cli, so perhaps this is not a good idea.

In the SOP spec revision 06, the feature sop version --sop-spec was added, which allows users to determine the implemented SOP spec revision.
This might be just what this issue really wants.

See #19 for an implementation.