60a8ff3378e67867494d45ddf152ad0dc0054f3f
[jalview.git] / getdown / src / getdown / core / src / main / java / com / threerings / getdown / data / Build.java.tmpl
1 //
2 // Getdown - application installer, patcher and launcher
3 // Copyright (C) 2004-2016 Getdown authors
4 // https://github.com/threerings/getdown/blob/master/LICENSE
5
6 package com.threerings.getdown.data;
7
8 import java.util.Arrays;
9 import java.util.List;
10
11 import com.threerings.getdown.util.StringUtil;
12
13 /**
14  * Contains static data provided during the build process.
15  */
16 public class Build {
17
18     /** The date and time at which the code was built: in {@code yyyy-MM-dd HH:mm} format. */
19     public static String time () {
20         return "@build_time@";
21     }
22
23     /** The Maven version of the Getdown project. */
24     public static String version () {
25         return "@build_version@";
26     }
27
28     /**
29      * <p>The hosts which Getdown is allowed to communicate with. An empty list indicates that
30      * no whitelist is configured and there are no limitations. By default, no host whitelist
31      * is added to the binary, so it can be used to download and run applications from any
32      * server.
33      *
34      * <p>To create a custom Getdown build that can only talk to whitelisted servers, set
35      * the {@code getdown.host.whitelist} property on the command line while building the JAR
36      * (e.g. {@code mvn package -Dgetdown.host.whitelist=my.server.com}). Wildcards can be used
37      * (e.g. {@code *.mycompany.com}) and multiple values can be separated by commas
38      * (e.g. {@code app1.foo.com,app2.bar.com,app3.baz.com}).
39      */
40     public static List<String> hostWhitelist () {
41         return Arrays.asList(StringUtil.parseStringArray("@host_whitelist@"));
42     }
43 }