Upstream version 9.37.195.0
[platform/framework/web/crosswalk.git] / src / build / android / gyp / proguard.py
index 41d4a69..b27365b 100755 (executable)
@@ -4,7 +4,6 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-import fnmatch
 import optparse
 import os
 import sys
@@ -21,7 +20,8 @@ def DoProguard(options):
   # the output.
   if os.path.exists(options.output_path):
     os.remove(options.output_path)
-  proguard_cmd = [options.proguard_path,
+  proguard_cmd = ['java', '-jar',
+                  options.proguard_path,
                   '-injars', injars,
                   '-outjars', outjars,
                   '-libraryjars', libraryjars,
@@ -29,7 +29,7 @@ def DoProguard(options):
   build_utils.CheckOutput(proguard_cmd, print_stdout=True)
 
 
-def main(argv):
+def main():
   parser = optparse.OptionParser()
   parser.add_option('--proguard-path',
                     help='Path to the proguard executable.')
@@ -41,9 +41,6 @@ def main(argv):
   parser.add_option('--classpath', help="Classpath for proguard.")
   parser.add_option('--stamp', help='Path to touch on success.')
 
-  # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
-  parser.add_option('--ignore', help='Ignored.')
-
   options, _ = parser.parse_args()
 
   DoProguard(options)
@@ -53,4 +50,4 @@ def main(argv):
 
 
 if __name__ == '__main__':
-  sys.exit(main(sys.argv))
+  sys.exit(main())