dev.sixpack.VersionInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sixpack-sdk Show documentation
Show all versions of sixpack-sdk Show documentation
SDK to develop generators part of the Sixpack solution
The newest version!
package dev.sixpack;
import java.io.InputStream;
import java.util.Properties;
import static java.lang.Integer.parseInt;
public class VersionInfo {
public static int minorVersion;
public static int patchVersion;
static {
try (InputStream input = VersionInfo.class.getClassLoader().getResourceAsStream("version.properties")) {
if (input != null) {
Properties properties=new Properties();
properties.load(input);
String[] parts = properties.getProperty("fullVersion").split("\\.");
minorVersion = parseInt(parts[1]);
String[] parts2 = parts[2].split("-");
patchVersion = parseInt(parts2[0]);
} else {
throw new RuntimeException("Failed to load version properties");
}
} catch (Exception e) {
throw new RuntimeException("Failed to load version properties", e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy