summaryrefslogtreecommitdiffstats
path: root/components/cronet/tools
diff options
context:
space:
mode:
authormef <mef@chromium.org>2014-09-12 14:57:04 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-12 22:01:43 +0000
commit24b4b89d638187b95fde8fa3f629cc5d533b64fe (patch)
treecb3338ef6596e7dfb585cd41ca4e4539ced1ea51 /components/cronet/tools
parent4788e092c1bcf908fb803bc311a213cc50bc95c5 (diff)
downloadchromium_src-24b4b89d638187b95fde8fa3f629cc5d533b64fe.zip
chromium_src-24b4b89d638187b95fde8fa3f629cc5d533b64fe.tar.gz
chromium_src-24b4b89d638187b95fde8fa3f629cc5d533b64fe.tar.bz2
Use proguard.cfg in release build of Cronet Sample apk.
Update proguard.cfg to reflect that @UsedByReflection was moved to base/. Add --release option to cr_cronet.py tool. Notes: - Chromium debug build does not apply proguard at all. - Chromium instrumentation test does not allow custom proguard config (but it uses proguard config from instrumented app, which is nice). BUG=390267 Review URL: https://codereview.chromium.org/512953002 Cr-Commit-Position: refs/heads/master@{#294671}
Diffstat (limited to 'components/cronet/tools')
-rwxr-xr-xcomponents/cronet/tools/cr_cronet.py22
1 files changed, 16 insertions, 6 deletions
diff --git a/components/cronet/tools/cr_cronet.py b/components/cronet/tools/cr_cronet.py
index ae97144..84f6a0f 100755
--- a/components/cronet/tools/cr_cronet.py
+++ b/components/cronet/tools/cr_cronet.py
@@ -18,31 +18,41 @@ def run(command):
def main():
parser = argparse.ArgumentParser()
parser.add_argument('command',
- choices=['init',
+ choices=['gyp',
'sync',
'build',
'install',
+ 'proguard',
'test',
'debug'])
+ parser.add_argument('-r', '--release', action='store_true',
+ help='use release configuration')
options = parser.parse_args()
print options
- print options.command
gyp_defines = 'GYP_DEFINES="OS=android enable_websockets=0 '+ \
'disable_file_support=1 disable_ftp_support=1 '+ \
'use_icu_alternatives_on_android=1" '
+ out_dir = 'out/Debug'
+ release_arg = ''
+ if options.release:
+ out_dir = 'out/Release'
+ release_arg = ' --release'
- if (options.command=='init'):
+ if (options.command=='gyp'):
return run (gyp_defines + ' gclient runhooks')
if (options.command=='sync'):
return run ('git pull --rebase && ' + gyp_defines + ' gclient sync')
if (options.command=='build'):
- return run ('ninja -C out/Debug cronet_sample_test_apk')
+ return run ('ninja -C ' + out_dir + ' cronet_sample_test_apk')
if (options.command=='install'):
- return run ('build/android/adb_install_apk.py --apk=CronetSample.apk')
+ return run ('build/android/adb_install_apk.py ' + release_arg + \
+ ' --apk=CronetSample.apk')
+ if (options.command=='proguard'):
+ return run ('ninja -C out/Release cronet_sample_proguard_apk')
if (options.command=='test'):
return run ('build/android/test_runner.py instrumentation '+ \
- '--test-apk=CronetSampleTest')
+ release_arg + ' --test-apk=CronetSampleTest')
parser.print_help()
return 1