Adding AppleSingle.VERSION.
This commit is contained in:
parent
549ce45c3c
commit
153e0aa220
|
@ -10,6 +10,15 @@ dependencies {
|
|||
testImplementation 'junit:junit:4.12'
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes(
|
||||
'Implementation-Title': 'AppleSingle',
|
||||
'Implementation-Version': "${version} (${new Date().format('yyyy-MM-dd HH:mm')})"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar) {
|
||||
classifier = 'javadoc'
|
||||
from javadoc
|
||||
|
|
|
@ -37,6 +37,11 @@ public class AppleSingle {
|
|||
public static final int VERSION_NUMBER1 = 0x00010000;
|
||||
public static final int VERSION_NUMBER2 = 0x00020000;
|
||||
|
||||
public static final String VERSION;
|
||||
static {
|
||||
VERSION = AppleSingle.class.getPackage().getImplementationVersion();
|
||||
}
|
||||
|
||||
private Map<Integer,Consumer<Entry>> entryConsumers = new HashMap<>();
|
||||
{
|
||||
entryConsumers.put(1, entry -> this.dataFork = entry.getData());
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
package io.github.applecommander.applesingle.tools.asu;
|
||||
|
||||
import io.github.applecommander.applesingle.AppleSingle;
|
||||
import picocli.CommandLine.IVersionProvider;
|
||||
|
||||
/** Display version information. Note that this is dependent on the Spring Boot Gradle plugin configuration. */
|
||||
public class VersionProvider implements IVersionProvider {
|
||||
public String[] getVersion() {
|
||||
return new String[] { Main.class.getPackage().getImplementationVersion() };
|
||||
return new String[] {
|
||||
String.format("CLI: %s", Main.class.getPackage().getImplementationVersion()),
|
||||
String.format("API: %s", AppleSingle.VERSION)
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue