Closed stephenh closed 7 years ago
...actually, this may already work, I'm still trying to get @Version
figured out, but I passed a sources of META-INF/MANIFEST.MF
and the Properties
implementation loaded it just fine.
Yeah, j.u.Properties really does understand the MF format. Crazy.
Well, that is cool. It might be worth adding a hint to the docs that sources can be META-INF/MANIFEST.MF
for others who wonder about this in the future, and similarly don't realize that Properties already supports this.
Gradle has a built-in way of putting key/value pairs in the manifest file:
So, given this, it'd be great to use
@Version
with a source ofMETA-INF/MANIFEST.MF
.Admittedly, I should submit this as a PR (but I'm being lazy), because I think it should be pretty simple to do a "if source path ends with .MF then parse as a manifest file" and use a snippet like:
In the VersionSection.loadDataSource area.