X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=getdown%2Fsrc%2Fgetdown%2Fcore%2Fsrc%2Fmain%2Fjava%2Fcom%2Fthreerings%2Fgetdown%2Fdata%2FBuild.java.tmpl;fp=getdown%2Fsrc%2Fgetdown%2Fcore%2Fsrc%2Fmain%2Fjava%2Fcom%2Fthreerings%2Fgetdown%2Fdata%2FBuild.java.tmpl;h=60a8ff3378e67867494d45ddf152ad0dc0054f3f;hb=f517e5ea31f1749617ac191137891cf87111550b;hp=0000000000000000000000000000000000000000;hpb=eb7de3c7621b2311470ab91b4af218a9f95ed8a3;p=jalview.git diff --git a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Build.java.tmpl b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Build.java.tmpl new file mode 100644 index 0000000..60a8ff3 --- /dev/null +++ b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Build.java.tmpl @@ -0,0 +1,43 @@ +// +// Getdown - application installer, patcher and launcher +// Copyright (C) 2004-2016 Getdown authors +// https://github.com/threerings/getdown/blob/master/LICENSE + +package com.threerings.getdown.data; + +import java.util.Arrays; +import java.util.List; + +import com.threerings.getdown.util.StringUtil; + +/** + * Contains static data provided during the build process. + */ +public class Build { + + /** The date and time at which the code was built: in {@code yyyy-MM-dd HH:mm} format. */ + public static String time () { + return "@build_time@"; + } + + /** The Maven version of the Getdown project. */ + public static String version () { + return "@build_version@"; + } + + /** + *

The hosts which Getdown is allowed to communicate with. An empty list indicates that + * no whitelist is configured and there are no limitations. By default, no host whitelist + * is added to the binary, so it can be used to download and run applications from any + * server. + * + *

To create a custom Getdown build that can only talk to whitelisted servers, set + * the {@code getdown.host.whitelist} property on the command line while building the JAR + * (e.g. {@code mvn package -Dgetdown.host.whitelist=my.server.com}). Wildcards can be used + * (e.g. {@code *.mycompany.com}) and multiple values can be separated by commas + * (e.g. {@code app1.foo.com,app2.bar.com,app3.baz.com}). + */ + public static List hostWhitelist () { + return Arrays.asList(StringUtil.parseStringArray("@host_whitelist@")); + } +}