39 lines
1.3 KiB
Text
39 lines
1.3 KiB
Text
/*
|
|
* This file is automatically generated.
|
|
* Do not modify! -- ALL CHANGES WILL BE ERASED!
|
|
*/
|
|
package {{packageName}};
|
|
|
|
import java.time.*;
|
|
|
|
/**
|
|
* Provides semantic version information.
|
|
*
|
|
* @author <a href="https://github.com/ethauvin/semver">Semantic Version Annotation Processor</a>
|
|
*/
|
|
public final class {{className}} {
|
|
public final static String PROJECT = "{{project}}";
|
|
public final static LocalDateTime BUILDDATE =
|
|
LocalDateTime.ofInstant(Instant.ofEpochMilli({{epoch}}L), ZoneId.systemDefault());
|
|
public final static int MAJOR = {{major}};
|
|
public final static int MINOR = {{minor}};
|
|
public final static int PATCH = {{patch}};
|
|
public final static String PRERELEASE = "{{preRelease}}";
|
|
public final static String BUILDMETA = "{{buildMeta}}";
|
|
|
|
/**
|
|
* The full semantic version string.
|
|
*/
|
|
public final static String VERSION = Integer.toString(MAJOR) + '.'
|
|
+ Integer.toString(MINOR) + '.'
|
|
+ Integer.toString(PATCH)
|
|
+ ((!PRERELEASE.isEmpty()) ? "-" + PRERELEASE : "")
|
|
+ ((!BUILDMETA.isEmpty()) ? "+" + BUILDMETA : "");
|
|
|
|
/**
|
|
* Disables the default constructor.
|
|
*/
|
|
private {{className}}() {
|
|
throw new UnsupportedOperationException("Illegal constructor call.");
|
|
}
|
|
}
|