Commit ed6659cf authored by aurimas@chromium.org's avatar aurimas@chromium.org

Start using proguard.jar directly instead of proguard.sh

android_tools/sdk/tools/proguard/bin/proguard.sh was removed with SDK tools
update. https://gerrit.chromium.org/gerrit/#/c/70802/ updates SDK tools
and we want to roll to start using it.

BUG=393019

Review URL: https://codereview.chromium.org/377353003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282498 0039d316-1c4b-4281-b951-d872f2087c98
parent 741314c6
...@@ -20,7 +20,8 @@ def DoProguard(options): ...@@ -20,7 +20,8 @@ def DoProguard(options):
# the output. # the output.
if os.path.exists(options.output_path): if os.path.exists(options.output_path):
os.remove(options.output_path) os.remove(options.output_path)
proguard_cmd = [options.proguard_path, proguard_cmd = ['java', '-jar',
options.proguard_path,
'-injars', injars, '-injars', injars,
'-outjars', outjars, '-outjars', outjars,
'-libraryjars', libraryjars, '-libraryjars', libraryjars,
......
...@@ -42,10 +42,10 @@ class TestJar(object): ...@@ -42,10 +42,10 @@ class TestJar(object):
raise Exception('%s not found, please build it' % jar_path) raise Exception('%s not found, please build it' % jar_path)
self._PROGUARD_PATH = os.path.join(constants.ANDROID_SDK_ROOT, self._PROGUARD_PATH = os.path.join(constants.ANDROID_SDK_ROOT,
'tools/proguard/bin/proguard.sh') 'tools/proguard/lib/proguard.jar')
if not os.path.exists(self._PROGUARD_PATH): if not os.path.exists(self._PROGUARD_PATH):
self._PROGUARD_PATH = os.path.join(os.environ['ANDROID_BUILD_TOP'], self._PROGUARD_PATH = os.path.join(os.environ['ANDROID_BUILD_TOP'],
'external/proguard/bin/proguard.sh') 'external/proguard/lib/proguard.jar')
self._jar_path = jar_path self._jar_path = jar_path
self._annotation_map = collections.defaultdict(list) self._annotation_map = collections.defaultdict(list)
self._pickled_proguard_name = self._jar_path + '-proguard.pickle' self._pickled_proguard_name = self._jar_path + '-proguard.pickle'
...@@ -71,7 +71,8 @@ class TestJar(object): ...@@ -71,7 +71,8 @@ class TestJar(object):
return False return False
def _GetProguardData(self): def _GetProguardData(self):
proguard_output = cmd_helper.GetCmdOutput([self._PROGUARD_PATH, proguard_output = cmd_helper.GetCmdOutput(['java', '-jar',
self._PROGUARD_PATH,
'-injars', self._jar_path, '-injars', self._jar_path,
'-dontshrink', '-dontshrink',
'-dontoptimize', '-dontoptimize',
......
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
'action_name': 'proguard_<(_target_name)', 'action_name': 'proguard_<(_target_name)',
'message': 'Proguard preprocessing <(_target_name) jar', 'message': 'Proguard preprocessing <(_target_name) jar',
'inputs': [ 'inputs': [
'<(android_sdk_root)/tools/proguard/bin/proguard.sh', '<(android_sdk_root)/tools/proguard/lib/proguard.jar',
'<(DEPTH)/build/android/gyp/util/build_utils.py', '<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/proguard.py', '<(DEPTH)/build/android/gyp/proguard.py',
'<(javac_jar_path)', '<(javac_jar_path)',
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
], ],
'action': [ 'action': [
'python', '<(DEPTH)/build/android/gyp/proguard.py', 'python', '<(DEPTH)/build/android/gyp/proguard.py',
'--proguard-path=<(android_sdk_root)/tools/proguard/bin/proguard.sh', '--proguard-path=<(android_sdk_root)/tools/proguard/lib/proguard.jar',
'--input-path=<(javac_jar_path)', '--input-path=<(javac_jar_path)',
'--output-path=<(jar_path)', '--output-path=<(jar_path)',
'--proguard-config=<(proguard_config)', '--proguard-config=<(proguard_config)',
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
'action_name': 'proguard_<(_target_name)', 'action_name': 'proguard_<(_target_name)',
'message': 'Proguard preprocessing <(_target_name) jar', 'message': 'Proguard preprocessing <(_target_name) jar',
'inputs': [ 'inputs': [
'<(android_sdk_root)/tools/proguard/bin/proguard.sh', '<(android_sdk_root)/tools/proguard/lib/proguard.jar',
'<(DEPTH)/build/android/gyp/util/build_utils.py', '<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/proguard.py', '<(DEPTH)/build/android/gyp/proguard.py',
'<(jar_path)', '<(jar_path)',
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
], ],
'action': [ 'action': [
'python', '<(DEPTH)/build/android/gyp/proguard.py', 'python', '<(DEPTH)/build/android/gyp/proguard.py',
'--proguard-path=<(android_sdk_root)/tools/proguard/bin/proguard.sh', '--proguard-path=<(android_sdk_root)/tools/proguard/lib/proguard.jar',
'--input-path=<(jar_path)', '--input-path=<(jar_path)',
'--output-path=<(dex_input_jar_path)', '--output-path=<(dex_input_jar_path)',
'--proguard-config=<(proguard_config)', '--proguard-config=<(proguard_config)',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment