Added version.projects property.

Added README.md.
This commit is contained in:
Erik C. Thauvin 2016-01-23 15:39:38 -08:00
parent aeee81544c
commit 57116e691f
15 changed files with 218 additions and 67 deletions

View file

@ -13,11 +13,12 @@ import java.util.Date;
*/
public final class GeneratedVersion {
private final static String buildmeta = "";
private final static Date date = new Date(1453146881481L);
private final static Date date = new Date(1453591949581L);
private final static int major = 3;
private final static int minor = 1;
private final static int patch = 35;
private final static String prerelease = "beta";
private final static String project = "Example";
/**
* Returns the build date.
@ -77,6 +78,15 @@ public final class GeneratedVersion {
return "";
}
/**
* Returns the project name.
*
* @return The project name, if any.
*/
public static String getProject() {
return project;
}
/**
* Returns the build metadata.
*

View file

@ -51,7 +51,7 @@ public class Example
{
final SimpleDateFormat sdf = new SimpleDateFormat("'Built on' EEE, d MMM yyyy 'at' HH:mm:ss z");
System.out.println(Example.class.getSimpleName() + ' ' + GeneratedVersion.getVersion());
System.out.println(GeneratedVersion.getProject() + ' ' + GeneratedVersion.getVersion());
System.out.println(sdf.format(GeneratedVersion.getBuildDate()));
}
}