mirror of
https://github.com/AppleCommander/bastools.git
synced 2025-08-09 16:25:03 +00:00
Adding a version to the BT API.
This commit is contained in:
@@ -10,6 +10,15 @@ dependencies {
|
|||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jar {
|
||||||
|
manifest {
|
||||||
|
attributes(
|
||||||
|
'Implementation-Title': 'B/BAS Tokenizer',
|
||||||
|
'Implementation-Version': "${version} (${new Date().format('yyyy-MM-dd HH:mm')})"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task javadocJar(type: Jar) {
|
task javadocJar(type: Jar) {
|
||||||
classifier = 'javadoc'
|
classifier = 'javadoc'
|
||||||
from javadoc
|
from javadoc
|
||||||
|
@@ -1,10 +1,16 @@
|
|||||||
package io.github.applecommander.bastokenizer.tools.bt;
|
package io.github.applecommander.bastokenizer.tools.bt;
|
||||||
|
|
||||||
|
import io.github.applecommander.applesingle.AppleSingle;
|
||||||
|
import io.github.applecommander.bastokenizer.api.BasTokenizer;
|
||||||
import picocli.CommandLine.IVersionProvider;
|
import picocli.CommandLine.IVersionProvider;
|
||||||
|
|
||||||
/** Display version information. Note that this is dependent on Gradle configuration. */
|
/** Display version information. Note that this is dependent on Gradle configuration. */
|
||||||
public class VersionProvider implements IVersionProvider {
|
public class VersionProvider implements IVersionProvider {
|
||||||
public String[] getVersion() {
|
public String[] getVersion() {
|
||||||
return new String[] { Main.class.getPackage().getImplementationVersion() };
|
return new String[] {
|
||||||
|
String.format("BT CLI: %s", Main.class.getPackage().getImplementationVersion()),
|
||||||
|
String.format("BT API: %s", BasTokenizer.VERSION),
|
||||||
|
String.format("AppleSingle API: %s", AppleSingle.VERSION)
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user