@@ -51,12 +51,19 @@ public class App {
5151 @ Option (name = "-notesFile" , forbids = "-notes" , usage = "(optional) Release notes from file" )
5252 private String notesPath ;
5353
54+ @ Option (name = "-proxyHost" , forbids = "" , usage = "(optional) Configure the proxy address" )
55+ private String proxyHost ;
56+
57+ @ Option (name = "-proxyPort" , forbids = "" , usage = "(optional) Configure the proxy port" )
58+ private String proxyPort ;
59+
5460 /**
5561 * Entry point
56- *
62+ *
5763 * @param args process arguments
5864 */
5965 public static void main (String ... args ) {
66+
6067 try {
6168 // do upload
6269 new App ().parseArgs (args ).upload ();
@@ -70,7 +77,7 @@ public static void main(String... args) {
7077
7178 /**
7279 * Construct localized version on message
73- *
80+ *
7481 * @param message message
7582 * @return localized version
7683 */
@@ -91,7 +98,7 @@ public String format(Object... args) {
9198
9299 /**
93100 * Parse process arguments.
94- *
101+ *
95102 * @param args process arguments
96103 * @throws Exception argumentss error
97104 * @return {@link App} instance
@@ -123,10 +130,18 @@ private App parseArgs(String... args) throws CmdLineException {
123130
124131 /**
125132 * Perform apk upload an release on given track
126- *
133+ *
127134 * @throws Exception Upload error
128135 */
129136 private void upload () throws Exception {
137+ // configure proxy
138+ if (this .proxyHost != null && !this .proxyHost .isEmpty ()) {
139+ System .setProperty ("https.proxyHost" , this .proxyHost );
140+ }
141+
142+ if (this .proxyPort != null && !this .proxyPort .isEmpty ()) {
143+ System .setProperty ("https.proxyPort" , this .proxyPort );
144+ }
130145
131146 // load key file credentials
132147 System .out .println ("Loading account credentials..." );
0 commit comments